summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--.github/workflows/linux_builds.yml42
-rw-r--r--.github/workflows/macos_builds.yml7
-rw-r--r--core/SCsub1
-rw-r--r--core/config/engine.cpp8
-rw-r--r--core/config/engine.h4
-rw-r--r--core/core_bind.cpp51
-rw-r--r--core/core_bind.h12
-rw-r--r--core/core_constants.cpp10
-rw-r--r--core/crypto/crypto.cpp2
-rw-r--r--core/crypto/crypto.h2
-rw-r--r--core/io/file_access.cpp4
-rw-r--r--core/io/file_access.h2
-rw-r--r--core/io/resource_format_binary.cpp4
-rw-r--r--core/io/resource_format_binary.h2
-rw-r--r--core/io/resource_saver.cpp24
-rw-r--r--core/io/resource_saver.h6
-rw-r--r--core/math/color.h12
-rw-r--r--core/math/quaternion.cpp64
-rw-r--r--core/math/quaternion.h4
-rw-r--r--core/math/transform_2d.cpp10
-rw-r--r--core/math/transform_2d.h6
-rw-r--r--core/math/transform_3d.cpp18
-rw-r--r--core/math/transform_3d.h8
-rw-r--r--core/math/vector4.cpp24
-rw-r--r--core/math/vector4.h15
-rw-r--r--core/math/vector4i.cpp2
-rw-r--r--core/multiplayer/SCsub5
-rw-r--r--core/multiplayer/multiplayer_api.cpp593
-rw-r--r--core/multiplayer/multiplayer_api.h196
-rw-r--r--core/object/message_queue.cpp2
-rw-r--r--core/object/object.cpp28
-rw-r--r--core/object/object.h3
-rw-r--r--core/object/script_language.h7
-rw-r--r--core/object/script_language_extension.cpp2
-rw-r--r--core/object/script_language_extension.h26
-rw-r--r--core/object/worker_thread_pool.cpp4
-rw-r--r--core/os/os.cpp5
-rw-r--r--core/os/os.h6
-rw-r--r--core/register_core_types.cpp5
-rw-r--r--core/string/ustring.cpp10
-rw-r--r--core/string/ustring.h2
-rw-r--r--core/variant/array.cpp10
-rw-r--r--core/variant/callable.cpp19
-rw-r--r--core/variant/callable.h14
-rw-r--r--core/variant/callable_bind.cpp29
-rw-r--r--core/variant/callable_bind.h6
-rw-r--r--core/variant/variant.h10
-rw-r--r--core/variant/variant_call.cpp24
-rw-r--r--core/variant/variant_parser.cpp4
-rw-r--r--core/variant/variant_setget.cpp4
-rw-r--r--doc/classes/@GlobalScope.xml18
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/AnimationPlayer.xml5
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioEffectRecord.xml6
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamWAV.xml (renamed from doc/classes/AudioStreamSample.xml)10
-rw-r--r--doc/classes/CharacterBody3D.xml4
-rw-r--r--doc/classes/CollisionObject2D.xml7
-rw-r--r--doc/classes/CollisionObject3D.xml7
-rw-r--r--doc/classes/Decal.xml23
-rw-r--r--doc/classes/EditorFeatureProfile.xml2
-rw-r--r--doc/classes/EditorPaths.xml6
-rw-r--r--doc/classes/EditorProperty.xml7
-rw-r--r--doc/classes/EditorSettings.xml454
-rw-r--r--doc/classes/Engine.xml6
-rw-r--r--doc/classes/File.xml5
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/FontFile.xml2
-rw-r--r--doc/classes/Geometry2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml23
-rw-r--r--doc/classes/ImporterMesh.xml2
-rw-r--r--doc/classes/Input.xml4
-rw-r--r--doc/classes/Label3D.xml6
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml100
-rw-r--r--doc/classes/MultiplayerAPIExtension.xml141
-rw-r--r--doc/classes/MultiplayerPeer.xml11
-rw-r--r--doc/classes/MultiplayerSpawner.xml65
-rw-r--r--doc/classes/MultiplayerSynchronizer.xml69
-rw-r--r--doc/classes/NavigationRegion2D.xml2
-rw-r--r--doc/classes/NavigationRegion3D.xml2
-rw-r--r--doc/classes/NavigationServer3D.xml5
-rw-r--r--doc/classes/Node.xml22
-rw-r--r--doc/classes/OS.xml28
-rw-r--r--doc/classes/Object.xml6
-rw-r--r--doc/classes/ProjectSettings.xml42
-rw-r--r--doc/classes/Projection.xml8
-rw-r--r--doc/classes/Quaternion.xml20
-rw-r--r--doc/classes/RenderingServer.xml93
-rw-r--r--doc/classes/ResourceFormatSaver.xml4
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/ResourceSaver.xml6
-rw-r--r--doc/classes/ScriptExtension.xml4
-rw-r--r--doc/classes/ShapeCast2D.xml18
-rw-r--r--doc/classes/ShapeCast3D.xml168
-rw-r--r--doc/classes/Skeleton3D.xml4
-rw-r--r--doc/classes/SkeletonProfile.xml10
-rw-r--r--doc/classes/SkeletonProfileHumanoid.xml2
-rw-r--r--doc/classes/SpriteBase3D.xml2
-rw-r--r--doc/classes/SystemFont.xml44
-rw-r--r--doc/classes/TileSet.xml37
-rw-r--r--doc/classes/Transform2D.xml2
-rw-r--r--doc/classes/Transform3D.xml4
-rw-r--r--doc/classes/Vector4.xml107
-rw-r--r--doc/classes/Vector4i.xml10
-rw-r--r--doc/classes/Viewport.xml9
-rw-r--r--doc/classes/VoxelGIData.xml6
-rwxr-xr-xdoc/tools/make_rst.py33
-rw-r--r--doc/translations/ar.po138
-rw-r--r--doc/translations/ca.po128
-rw-r--r--doc/translations/classes.pot142
-rw-r--r--doc/translations/cs.po133
-rw-r--r--doc/translations/de.po295
-rw-r--r--doc/translations/el.po128
-rw-r--r--doc/translations/es.po153
-rw-r--r--doc/translations/fa.po130
-rw-r--r--doc/translations/fi.po128
-rw-r--r--doc/translations/fil.po128
-rw-r--r--doc/translations/fr.po1277
-rw-r--r--doc/translations/gl.po128
-rw-r--r--doc/translations/hi.po128
-rw-r--r--doc/translations/hu.po128
-rw-r--r--doc/translations/id.po137
-rw-r--r--doc/translations/is.po128
-rw-r--r--doc/translations/it.po156
-rw-r--r--doc/translations/ja.po141
-rw-r--r--doc/translations/ko.po128
-rw-r--r--doc/translations/lt.po128
-rw-r--r--doc/translations/lv.po128
-rw-r--r--doc/translations/mr.po128
-rw-r--r--doc/translations/nb.po128
-rw-r--r--doc/translations/ne.po128
-rw-r--r--doc/translations/nl.po128
-rw-r--r--doc/translations/pl.po140
-rw-r--r--doc/translations/pt.po136
-rw-r--r--doc/translations/pt_BR.po139
-rw-r--r--doc/translations/ro.po128
-rw-r--r--doc/translations/ru.po140
-rw-r--r--doc/translations/sk.po128
-rw-r--r--doc/translations/sr_Cyrl.po128
-rw-r--r--doc/translations/sv.po139
-rw-r--r--doc/translations/th.po128
-rw-r--r--doc/translations/tl.po128
-rw-r--r--doc/translations/tr.po148
-rw-r--r--doc/translations/uk.po128
-rw-r--r--doc/translations/vi.po133
-rw-r--r--doc/translations/zh_CN.po336
-rw-r--r--doc/translations/zh_TW.po128
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp12
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp636
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h219
-rw-r--r--drivers/gles3/shaders/canvas_uniforms_inc.glsl4
-rw-r--r--drivers/gles3/shaders/cubemap_filter.glsl88
-rw-r--r--drivers/gles3/shaders/scene.glsl8
-rw-r--r--drivers/gles3/shaders/sky.glsl4
-rw-r--r--drivers/gles3/storage/material_storage.cpp320
-rw-r--r--drivers/gles3/storage/material_storage.h48
-rw-r--r--drivers/gles3/storage/utilities.cpp2
-rw-r--r--drivers/png/resource_saver_png.cpp2
-rw-r--r--drivers/png/resource_saver_png.h2
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp28
-rw-r--r--drivers/vulkan/vulkan_context.cpp11
-rw-r--r--editor/SCsub3
-rw-r--r--editor/action_map_editor.cpp2
-rw-r--r--editor/animation_bezier_editor.cpp6
-rw-r--r--editor/animation_track_editor.cpp57
-rw-r--r--editor/animation_track_editor.h4
-rw-r--r--editor/audio_stream_preview.cpp1
-rw-r--r--editor/connections_dialog.cpp2
-rw-r--r--editor/connections_dialog.h2
-rw-r--r--editor/create_dialog.cpp7
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.cpp1
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.cpp1
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_server.cpp1
-rw-r--r--editor/debugger/editor_debugger_node.cpp20
-rw-r--r--editor/debugger/editor_debugger_tree.cpp33
-rw-r--r--editor/debugger/editor_debugger_tree.h2
-rw-r--r--editor/debugger/editor_visual_profiler.cpp2
-rw-r--r--editor/debugger/script_editor_debugger.cpp9
-rw-r--r--editor/dependency_editor.cpp1
-rw-r--r--editor/doc_tools.cpp21
-rw-r--r--editor/editor_asset_installer.cpp4
-rw-r--r--editor/editor_audio_buses.cpp15
-rw-r--r--editor/editor_build_profile.cpp14
-rw-r--r--editor/editor_command_palette.cpp9
-rw-r--r--editor/editor_data.cpp2
-rw-r--r--editor/editor_dir_dialog.cpp6
-rw-r--r--editor/editor_export.h532
-rw-r--r--editor/editor_feature_profile.cpp41
-rw-r--r--editor/editor_file_dialog.cpp10
-rw-r--r--editor/editor_file_system.cpp9
-rw-r--r--editor/editor_folding.cpp15
-rw-r--r--editor/editor_help.cpp2
-rw-r--r--editor/editor_help_search.cpp3
-rw-r--r--editor/editor_inspector.cpp234
-rw-r--r--editor/editor_inspector.h9
-rw-r--r--editor/editor_log.cpp9
-rw-r--r--editor/editor_log.h2
-rw-r--r--editor/editor_node.cpp104
-rw-r--r--editor/editor_node.h5
-rw-r--r--editor/editor_paths.cpp43
-rw-r--r--editor/editor_paths.h10
-rw-r--r--editor/editor_plugin.cpp2
-rw-r--r--editor/editor_plugin_settings.cpp1
-rw-r--r--editor/editor_plugin_settings.h4
-rw-r--r--editor/editor_properties.cpp58
-rw-r--r--editor/editor_properties.h1
-rw-r--r--editor/editor_properties_array_dict.cpp10
-rw-r--r--editor/editor_properties_array_dict.h37
-rw-r--r--editor/editor_resource_picker.cpp3
-rw-r--r--editor/editor_resource_preview.cpp4
-rw-r--r--editor/editor_run_native.cpp7
-rw-r--r--editor/editor_settings.cpp79
-rw-r--r--editor/editor_settings.h10
-rw-r--r--editor/editor_themes.cpp39
-rw-r--r--editor/editor_toaster.cpp10
-rw-r--r--editor/export/SCsub5
-rw-r--r--editor/export/editor_export.cpp355
-rw-r--r--editor/export/editor_export.h84
-rw-r--r--editor/export/editor_export_platform.cpp (renamed from editor/editor_export.cpp)912
-rw-r--r--editor/export/editor_export_platform.h221
-rw-r--r--editor/export/editor_export_platform_pc.cpp242
-rw-r--r--editor/export/editor_export_platform_pc.h82
-rw-r--r--editor/export/editor_export_plugin.cpp201
-rw-r--r--editor/export/editor_export_plugin.h132
-rw-r--r--editor/export/editor_export_preset.cpp221
-rw-r--r--editor/export/editor_export_preset.h145
-rw-r--r--editor/export/editor_export_shared_object.h51
-rw-r--r--editor/export/export_template_manager.cpp (renamed from editor/export_template_manager.cpp)29
-rw-r--r--editor/export/export_template_manager.h (renamed from editor/export_template_manager.h)12
-rw-r--r--editor/export/project_export.cpp (renamed from editor/project_export.cpp)20
-rw-r--r--editor/export/project_export.h (renamed from editor/project_export.h)32
-rw-r--r--editor/filesystem_dock.cpp8
-rw-r--r--editor/groups_editor.cpp4
-rw-r--r--editor/icons/AudioStreamOggVorbis.svg (renamed from editor/icons/AudioStreamOGGVorbis.svg)0
-rw-r--r--editor/icons/AudioStreamWAV.svg (renamed from editor/icons/AudioStreamSample.svg)0
-rw-r--r--editor/icons/FontFile.svg2
-rw-r--r--editor/icons/FontVariation.svg2
-rw-r--r--editor/icons/ShapeCast3D.svg1
-rw-r--r--editor/icons/SystemFont.svg1
-rw-r--r--editor/import/post_import_plugin_skeleton_renamer.cpp22
-rw-r--r--editor/import/post_import_plugin_skeleton_rest_fixer.cpp95
-rw-r--r--editor/import/post_import_plugin_skeleton_track_organizer.cpp127
-rw-r--r--editor/import/post_import_plugin_skeleton_track_organizer.h46
-rw-r--r--editor/import/resource_importer_bitmask.cpp2
-rw-r--r--editor/import/resource_importer_bmfont.cpp2
-rw-r--r--editor/import/resource_importer_csv_translation.cpp2
-rw-r--r--editor/import/resource_importer_dynamic_font.cpp2
-rw-r--r--editor/import/resource_importer_imagefont.cpp2
-rw-r--r--editor/import/resource_importer_obj.cpp2
-rw-r--r--editor/import/resource_importer_scene.cpp251
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_shader_file.cpp2
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp4
-rw-r--r--editor/import/resource_importer_wav.cpp28
-rw-r--r--editor/import/scene_import_settings.cpp5
-rw-r--r--editor/import_defaults_editor.cpp1
-rw-r--r--editor/import_dock.cpp1
-rw-r--r--editor/inspector_dock.cpp40
-rw-r--r--editor/inspector_dock.h6
-rw-r--r--editor/plugin_config_dialog.cpp4
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp8
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp9
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h2
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp11
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.h2
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp21
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h1
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp11
-rw-r--r--editor/plugins/animation_state_machine_editor.h1
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h1
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp14
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp65
-rw-r--r--editor/plugins/bone_map_editor_plugin.h1
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp44
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h4
-rw-r--r--editor/plugins/control_editor_plugin.cpp2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp5
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp1
-rw-r--r--editor/plugins/editor_preview_plugins.cpp6
-rw-r--r--editor/plugins/editor_resource_conversion_plugin.cpp (renamed from core/multiplayer/multiplayer.h)70
-rw-r--r--editor/plugins/editor_resource_conversion_plugin.h54
-rw-r--r--editor/plugins/font_config_plugin.cpp140
-rw-r--r--editor/plugins/font_config_plugin.h31
-rw-r--r--editor/plugins/gdextension_export_plugin.h2
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp3
-rw-r--r--editor/plugins/material_editor_plugin.cpp17
-rw-r--r--editor/plugins/material_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp4
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp268
-rw-r--r--editor/plugins/node_3d_editor_gizmos.h12
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp298
-rw-r--r--editor/plugins/node_3d_editor_plugin.h27
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp10
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp7
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp14
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/script_editor_plugin.cpp41
-rw-r--r--editor/plugins/script_text_editor.cpp4
-rw-r--r--editor/plugins/shader_editor_plugin.cpp21
-rw-r--r--editor/plugins/shader_file_editor_plugin.cpp3
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp12
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp18
-rw-r--r--editor/plugins/text_editor.cpp3
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp6
-rw-r--r--editor/plugins/theme_editor_plugin.cpp67
-rw-r--r--editor/plugins/theme_editor_preview.cpp1
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp2
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.cpp6
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp27
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp4
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp16
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.h3
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp62
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h1
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp2
-rw-r--r--editor/project_converter_3_to_4.cpp8
-rw-r--r--editor/project_manager.cpp20
-rw-r--r--editor/project_settings_editor.cpp30
-rw-r--r--editor/project_settings_editor.h4
-rw-r--r--editor/property_editor.cpp43
-rw-r--r--editor/property_editor.h16
-rw-r--r--editor/rename_dialog.cpp19
-rw-r--r--editor/scene_tree_dock.cpp81
-rw-r--r--editor/scene_tree_editor.cpp12
-rw-r--r--editor/script_create_dialog.cpp11
-rw-r--r--editor/shader_create_dialog.cpp4
-rw-r--r--editor/shader_globals_editor.cpp38
-rw-r--r--editor/translations/af.po22
-rw-r--r--editor/translations/ar.po393
-rw-r--r--editor/translations/az.po22
-rw-r--r--editor/translations/bg.po22
-rw-r--r--editor/translations/bn.po22
-rw-r--r--editor/translations/br.po22
-rw-r--r--editor/translations/ca.po22
-rw-r--r--editor/translations/cs.po22
-rw-r--r--editor/translations/da.po22
-rw-r--r--editor/translations/de.po32
-rw-r--r--editor/translations/editor.pot21
-rw-r--r--editor/translations/el.po22
-rw-r--r--editor/translations/en_Shaw.po22
-rw-r--r--editor/translations/eo.po22
-rw-r--r--editor/translations/es.po2327
-rw-r--r--editor/translations/es_AR.po106
-rw-r--r--editor/translations/et.po22
-rw-r--r--editor/translations/eu.po22
-rw-r--r--editor/translations/fa.po22
-rw-r--r--editor/translations/fi.po22
-rw-r--r--editor/translations/fil.po22
-rw-r--r--editor/translations/fr.po22
-rw-r--r--editor/translations/ga.po22
-rw-r--r--editor/translations/gl.po22
-rw-r--r--editor/translations/he.po22
-rw-r--r--editor/translations/hi.po22
-rw-r--r--editor/translations/hr.po90
-rw-r--r--editor/translations/hu.po22
-rw-r--r--editor/translations/id.po31
-rw-r--r--editor/translations/is.po22
-rw-r--r--editor/translations/it.po71
-rw-r--r--editor/translations/ja.po22
-rw-r--r--editor/translations/ka.po22
-rw-r--r--editor/translations/km.po22
-rw-r--r--editor/translations/ko.po22
-rw-r--r--editor/translations/lt.po22
-rw-r--r--editor/translations/lv.po22
-rw-r--r--editor/translations/mk.po60
-rw-r--r--editor/translations/ml.po22
-rw-r--r--editor/translations/mr.po22
-rw-r--r--editor/translations/ms.po22
-rw-r--r--editor/translations/nb.po22
-rw-r--r--editor/translations/nl.po22
-rw-r--r--editor/translations/pl.po22
-rw-r--r--editor/translations/pr.po22
-rw-r--r--editor/translations/pt.po30
-rw-r--r--editor/translations/pt_BR.po1870
-rw-r--r--editor/translations/ro.po22
-rw-r--r--editor/translations/ru.po272
-rw-r--r--editor/translations/si.po22
-rw-r--r--editor/translations/sk.po22
-rw-r--r--editor/translations/sl.po22
-rw-r--r--editor/translations/sq.po22
-rw-r--r--editor/translations/sr_Cyrl.po22
-rw-r--r--editor/translations/sr_Latn.po22
-rw-r--r--editor/translations/sv.po422
-rw-r--r--editor/translations/te.po22
-rw-r--r--editor/translations/th.po22
-rw-r--r--editor/translations/tl.po22
-rw-r--r--editor/translations/tr.po318
-rw-r--r--editor/translations/uk.po30
-rw-r--r--editor/translations/ur_PK.po22
-rw-r--r--editor/translations/vi.po22
-rw-r--r--editor/translations/zh_CN.po34
-rw-r--r--editor/translations/zh_HK.po22
-rw-r--r--editor/translations/zh_TW.po27
-rw-r--r--main/main.cpp58
-rw-r--r--main/performance.cpp2
-rwxr-xr-xmisc/scripts/file_format.sh2
-rwxr-xr-xmisc/scripts/install_vulkan_sdk_macos.sh2
-rw-r--r--modules/csg/csg_shape.cpp6
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp38
-rw-r--r--modules/enet/enet_multiplayer_peer.cpp6
-rw-r--r--modules/enet/enet_multiplayer_peer.h2
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.cpp10
-rw-r--r--modules/gdscript/gdscript.cpp38
-rw-r--r--modules/gdscript/gdscript.h8
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp4
-rw-r--r--modules/gdscript/gdscript_byte_codegen.h2
-rw-r--r--modules/gdscript/gdscript_codegen.h3
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/gdscript/gdscript_editor.cpp15
-rw-r--r--modules/gdscript/gdscript_function.h4
-rw-r--r--modules/gdscript/gdscript_parser.cpp48
-rw-r--r--modules/gdscript/gdscript_parser.h6
-rw-r--r--modules/gdscript/gdscript_rpc_callable.cpp6
-rw-r--r--modules/gdscript/gdscript_rpc_callable.h2
-rw-r--r--modules/gdscript/gdscript_utility_functions.cpp1
-rw-r--r--modules/gdscript/gdscript_vm.cpp3
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.cpp4
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp1
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.cpp1
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp5
-rw-r--r--modules/gdscript/register_types.cpp2
-rw-r--r--modules/gltf/gltf_document.cpp3
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp8
-rw-r--r--modules/minimp3/resource_importer_mp3.cpp2
-rw-r--r--modules/mono/csharp_script.cpp41
-rw-r--r--modules/mono/csharp_script.h10
-rw-r--r--modules/mono/editor/editor_internal_calls.cpp4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs10
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs10
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs820
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs6
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs12
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs6
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs730
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4i.cs702
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj3
-rw-r--r--modules/mono/glue/callable_glue.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h2
-rw-r--r--modules/mono/signal_awaiter_utils.cpp2
-rw-r--r--modules/msdfgen/SCsub2
-rw-r--r--modules/multiplayer/SCsub14
-rw-r--r--modules/multiplayer/config.py19
-rw-r--r--modules/multiplayer/doc_classes/MultiplayerSpawner.xml84
-rw-r--r--modules/multiplayer/doc_classes/MultiplayerSynchronizer.xml93
-rw-r--r--modules/multiplayer/doc_classes/SceneMultiplayer.xml55
-rw-r--r--modules/multiplayer/doc_classes/SceneReplicationConfig.xml (renamed from doc/classes/SceneReplicationConfig.xml)12
-rw-r--r--modules/multiplayer/editor/replication_editor_plugin.cpp (renamed from editor/plugins/replication_editor_plugin.cpp)6
-rw-r--r--modules/multiplayer/editor/replication_editor_plugin.h (renamed from editor/plugins/replication_editor_plugin.h)16
-rw-r--r--modules/multiplayer/multiplayer_spawner.cpp (renamed from scene/multiplayer/multiplayer_spawner.cpp)25
-rw-r--r--modules/multiplayer/multiplayer_spawner.h (renamed from scene/multiplayer/multiplayer_spawner.h)9
-rw-r--r--modules/multiplayer/multiplayer_synchronizer.cpp (renamed from scene/multiplayer/multiplayer_synchronizer.cpp)12
-rw-r--r--modules/multiplayer/multiplayer_synchronizer.h (renamed from scene/multiplayer/multiplayer_synchronizer.h)2
-rw-r--r--modules/multiplayer/register_types.cpp60
-rw-r--r--modules/multiplayer/register_types.h39
-rw-r--r--modules/multiplayer/scene_cache_interface.cpp (renamed from scene/multiplayer/scene_cache_interface.cpp)19
-rw-r--r--modules/multiplayer/scene_cache_interface.h (renamed from scene/multiplayer/scene_cache_interface.h)31
-rw-r--r--modules/multiplayer/scene_multiplayer.cpp332
-rw-r--r--modules/multiplayer/scene_multiplayer.h136
-rw-r--r--modules/multiplayer/scene_replication_config.cpp (renamed from scene/resources/scene_replication_config.cpp)2
-rw-r--r--modules/multiplayer/scene_replication_config.h (renamed from scene/resources/scene_replication_config.h)0
-rw-r--r--modules/multiplayer/scene_replication_interface.cpp (renamed from scene/multiplayer/scene_replication_interface.cpp)43
-rw-r--r--modules/multiplayer/scene_replication_interface.h (renamed from scene/multiplayer/scene_replication_interface.h)37
-rw-r--r--modules/multiplayer/scene_replication_state.cpp (renamed from scene/multiplayer/scene_replication_state.cpp)10
-rw-r--r--modules/multiplayer/scene_replication_state.h (renamed from scene/multiplayer/scene_replication_state.h)3
-rw-r--r--modules/multiplayer/scene_rpc_interface.cpp (renamed from scene/multiplayer/scene_rpc_interface.cpp)158
-rw-r--r--modules/multiplayer/scene_rpc_interface.h (renamed from scene/multiplayer/scene_rpc_interface.h)73
-rw-r--r--modules/navigation/godot_navigation_server.cpp20
-rw-r--r--modules/navigation/godot_navigation_server.h2
-rw-r--r--modules/navigation/nav_map.cpp74
-rw-r--r--modules/navigation/nav_map.h14
-rw-r--r--modules/navigation/nav_region.h4
-rw-r--r--modules/navigation/nav_utils.h8
-rw-r--r--modules/ogg/config.py4
-rw-r--r--modules/ogg/doc_classes/OggPacketSequence.xml (renamed from modules/ogg/doc_classes/OGGPacketSequence.xml)8
-rw-r--r--modules/ogg/doc_classes/OggPacketSequencePlayback.xml (renamed from modules/ogg/doc_classes/OGGPacketSequencePlayback.xml)2
-rw-r--r--modules/ogg/ogg_packet_sequence.cpp50
-rw-r--r--modules/ogg/ogg_packet_sequence.h28
-rw-r--r--modules/ogg/register_types.cpp4
-rw-r--r--modules/openxr/action_map/openxr_interaction_profile.cpp2
-rw-r--r--modules/openxr/doc_classes/OpenXRIPBinding.xml2
-rw-r--r--modules/openxr/editor/openxr_action_map_editor.cpp2
-rw-r--r--modules/openxr/editor/openxr_interaction_profile_editor.cpp9
-rw-r--r--modules/openxr/editor/openxr_select_action_dialog.cpp4
-rw-r--r--modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp4
-rw-r--r--modules/openxr/openxr_api.cpp15
-rw-r--r--modules/openxr/openxr_interface.cpp2
-rw-r--r--modules/regex/regex.cpp4
-rw-r--r--modules/regex/tests/test_regex.h10
-rw-r--r--modules/text_server_adv/SCsub24
-rw-r--r--modules/text_server_adv/text_server_adv.cpp18
-rw-r--r--modules/text_server_fb/SCsub4
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp40
-rw-r--r--modules/visual_script/editor/visual_script_property_selector.cpp1
-rw-r--r--modules/visual_script/editor/visual_script_property_selector.h2
-rw-r--r--modules/visual_script/visual_script.cpp37
-rw-r--r--modules/visual_script/visual_script.h6
-rw-r--r--modules/visual_script/visual_script_nodes.cpp10
-rw-r--r--modules/visual_script/visual_script_nodes.h7
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp94
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h34
-rw-r--r--modules/vorbis/config.py4
-rw-r--r--modules/vorbis/doc_classes/AudioStreamOggVorbis.xml (renamed from modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml)6
-rw-r--r--modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml (renamed from modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml)2
-rw-r--r--modules/vorbis/register_types.cpp6
-rw-r--r--modules/vorbis/resource_importer_ogg_vorbis.cpp62
-rw-r--r--modules/vorbis/resource_importer_ogg_vorbis.h8
-rw-r--r--modules/webp/resource_saver_webp.cpp2
-rw-r--r--modules/webp/resource_saver_webp.h2
-rw-r--r--modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml2
-rw-r--r--modules/webrtc/webrtc_multiplayer_peer.cpp12
-rw-r--r--modules/webrtc/webrtc_multiplayer_peer.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h2
-rw-r--r--platform/android/display_server_android.cpp6
-rw-r--r--platform/android/export/export.cpp4
-rw-r--r--platform/android/export/export_plugin.cpp6
-rw-r--r--platform/android/export/export_plugin.h6
-rw-r--r--platform/android/export/gradle_export_util.h2
-rw-r--r--platform/android/file_access_filesystem_jandroid.cpp6
-rw-r--r--platform/ios/display_server_ios.mm2
-rw-r--r--platform/ios/export/export.cpp1
-rw-r--r--platform/ios/export/export_plugin.cpp7
-rw-r--r--platform/ios/export/export_plugin.h10
-rw-r--r--platform/ios/os_ios.h3
-rw-r--r--platform/ios/os_ios.mm75
-rw-r--r--platform/javascript/display_server_javascript.cpp10
-rw-r--r--platform/javascript/export/export.cpp1
-rw-r--r--platform/javascript/export/export_plugin.cpp3
-rw-r--r--platform/javascript/export/export_plugin.h6
-rw-r--r--platform/javascript/export/export_server.h1
-rw-r--r--platform/javascript/godot_js.h1
-rw-r--r--platform/javascript/javascript_singleton.cpp2
-rw-r--r--platform/javascript/js/libs/library_godot_input.js9
-rw-r--r--platform/javascript/os_javascript.cpp4
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/linuxbsd/SCsub6
-rw-r--r--platform/linuxbsd/dbus-so_wrap.c2641
-rw-r--r--platform/linuxbsd/dbus-so_wrap.h970
-rw-r--r--platform/linuxbsd/detect.py12
-rw-r--r--platform/linuxbsd/display_server_x11.cpp12
-rw-r--r--platform/linuxbsd/export/export.cpp3
-rw-r--r--platform/linuxbsd/export/export_plugin.cpp22
-rw-r--r--platform/linuxbsd/export/export_plugin.h4
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.c2091
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.h770
-rw-r--r--platform/linuxbsd/freedesktop_screensaver.cpp11
-rw-r--r--platform/linuxbsd/freedesktop_screensaver.h3
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp105
-rw-r--r--platform/linuxbsd/os_linuxbsd.h7
-rw-r--r--platform/macos/display_server_macos.mm14
-rw-r--r--platform/macos/export/export_plugin.cpp20
-rw-r--r--platform/macos/export/export_plugin.h6
-rw-r--r--platform/macos/godot_content_view.mm2
-rw-r--r--platform/macos/godot_window_delegate.mm4
-rw-r--r--platform/macos/os_macos.h2
-rw-r--r--platform/macos/os_macos.mm74
-rw-r--r--platform/uwp/export/app_packager.h2
-rw-r--r--platform/uwp/export/export.cpp1
-rw-r--r--platform/uwp/export/export_plugin.cpp68
-rw-r--r--platform/uwp/export/export_plugin.h16
-rw-r--r--platform/windows/detect.py2
-rw-r--r--platform/windows/display_server_windows.cpp12
-rw-r--r--platform/windows/export/export.cpp1
-rw-r--r--platform/windows/export/export_plugin.cpp9
-rw-r--r--platform/windows/export/export_plugin.h2
-rw-r--r--platform/windows/godot.natvis4
-rw-r--r--platform/windows/os_windows.cpp130
-rw-r--r--platform/windows/os_windows.h23
-rw-r--r--scene/2d/area_2d.cpp8
-rw-r--r--scene/2d/camera_2d.cpp4
-rw-r--r--scene/2d/navigation_region_2d.cpp30
-rw-r--r--scene/2d/physics_body_2d.cpp4
-rw-r--r--scene/2d/ray_cast_2d.cpp2
-rw-r--r--scene/2d/shape_cast_2d.cpp2
-rw-r--r--scene/2d/touch_screen_button.cpp4
-rw-r--r--scene/3d/area_3d.cpp8
-rw-r--r--scene/3d/collision_object_3d.cpp8
-rw-r--r--scene/3d/decal.cpp9
-rw-r--r--scene/3d/decal.h4
-rw-r--r--scene/3d/gpu_particles_3d.cpp2
-rw-r--r--scene/3d/joint_3d.cpp116
-rw-r--r--scene/3d/lightmap_gi.cpp2
-rw-r--r--scene/3d/navigation_region_3d.cpp339
-rw-r--r--scene/3d/navigation_region_3d.h13
-rw-r--r--scene/3d/node_3d.cpp4
-rw-r--r--scene/3d/occluder_instance_3d.cpp2
-rw-r--r--scene/3d/path_3d.cpp2
-rw-r--r--scene/3d/physics_body_3d.cpp4
-rw-r--r--scene/3d/shape_cast_3d.cpp634
-rw-r--r--scene/3d/shape_cast_3d.h142
-rw-r--r--scene/3d/skeleton_3d.cpp22
-rw-r--r--scene/3d/skeleton_3d.h4
-rw-r--r--scene/3d/visual_instance_3d.cpp9
-rw-r--r--scene/3d/voxel_gi.h4
-rw-r--r--scene/SCsub1
-rw-r--r--scene/animation/animation_blend_space_1d.cpp4
-rw-r--r--scene/animation/animation_blend_space_2d.cpp4
-rw-r--r--scene/animation/animation_blend_tree.cpp6
-rw-r--r--scene/animation/animation_node_state_machine.cpp34
-rw-r--r--scene/animation/animation_node_state_machine.h2
-rw-r--r--scene/animation/animation_player.cpp61
-rw-r--r--scene/animation/animation_player.h6
-rw-r--r--scene/animation/animation_tree.cpp44
-rw-r--r--scene/animation/animation_tree.h2
-rw-r--r--scene/animation/tween.cpp4
-rw-r--r--scene/debugger/scene_debugger.cpp2
-rw-r--r--scene/gui/color_picker.cpp24
-rw-r--r--scene/gui/control.cpp2897
-rw-r--r--scene/gui/control.h323
-rw-r--r--scene/gui/dialogs.cpp2
-rw-r--r--scene/gui/file_dialog.cpp6
-rw-r--r--scene/gui/graph_edit.cpp21
-rw-r--r--scene/gui/graph_edit.h2
-rw-r--r--scene/gui/label.cpp2
-rw-r--r--scene/gui/menu_button.cpp4
-rw-r--r--scene/gui/option_button.cpp2
-rw-r--r--scene/gui/scroll_bar.cpp4
-rw-r--r--scene/gui/spin_box.cpp6
-rw-r--r--scene/gui/text_edit.cpp10
-rw-r--r--scene/gui/view_panner.cpp2
-rw-r--r--scene/main/canvas_item.cpp12
-rw-r--r--scene/main/canvas_item.h1
-rw-r--r--scene/main/multiplayer_api.cpp416
-rw-r--r--scene/main/multiplayer_api.h115
-rw-r--r--scene/main/multiplayer_peer.cpp (renamed from core/multiplayer/multiplayer_peer.cpp)14
-rw-r--r--scene/main/multiplayer_peer.h (renamed from core/multiplayer/multiplayer_peer.h)19
-rw-r--r--scene/main/node.cpp88
-rw-r--r--scene/main/node.h30
-rw-r--r--scene/main/scene_tree.cpp18
-rw-r--r--scene/main/shader_globals_override.cpp14
-rw-r--r--scene/main/viewport.cpp36
-rw-r--r--scene/main/viewport.h6
-rw-r--r--scene/main/window.cpp2
-rw-r--r--scene/multiplayer/SCsub5
-rw-r--r--scene/register_scene_types.cpp29
-rw-r--r--scene/resources/animation.cpp60
-rw-r--r--scene/resources/animation.h2
-rw-r--r--scene/resources/audio_stream_wav.cpp (renamed from scene/resources/audio_stream_sample.cpp)168
-rw-r--r--scene/resources/audio_stream_wav.h (renamed from scene/resources/audio_stream_sample.h)34
-rw-r--r--scene/resources/font.cpp387
-rw-r--r--scene/resources/font.h72
-rw-r--r--scene/resources/label_settings.cpp2
-rw-r--r--scene/resources/material.cpp23
-rw-r--r--scene/resources/mesh.cpp66
-rw-r--r--scene/resources/mesh.h3
-rw-r--r--scene/resources/navigation_mesh.cpp101
-rw-r--r--scene/resources/navigation_mesh.h4
-rw-r--r--scene/resources/packed_scene.cpp8
-rw-r--r--scene/resources/resource_format_text.cpp2
-rw-r--r--scene/resources/resource_format_text.h2
-rw-r--r--scene/resources/separation_ray_shape_2d.cpp2
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader.h2
-rw-r--r--scene/resources/shader_include.cpp2
-rw-r--r--scene/resources/shader_include.h2
-rw-r--r--scene/resources/skeleton_profile.cpp44
-rw-r--r--scene/resources/skeleton_profile.h9
-rw-r--r--scene/resources/texture.cpp6
-rw-r--r--scene/resources/theme.cpp8
-rw-r--r--scene/resources/tile_set.cpp33
-rw-r--r--scene/resources/tile_set.h8
-rw-r--r--scene/resources/visual_shader.cpp8
-rw-r--r--servers/audio/effects/audio_effect_record.cpp20
-rw-r--r--servers/audio/effects/audio_effect_record.h10
-rw-r--r--servers/audio_server.cpp2
-rw-r--r--servers/audio_server.h2
-rw-r--r--servers/display_server.cpp4
-rw-r--r--servers/movie_writer/movie_writer.cpp26
-rw-r--r--servers/navigation_server_3d.cpp257
-rw-r--r--servers/navigation_server_3d.h62
-rw-r--r--servers/physics_2d/godot_area_2d.cpp4
-rw-r--r--servers/physics_2d/godot_body_2d.cpp4
-rw-r--r--servers/physics_3d/godot_area_3d.cpp4
-rw-r--r--servers/physics_3d/godot_body_3d.cpp2
-rw-r--r--servers/rendering/dummy/rasterizer_scene_dummy.h75
-rw-r--r--servers/rendering/dummy/storage/material_storage.h26
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp8
-rw-r--r--servers/rendering/renderer_compositor.cpp7
-rw-r--r--servers/rendering/renderer_geometry_instance.cpp138
-rw-r--r--servers/rendering/renderer_geometry_instance.h150
-rw-r--r--servers/rendering/renderer_rd/environment/fog.cpp73
-rw-r--r--servers/rendering/renderer_rd/environment/fog.h3
-rw-r--r--servers/rendering/renderer_rd/environment/gi.cpp60
-rw-r--r--servers/rendering/renderer_rd/environment/gi.h19
-rw-r--r--servers/rendering/renderer_rd/environment/sky.cpp93
-rw-r--r--servers/rendering/renderer_rd/environment/sky.h11
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp265
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h113
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp4
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp284
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h102
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp4
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp6
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp130
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_environment_rd.h167
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp492
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.h98
-rw-r--r--servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/environment/sky.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/particles.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_clustered_inc.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl4
-rw-r--r--servers/rendering/renderer_rd/storage_rd/material_storage.cpp304
-rw-r--r--servers/rendering/renderer_rd/storage_rd/material_storage.h48
-rw-r--r--servers/rendering/renderer_rd/storage_rd/particles_storage.cpp4
-rw-r--r--servers/rendering/renderer_rd/storage_rd/texture_storage.cpp3
-rw-r--r--servers/rendering/renderer_rd/storage_rd/texture_storage.h4
-rw-r--r--servers/rendering/renderer_rd/storage_rd/utilities.cpp10
-rw-r--r--servers/rendering/renderer_scene.h132
-rw-r--r--servers/rendering/renderer_scene_cull.cpp106
-rw-r--r--servers/rendering/renderer_scene_cull.h151
-rw-r--r--servers/rendering/renderer_scene_render.cpp461
-rw-r--r--servers/rendering/renderer_scene_render.h214
-rw-r--r--servers/rendering/renderer_viewport.cpp6
-rw-r--r--servers/rendering/renderer_viewport.h41
-rw-r--r--servers/rendering/rendering_server_default.cpp2
-rw-r--r--servers/rendering/rendering_server_default.h22
-rw-r--r--servers/rendering/shader_compiler.cpp16
-rw-r--r--servers/rendering/shader_language.cpp23
-rw-r--r--servers/rendering/shader_language.h6
-rw-r--r--servers/rendering/storage/environment_storage.cpp769
-rw-r--r--servers/rendering/storage/environment_storage.h296
-rw-r--r--servers/rendering/storage/material_storage.h32
-rw-r--r--servers/rendering_server.cpp41
-rw-r--r--servers/rendering_server.h28
-rw-r--r--servers/xr_server.cpp10
-rw-r--r--servers/xr_server.h11
-rw-r--r--tests/core/io/test_file_access.h23
-rw-r--r--tests/core/io/test_resource.h4
-rw-r--r--tests/core/object/test_object.h4
-rw-r--r--tests/core/os/test_os.h158
-rw-r--r--tests/core/string/test_string.h14
-rw-r--r--tests/data/line_endings_cr.test.txt1
-rw-r--r--tests/data/line_endings_crlf.test.txt4
-rw-r--r--tests/data/line_endings_lf.test.txt4
-rw-r--r--tests/test_macros.h10
-rw-r--r--tests/test_main.cpp5
748 files changed, 34381 insertions, 15083 deletions
diff --git a/.gitattributes b/.gitattributes
index 45ea6c25e8..8d2fb108ba 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -7,6 +7,8 @@ thirdparty/* linguist-vendored
* text=auto eol=lf
# Except for bat files, which are Windows only files
*.bat eol=crlf
+# And some test files where the EOL matters
+*.test.txt -text
# The above only works properly for Git 2.10+, so for older versions
# we need to manually list the binary files we don't want modified.
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 56c41aa749..8c716242e4 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -19,30 +19,15 @@ jobs:
fail-fast: false
matrix:
include:
-# Temporarily disabled until Mono is fixed
-#
-# - name: Editor w Mono (target=release_debug, tools=yes, tests=yes)
-# cache-name: linux-editor-mono
-# target: release_debug
-# tools: true
-# tests: false # Disabled due freeze caused by mix Mono build and CI
-# sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no
-# doc-test: true
-# bin: "./bin/godot.linuxbsd.opt.tools.64.mono"
-# build-mono: true
-# proj-conv: true
-# artifact: true
-
-# Temporary replacement:
-
- - name: Editor w/o Mono (target=release_debug, tools=yes, tests=yes)
+ - name: Editor w Mono (target=release_debug, tools=yes, tests=yes)
cache-name: linux-editor-mono
target: release_debug
tools: true
tests: false # Disabled due freeze caused by mix Mono build and CI
+ sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no
doc-test: true
- bin: "./bin/godot.linuxbsd.opt.tools.64"
- build-mono: false
+ bin: "./bin/godot.linuxbsd.opt.tools.64.mono"
+ build-mono: true
proj-conv: true
artifact: true
@@ -72,24 +57,12 @@ jobs:
# Skip 2GiB artifact speeding up action.
artifact: false
-# Temporarily disabled:
-#
-# - name: Template w/ Mono (target=release, tools=no)
-# cache-name: linux-template-mono
-# target: release
-# tools: false
-# tests: false
-# sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no
-# build-mono: false
-# artifact: true
-
-# Temporary replacement:
-
- - name: Template w/o Mono (target=release, tools=no)
+ - name: Template w/ Mono (target=release, tools=no)
cache-name: linux-template-mono
target: release
tools: false
tests: false
+ sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no
build-mono: false
artifact: true
@@ -115,7 +88,7 @@ jobs:
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip \
- llvm libspeechd-dev speech-dispatcher
+ llvm libspeechd-dev speech-dispatcher fontconfig libfontconfig-dev
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
@@ -246,6 +219,7 @@ jobs:
if: ${{ matrix.artifact }}
run: |
strip bin/godot.*
+ chmod +x bin/godot.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index 0cb037bfae..0ad0995bb7 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -5,7 +5,7 @@ on: [push, pull_request]
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master-v3
- SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes use_volk=yes
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
@@ -45,6 +45,10 @@ jobs:
- name: Setup python and scons
uses: ./.github/actions/godot-deps
+ - name: Setup Vulkan SDK
+ run: |
+ sh misc/scripts/install_vulkan_sdk_macos.sh
+
- name: Compilation
uses: ./.github/actions/godot-build
with:
@@ -65,6 +69,7 @@ jobs:
- name: Prepare artifact
run: |
strip bin/godot.*
+ chmod +x bin/godot.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
diff --git a/core/SCsub b/core/SCsub
index 97080b8710..d4462fa546 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -188,7 +188,6 @@ SConscript("os/SCsub")
SConscript("math/SCsub")
SConscript("crypto/SCsub")
SConscript("io/SCsub")
-SConscript("multiplayer/SCsub")
SConscript("debugger/SCsub")
SConscript("input/SCsub")
SConscript("variant/SCsub")
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 782d369ae6..44ad4961d9 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -246,6 +246,14 @@ void Engine::get_singletons(List<Singleton> *p_singletons) {
}
}
+String Engine::get_write_movie_path() const {
+ return write_movie_path;
+}
+
+void Engine::set_write_movie_path(const String &p_path) {
+ write_movie_path = p_path;
+}
+
void Engine::set_shader_cache_path(const String &p_path) {
shader_cache_path = p_path;
}
diff --git a/core/config/engine.h b/core/config/engine.h
index 82e3ee5487..68562643e7 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -76,6 +76,7 @@ private:
static Engine *singleton;
+ String write_movie_path;
String shader_cache_path;
public:
@@ -138,6 +139,9 @@ public:
Dictionary get_license_info() const;
String get_license_text() const;
+ void set_write_movie_path(const String &p_path);
+ String get_write_movie_path() const;
+
void set_shader_cache_path(const String &p_path);
String get_shader_cache_path() const;
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index cb57cd7057..79c80cf7d1 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -46,8 +46,8 @@ namespace core_bind {
ResourceLoader *ResourceLoader::singleton = nullptr;
-Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) {
- return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads);
+Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, CacheMode p_cache_mode) {
+ return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads, ResourceFormatLoader::CacheMode(p_cache_mode));
}
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) {
@@ -121,7 +121,7 @@ ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) {
}
void ResourceLoader::_bind_methods() {
- ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads", "cache_mode"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false), DEFVAL(CACHE_MODE_REUSE));
ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &ResourceLoader::load_threaded_get);
@@ -147,9 +147,9 @@ void ResourceLoader::_bind_methods() {
////// ResourceSaver //////
-Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, BitField<SaverFlags> p_flags) {
- ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + String(p_path) + "'.");
- return ::ResourceSaver::save(p_path, p_resource, p_flags);
+Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path, BitField<SaverFlags> p_flags) {
+ ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + p_path + "'.");
+ return ::ResourceSaver::save(p_resource, p_path, p_flags);
}
Vector<String> ResourceSaver::get_recognized_extensions(const Ref<Resource> &p_resource) {
@@ -174,7 +174,7 @@ void ResourceSaver::remove_resource_format_saver(Ref<ResourceFormatSaver> p_form
ResourceSaver *ResourceSaver::singleton = nullptr;
void ResourceSaver::_bind_methods() {
- ClassDB::bind_method(D_METHOD("save", "path", "resource", "flags"), &ResourceSaver::save, DEFVAL((uint32_t)FLAG_NONE));
+ ClassDB::bind_method(D_METHOD("save", "resource", "path", "flags"), &ResourceSaver::save, DEFVAL(""), DEFVAL((uint32_t)FLAG_NONE));
ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type"), &ResourceSaver::get_recognized_extensions);
ClassDB::bind_method(D_METHOD("add_resource_format_saver", "format_saver", "at_front"), &ResourceSaver::add_resource_format_saver, DEFVAL(false));
ClassDB::bind_method(D_METHOD("remove_resource_format_saver", "format_saver"), &ResourceSaver::remove_resource_format_saver);
@@ -231,6 +231,14 @@ void OS::crash(const String &p_message) {
CRASH_NOW_MSG(p_message);
}
+Vector<String> OS::get_system_fonts() const {
+ return ::OS::get_singleton()->get_system_fonts();
+}
+
+String OS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+ return ::OS::get_singleton()->get_system_font_path(p_font_name, p_bold, p_italic);
+}
+
String OS::get_executable_path() const {
return ::OS::get_singleton()->get_executable_path();
}
@@ -323,6 +331,16 @@ Vector<String> OS::get_cmdline_args() {
return cmdlinev;
}
+Vector<String> OS::get_cmdline_user_args() {
+ List<String> cmdline = ::OS::get_singleton()->get_cmdline_user_args();
+ Vector<String> cmdlinev;
+ for (const String &E : cmdline) {
+ cmdlinev.push_back(E);
+ }
+
+ return cmdlinev;
+}
+
String OS::get_locale() const {
return ::OS::get_singleton()->get_locale();
}
@@ -589,6 +607,8 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_processor_count"), &OS::get_processor_count);
ClassDB::bind_method(D_METHOD("get_processor_name"), &OS::get_processor_name);
+ ClassDB::bind_method(D_METHOD("get_system_fonts"), &OS::get_system_fonts);
+ ClassDB::bind_method(D_METHOD("get_system_font_path", "font_name", "bold", "italic"), &OS::get_system_font_path, DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr", "open_console"), &OS::execute, DEFVAL(Array()), DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("create_process", "path", "arguments", "open_console"), &OS::create_process, DEFVAL(false));
@@ -604,6 +624,7 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_name"), &OS::get_name);
ClassDB::bind_method(D_METHOD("get_cmdline_args"), &OS::get_cmdline_args);
+ ClassDB::bind_method(D_METHOD("get_cmdline_user_args"), &OS::get_cmdline_user_args);
ClassDB::bind_method(D_METHOD("delay_usec", "usec"), &OS::delay_usec);
ClassDB::bind_method(D_METHOD("delay_msec", "msec"), &OS::delay_msec);
@@ -1217,13 +1238,13 @@ Vector<uint8_t> File::get_buffer(int64_t p_length) const {
return data;
}
-String File::get_as_text() const {
+String File::get_as_text(bool p_skip_cr) const {
ERR_FAIL_COND_V_MSG(f.is_null(), String(), "File must be opened before use, or is lacking read-write permission.");
uint64_t original_pos = f->get_position();
const_cast<FileAccess *>(*f)->seek(0);
- String text = f->get_as_utf8_string();
+ String text = f->get_as_utf8_string(p_skip_cr);
const_cast<FileAccess *>(*f)->seek(original_pos);
@@ -1420,7 +1441,7 @@ void File::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_buffer", "length"), &File::get_buffer);
ClassDB::bind_method(D_METHOD("get_line"), &File::get_line);
ClassDB::bind_method(D_METHOD("get_csv_line", "delim"), &File::get_csv_line, DEFVAL(","));
- ClassDB::bind_method(D_METHOD("get_as_text"), &File::get_as_text);
+ ClassDB::bind_method(D_METHOD("get_as_text", "skip_cr"), &File::get_as_text, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_md5", "path"), &File::get_md5);
ClassDB::bind_method(D_METHOD("get_sha256", "path"), &File::get_sha256);
ClassDB::bind_method(D_METHOD("is_big_endian"), &File::is_big_endian);
@@ -1838,7 +1859,7 @@ void Thread::_start_func(void *ud) {
::Thread::set_name(func_name);
Callable::CallError ce;
- t->target_callable.call(nullptr, 0, t->ret, ce);
+ t->target_callable.callp(nullptr, 0, t->ret, ce);
if (ce.error != Callable::CallError::CALL_OK) {
t->running.clear();
ERR_FAIL_MSG("Could not call function '" + func_name + "' to start thread " + t->get_id() + ": " + Variant::get_callable_error_text(t->target_callable, nullptr, 0, ce) + ".");
@@ -2280,6 +2301,10 @@ bool Engine::is_editor_hint() const {
return ::Engine::get_singleton()->is_editor_hint();
}
+String Engine::get_write_movie_path() const {
+ return ::Engine::get_singleton()->get_write_movie_path();
+}
+
void Engine::set_print_error_messages(bool p_enabled) {
::Engine::get_singleton()->set_print_error_messages(p_enabled);
}
@@ -2329,6 +2354,8 @@ void Engine::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_editor_hint"), &Engine::is_editor_hint);
+ ClassDB::bind_method(D_METHOD("get_write_movie_path"), &Engine::get_write_movie_path);
+
ClassDB::bind_method(D_METHOD("set_print_error_messages", "enabled"), &Engine::set_print_error_messages);
ClassDB::bind_method(D_METHOD("is_printing_error_messages"), &Engine::is_printing_error_messages);
@@ -2412,7 +2439,7 @@ Error EngineDebugger::call_capture(void *p_user, const String &p_cmd, const Arra
const Variant *args[2] = { &cmd, &data };
Variant retval;
Callable::CallError err;
- capture.call(args, 2, retval, err);
+ capture.callp(args, 2, retval, err);
ERR_FAIL_COND_V_MSG(err.error != Callable::CallError::CALL_OK, FAILED, "Error calling 'capture' to callable: " + Variant::get_callable_error_text(capture, args, 2, err));
ERR_FAIL_COND_V_MSG(retval.get_type() != Variant::BOOL, FAILED, "Error calling 'capture' to callable: " + String(capture) + ". Return type is not bool.");
r_captured = retval;
diff --git a/core/core_bind.h b/core/core_bind.h
index c116ac4986..45b4091ce2 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -71,7 +71,7 @@ public:
static ResourceLoader *get_singleton() { return singleton; }
- Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false);
+ Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, CacheMode p_cache_mode = CACHE_MODE_REUSE);
ThreadLoadStatus load_threaded_get_status(const String &p_path, Array r_progress = Array());
Ref<Resource> load_threaded_get(const String &p_path);
@@ -109,7 +109,7 @@ public:
static ResourceSaver *get_singleton() { return singleton; }
- Error save(const String &p_path, const Ref<Resource> &p_resource, BitField<SaverFlags> p_flags);
+ Error save(const Ref<Resource> &p_resource, const String &p_path, BitField<SaverFlags> p_flags);
Vector<String> get_recognized_extensions(const Ref<Resource> &p_resource);
void add_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver, bool p_at_front);
void remove_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver);
@@ -170,6 +170,8 @@ public:
void alert(const String &p_alert, const String &p_title = "ALERT!");
void crash(const String &p_message);
+ Vector<String> get_system_fonts() const;
+ String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const;
String get_executable_path() const;
int execute(const String &p_path, const Vector<String> &p_arguments, Array r_output = Array(), bool p_read_stderr = false, bool p_open_console = false);
int create_process(const String &p_path, const Vector<String> &p_arguments, bool p_open_console = false);
@@ -186,6 +188,7 @@ public:
String get_name() const;
Vector<String> get_cmdline_args();
+ Vector<String> get_cmdline_user_args();
String get_locale() const;
String get_locale_language() const;
@@ -409,7 +412,7 @@ public:
Vector<uint8_t> get_buffer(int64_t p_length) const; // Get an array of bytes.
String get_line() const;
Vector<String> get_csv_line(const String &p_delim = ",") const;
- String get_as_text() const;
+ String get_as_text(bool p_skip_cr = false) const;
String get_md5(const String &p_path) const;
String get_sha256(const String &p_path) const;
@@ -674,6 +677,9 @@ public:
void set_editor_hint(bool p_enabled);
bool is_editor_hint() const;
+ // `set_write_movie_path()` is not exposed to the scripting API as changing it at run-time has no effect.
+ String get_write_movie_path() const;
+
void set_print_error_messages(bool p_enabled);
bool is_printing_error_messages() const;
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 4a2d09d2a0..dc0ab72a86 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -31,7 +31,6 @@
#include "core_constants.h"
#include "core/input/input_event.h"
-#include "core/multiplayer/multiplayer.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "core/variant/variant.h"
@@ -660,15 +659,6 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_OBJECT_CORE);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
- // rpc
- BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_DISABLED", Multiplayer::RPC_MODE_DISABLED);
- BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_ANY_PEER", Multiplayer::RPC_MODE_ANY_PEER);
- BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_AUTHORITY", Multiplayer::RPC_MODE_AUTHORITY);
-
- BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_UNRELIABLE", Multiplayer::TRANSFER_MODE_UNRELIABLE);
- BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_UNRELIABLE_ORDERED", Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED);
- BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_RELIABLE", Multiplayer::TRANSFER_MODE_RELIABLE);
-
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp
index d0fd4feaa5..a164eb7a57 100644
--- a/core/crypto/crypto.cpp
+++ b/core/crypto/crypto.cpp
@@ -185,7 +185,7 @@ String ResourceFormatLoaderCrypto::get_resource_type(const String &p_path) const
return "";
}
-Error ResourceFormatSaverCrypto::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverCrypto::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Error err;
Ref<X509Certificate> cert = p_resource;
Ref<CryptoKey> key = p_resource;
diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h
index fb4f7dd88f..10c9564ad9 100644
--- a/core/crypto/crypto.h
+++ b/core/crypto/crypto.h
@@ -125,7 +125,7 @@ public:
class ResourceFormatSaverCrypto : public ResourceFormatSaver {
public:
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
virtual bool recognize(const Ref<Resource> &p_resource) const;
};
diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp
index da25f23917..8ed3d40c22 100644
--- a/core/io/file_access.cpp
+++ b/core/io/file_access.cpp
@@ -377,7 +377,7 @@ uint64_t FileAccess::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
return i;
}
-String FileAccess::get_as_utf8_string() const {
+String FileAccess::get_as_utf8_string(bool p_skip_cr) const {
Vector<uint8_t> sourcef;
uint64_t len = get_length();
sourcef.resize(len + 1);
@@ -388,7 +388,7 @@ String FileAccess::get_as_utf8_string() const {
w[len] = 0;
String s;
- s.parse_utf8((const char *)w);
+ s.parse_utf8((const char *)w, -1, p_skip_cr);
return s;
}
diff --git a/core/io/file_access.h b/core/io/file_access.h
index e2c11142d7..3386800686 100644
--- a/core/io/file_access.h
+++ b/core/io/file_access.h
@@ -113,7 +113,7 @@ public:
virtual String get_line() const;
virtual String get_token() const;
virtual Vector<String> get_csv_line(const String &p_delim = ",") const;
- virtual String get_as_utf8_string() const;
+ virtual String get_as_utf8_string(bool p_skip_cr = false) const;
/**
* Use this for files WRITTEN in _big_ endian machines (ie, amiga/mac)
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 016302c653..b731608b4f 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -1267,7 +1267,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
Ref<Resource> res = loader.get_resource();
ERR_FAIL_COND_V(!res.is_valid(), ERR_FILE_CORRUPT);
- return ResourceFormatSaverBinary::singleton->save(p_path, res);
+ return ResourceFormatSaverBinary::singleton->save(res, p_path);
}
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
@@ -2204,7 +2204,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re
return OK;
}
-Error ResourceFormatSaverBinary::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverBinary::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
ResourceFormatSaverBinaryInstance saver;
return saver.save(local_path, p_resource, p_flags);
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index 2b043302fd..c891a61e99 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -176,7 +176,7 @@ public:
class ResourceFormatSaverBinary : public ResourceFormatSaver {
public:
static ResourceFormatSaverBinary *singleton;
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 2f5c5b54dd..274316f058 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -41,9 +41,9 @@ bool ResourceSaver::timestamp_on_save = false;
ResourceSavedCallback ResourceSaver::save_callback = nullptr;
ResourceSaverGetResourceIDForPath ResourceSaver::save_get_id_for_path = nullptr;
-Error ResourceFormatSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaver::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
int64_t res;
- if (GDVIRTUAL_CALL(_save, p_path, p_resource, p_flags, res)) {
+ if (GDVIRTUAL_CALL(_save, p_resource, p_path, p_flags, res)) {
return (Error)res;
}
@@ -75,8 +75,14 @@ void ResourceFormatSaver::_bind_methods() {
GDVIRTUAL_BIND(_get_recognized_extensions, "resource");
}
-Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
- String extension = p_path.get_extension();
+Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
+ String path = p_path;
+ if (path.is_empty()) {
+ path = p_resource->get_path();
+ }
+ ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
+
+ String extension = path.get_extension();
Error err = ERR_FILE_UNRECOGNIZED;
for (int i = 0; i < saver_count; i++) {
@@ -100,21 +106,21 @@ Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource,
String old_path = p_resource->get_path();
- String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ String local_path = ProjectSettings::get_singleton()->localize_path(path);
Ref<Resource> rwcopy = p_resource;
if (p_flags & FLAG_CHANGE_PATH) {
rwcopy->set_path(local_path);
}
- err = saver[i]->save(p_path, p_resource, p_flags);
+ err = saver[i]->save(p_resource, path, p_flags);
if (err == OK) {
#ifdef TOOLS_ENABLED
((Resource *)p_resource.ptr())->set_edited(false);
if (timestamp_on_save) {
- uint64_t mt = FileAccess::get_modified_time(p_path);
+ uint64_t mt = FileAccess::get_modified_time(path);
((Resource *)p_resource.ptr())->set_last_modified_time(mt);
}
@@ -124,8 +130,8 @@ Error ResourceSaver::save(const String &p_path, const Ref<Resource> &p_resource,
rwcopy->set_path(old_path);
}
- if (save_callback && p_path.begins_with("res://")) {
- save_callback(p_resource, p_path);
+ if (save_callback && path.begins_with("res://")) {
+ save_callback(p_resource, path);
}
return OK;
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index 088317bfbe..4fee2bcfd1 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -41,12 +41,12 @@ class ResourceFormatSaver : public RefCounted {
protected:
static void _bind_methods();
- GDVIRTUAL3R(int64_t, _save, String, Ref<Resource>, uint32_t)
+ GDVIRTUAL3R(int64_t, _save, Ref<Resource>, String, uint32_t)
GDVIRTUAL1RC(bool, _recognize, Ref<Resource>)
GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, Ref<Resource>)
public:
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
@@ -81,7 +81,7 @@ public:
FLAG_REPLACE_SUBRESOURCE_PATHS = 64,
};
- static Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = (uint32_t)FLAG_NONE);
+ static Error save(const Ref<Resource> &p_resource, const String &p_path = "", uint32_t p_flags = (uint32_t)FLAG_NONE);
static void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions);
static void add_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver, bool p_at_front = false);
static void remove_resource_format_saver(Ref<ResourceFormatSaver> p_format_saver);
diff --git a/core/math/color.h b/core/math/color.h
index 0afa6006a8..65036f74cc 100644
--- a/core/math/color.h
+++ b/core/math/color.h
@@ -215,12 +215,12 @@ struct _NO_DISCARD_ Color {
_FORCE_INLINE_ void set_a8(int32_t a8) { a = (CLAMP(a8, 0, 255) / 255.0f); }
_FORCE_INLINE_ int32_t get_a8() const { return int32_t(CLAMP(Math::round(a * 255.0f), 0.0f, 255.0f)); }
- _FORCE_INLINE_ void set_h(float p_h) { set_hsv(p_h, get_s(), get_v()); }
- _FORCE_INLINE_ void set_s(float p_s) { set_hsv(get_h(), p_s, get_v()); }
- _FORCE_INLINE_ void set_v(float p_v) { set_hsv(get_h(), get_s(), p_v); }
- _FORCE_INLINE_ void set_ok_hsl_h(float p_h) { set_ok_hsl(p_h, get_ok_hsl_s(), get_ok_hsl_l()); }
- _FORCE_INLINE_ void set_ok_hsl_s(float p_s) { set_ok_hsl(get_ok_hsl_h(), p_s, get_ok_hsl_l()); }
- _FORCE_INLINE_ void set_ok_hsl_l(float p_l) { set_ok_hsl(get_ok_hsl_h(), get_ok_hsl_s(), p_l); }
+ _FORCE_INLINE_ void set_h(float p_h) { set_hsv(p_h, get_s(), get_v(), a); }
+ _FORCE_INLINE_ void set_s(float p_s) { set_hsv(get_h(), p_s, get_v(), a); }
+ _FORCE_INLINE_ void set_v(float p_v) { set_hsv(get_h(), get_s(), p_v, a); }
+ _FORCE_INLINE_ void set_ok_hsl_h(float p_h) { set_ok_hsl(p_h, get_ok_hsl_s(), get_ok_hsl_l(), a); }
+ _FORCE_INLINE_ void set_ok_hsl_s(float p_s) { set_ok_hsl(get_ok_hsl_h(), p_s, get_ok_hsl_l(), a); }
+ _FORCE_INLINE_ void set_ok_hsl_l(float p_l) { set_ok_hsl(get_ok_hsl_h(), get_ok_hsl_s(), p_l, a); }
_FORCE_INLINE_ Color() {}
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp
index 11bfcc1a6f..c681c60694 100644
--- a/core/math/quaternion.cpp
+++ b/core/math/quaternion.cpp
@@ -111,7 +111,7 @@ Quaternion Quaternion::log() const {
Quaternion Quaternion::exp() const {
Quaternion src = *this;
Vector3 src_v = Vector3(src.x, src.y, src.z);
- float theta = src_v.length();
+ real_t theta = src_v.length();
if (theta < CMP_EPSILON) {
return Quaternion(0, 0, 0, 1);
}
@@ -132,15 +132,9 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con
// adjust signs (if necessary)
if (cosom < 0.0f) {
cosom = -cosom;
- to1.x = -p_to.x;
- to1.y = -p_to.y;
- to1.z = -p_to.z;
- to1.w = -p_to.w;
+ to1 = -p_to;
} else {
- to1.x = p_to.x;
- to1.y = p_to.y;
- to1.z = p_to.z;
- to1.w = p_to.w;
+ to1 = p_to;
}
// calculate coefficients
@@ -189,16 +183,54 @@ Quaternion Quaternion::slerpni(const Quaternion &p_to, const real_t &p_weight) c
invFactor * from.w + newFactor * p_to.w);
}
-Quaternion Quaternion::cubic_slerp(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const {
+Quaternion Quaternion::spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!is_normalized(), Quaternion(), "The start quaternion must be normalized.");
ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quaternion(), "The end quaternion must be normalized.");
#endif
- //the only way to do slerp :|
- real_t t2 = (1.0f - p_weight) * p_weight * 2;
- Quaternion sp = this->slerp(p_b, p_weight);
- Quaternion sq = p_pre_a.slerpni(p_post_b, p_weight);
- return sp.slerpni(sq, t2);
+ Quaternion from_q = *this;
+ Quaternion pre_q = p_pre_a;
+ Quaternion to_q = p_b;
+ Quaternion post_q = p_post_b;
+
+ // Align flip phases.
+ from_q = Basis(from_q).get_rotation_quaternion();
+ pre_q = Basis(pre_q).get_rotation_quaternion();
+ to_q = Basis(to_q).get_rotation_quaternion();
+ post_q = Basis(post_q).get_rotation_quaternion();
+
+ // Flip quaternions to shortest path if necessary.
+ bool flip1 = signbit(from_q.dot(pre_q));
+ pre_q = flip1 ? -pre_q : pre_q;
+ bool flip2 = signbit(from_q.dot(to_q));
+ to_q = flip2 ? -to_q : to_q;
+ bool flip3 = flip2 ? to_q.dot(post_q) <= 0 : signbit(to_q.dot(post_q));
+ post_q = flip3 ? -post_q : post_q;
+
+ // Calc by Expmap in from_q space.
+ Quaternion ln_from = Quaternion(0, 0, 0, 0);
+ Quaternion ln_to = (from_q.inverse() * to_q).log();
+ Quaternion ln_pre = (from_q.inverse() * pre_q).log();
+ Quaternion ln_post = (from_q.inverse() * post_q).log();
+ Quaternion ln = Quaternion(0, 0, 0, 0);
+ ln.x = Math::cubic_interpolate(ln_from.x, ln_to.x, ln_pre.x, ln_post.x, p_weight);
+ ln.y = Math::cubic_interpolate(ln_from.y, ln_to.y, ln_pre.y, ln_post.y, p_weight);
+ ln.z = Math::cubic_interpolate(ln_from.z, ln_to.z, ln_pre.z, ln_post.z, p_weight);
+ Quaternion q1 = from_q * ln.exp();
+
+ // Calc by Expmap in to_q space.
+ ln_from = (to_q.inverse() * from_q).log();
+ ln_to = Quaternion(0, 0, 0, 0);
+ ln_pre = (to_q.inverse() * pre_q).log();
+ ln_post = (to_q.inverse() * post_q).log();
+ ln = Quaternion(0, 0, 0, 0);
+ ln.x = Math::cubic_interpolate(ln_from.x, ln_to.x, ln_pre.x, ln_post.x, p_weight);
+ ln.y = Math::cubic_interpolate(ln_from.y, ln_to.y, ln_pre.y, ln_post.y, p_weight);
+ ln.z = Math::cubic_interpolate(ln_from.z, ln_to.z, ln_pre.z, ln_post.z, p_weight);
+ Quaternion q2 = to_q * ln.exp();
+
+ // To cancel error made by Expmap ambiguity, do blends.
+ return q1.slerp(q2, p_weight);
}
Quaternion::operator String() const {
@@ -213,7 +245,7 @@ Vector3 Quaternion::get_axis() const {
return Vector3(x * r, y * r, z * r);
}
-float Quaternion::get_angle() const {
+real_t Quaternion::get_angle() const {
return 2 * Math::acos(w);
}
diff --git a/core/math/quaternion.h b/core/math/quaternion.h
index 9801746659..cb54a6f540 100644
--- a/core/math/quaternion.h
+++ b/core/math/quaternion.h
@@ -71,10 +71,10 @@ struct _NO_DISCARD_ Quaternion {
Quaternion slerp(const Quaternion &p_to, const real_t &p_weight) const;
Quaternion slerpni(const Quaternion &p_to, const real_t &p_weight) const;
- Quaternion cubic_slerp(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const;
+ Quaternion spherical_cubic_interpolate(const Quaternion &p_b, const Quaternion &p_pre_a, const Quaternion &p_post_b, const real_t &p_weight) const;
Vector3 get_axis() const;
- float get_angle() const;
+ real_t get_angle() const;
_FORCE_INLINE_ void get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
r_angle = 2 * Math::acos(w);
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index cbd2fd3fa1..bb8bf9f569 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -136,11 +136,11 @@ void Transform2D::scale_basis(const Size2 &p_scale) {
columns[1][1] *= p_scale.y;
}
-void Transform2D::translate(const real_t p_tx, const real_t p_ty) {
- translate(Vector2(p_tx, p_ty));
+void Transform2D::translate_local(const real_t p_tx, const real_t p_ty) {
+ translate_local(Vector2(p_tx, p_ty));
}
-void Transform2D::translate(const Vector2 &p_translation) {
+void Transform2D::translate_local(const Vector2 &p_translation) {
columns[2] += basis_xform(p_translation);
}
@@ -235,9 +235,9 @@ Transform2D Transform2D::untranslated() const {
return copy;
}
-Transform2D Transform2D::translated(const Vector2 &p_offset) const {
+Transform2D Transform2D::translated_local(const Vector2 &p_offset) const {
Transform2D copy = *this;
- copy.translate(p_offset);
+ copy.translate_local(p_offset);
return copy;
}
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 72d34a5d4c..e64d050f0c 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -74,8 +74,8 @@ struct _NO_DISCARD_ Transform2D {
void scale(const Size2 &p_scale);
void scale_basis(const Size2 &p_scale);
- void translate(const real_t p_tx, const real_t p_ty);
- void translate(const Vector2 &p_translation);
+ void translate_local(const real_t p_tx, const real_t p_ty);
+ void translate_local(const Vector2 &p_translation);
real_t basis_determinant() const;
@@ -87,7 +87,7 @@ struct _NO_DISCARD_ Transform2D {
Transform2D scaled(const Size2 &p_scale) const;
Transform2D basis_scaled(const Size2 &p_scale) const;
- Transform2D translated(const Vector2 &p_offset) const;
+ Transform2D translated_local(const Vector2 &p_offset) const;
Transform2D rotated(const real_t p_angle) const;
Transform2D untranslated() const;
diff --git a/core/math/transform_3d.cpp b/core/math/transform_3d.cpp
index 76b31daa76..c497a276f3 100644
--- a/core/math/transform_3d.cpp
+++ b/core/math/transform_3d.cpp
@@ -70,17 +70,23 @@ void Transform3D::rotate_basis(const Vector3 &p_axis, real_t p_angle) {
}
Transform3D Transform3D::looking_at(const Vector3 &p_target, const Vector3 &p_up) const {
+#ifdef MATH_CHECKS
+ ERR_FAIL_COND_V_MSG(origin.is_equal_approx(p_target), Transform3D(), "The transform's origin and target can't be equal.");
+#endif
Transform3D t = *this;
t.basis = Basis::looking_at(p_target - origin, p_up);
return t;
}
void Transform3D::set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up) {
+#ifdef MATH_CHECKS
+ ERR_FAIL_COND_MSG(p_eye.is_equal_approx(p_target), "The eye and target vectors can't be equal.");
+#endif
basis = Basis::looking_at(p_target - p_eye, p_up);
origin = p_eye;
}
-Transform3D Transform3D::sphere_interpolate_with(const Transform3D &p_transform, real_t p_c) const {
+Transform3D Transform3D::spherical_interpolate_with(const Transform3D &p_transform, real_t p_c) const {
/* not sure if very "efficient" but good enough? */
Transform3D interp;
@@ -123,19 +129,19 @@ void Transform3D::scale_basis(const Vector3 &p_scale) {
basis.scale(p_scale);
}
-void Transform3D::translate(real_t p_tx, real_t p_ty, real_t p_tz) {
- translate(Vector3(p_tx, p_ty, p_tz));
+void Transform3D::translate_local(real_t p_tx, real_t p_ty, real_t p_tz) {
+ translate_local(Vector3(p_tx, p_ty, p_tz));
}
-void Transform3D::translate(const Vector3 &p_translation) {
+void Transform3D::translate_local(const Vector3 &p_translation) {
for (int i = 0; i < 3; i++) {
origin[i] += basis[i].dot(p_translation);
}
}
-Transform3D Transform3D::translated(const Vector3 &p_translation) const {
+Transform3D Transform3D::translated_local(const Vector3 &p_translation) const {
Transform3D t = *this;
- t.translate(p_translation);
+ t.translate_local(p_translation);
return t;
}
diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h
index 25832434cd..1f8026043f 100644
--- a/core/math/transform_3d.h
+++ b/core/math/transform_3d.h
@@ -56,9 +56,9 @@ struct _NO_DISCARD_ Transform3D {
void scale(const Vector3 &p_scale);
Transform3D scaled(const Vector3 &p_scale) const;
void scale_basis(const Vector3 &p_scale);
- void translate(real_t p_tx, real_t p_ty, real_t p_tz);
- void translate(const Vector3 &p_translation);
- Transform3D translated(const Vector3 &p_translation) const;
+ void translate_local(real_t p_tx, real_t p_ty, real_t p_tz);
+ void translate_local(const Vector3 &p_translation);
+ Transform3D translated_local(const Vector3 &p_translation) const;
const Basis &get_basis() const { return basis; }
void set_basis(const Basis &p_basis) { basis = p_basis; }
@@ -100,7 +100,7 @@ struct _NO_DISCARD_ Transform3D {
void operator*=(const real_t p_val);
Transform3D operator*(const real_t p_val) const;
- Transform3D sphere_interpolate_with(const Transform3D &p_transform, real_t p_c) const;
+ Transform3D spherical_interpolate_with(const Transform3D &p_transform, real_t p_c) const;
Transform3D interpolate_with(const Transform3D &p_transform, real_t p_c) const;
_FORCE_INLINE_ Transform3D inverse_xform(const Transform3D &t) const {
diff --git a/core/math/vector4.cpp b/core/math/vector4.cpp
index c2a6f8ead2..cc0d0dcf72 100644
--- a/core/math/vector4.cpp
+++ b/core/math/vector4.cpp
@@ -50,7 +50,7 @@ Vector4 Vector4::normalized() const {
}
bool Vector4::is_normalized() const {
- return Math::is_equal_approx(length_squared(), 1, (real_t)UNIT_EPSILON); //use less epsilon
+ return Math::is_equal_approx(length_squared(), 1, (real_t)UNIT_EPSILON); // Use less epsilon.
}
Vector4 Vector4::abs() const {
@@ -61,6 +61,26 @@ Vector4 Vector4::sign() const {
return Vector4(SIGN(x), SIGN(y), SIGN(z), SIGN(w));
}
+Vector4 Vector4::floor() const {
+ return Vector4(Math::floor(x), Math::floor(y), Math::floor(z), Math::floor(w));
+}
+
+Vector4 Vector4::ceil() const {
+ return Vector4(Math::ceil(x), Math::ceil(y), Math::ceil(z), Math::ceil(w));
+}
+
+Vector4 Vector4::round() const {
+ return Vector4(Math::round(x), Math::round(y), Math::round(z), Math::round(w));
+}
+
+Vector4 Vector4::lerp(const Vector4 &p_to, const real_t p_weight) const {
+ return Vector4(
+ x + (p_weight * (p_to.x - x)),
+ y + (p_weight * (p_to.y - y)),
+ z + (p_weight * (p_to.z - z)),
+ w + (p_weight * (p_to.w - w)));
+}
+
Vector4 Vector4::inverse() const {
return Vector4(1.0f / x, 1.0f / y, 1.0f / z, 1.0f / w);
}
@@ -69,7 +89,7 @@ Vector4::Axis Vector4::min_axis_index() const {
uint32_t min_index = 0;
real_t min_value = x;
for (uint32_t i = 1; i < 4; i++) {
- if (operator[](i) < min_value) {
+ if (operator[](i) <= min_value) {
min_index = i;
min_value = operator[](i);
}
diff --git a/core/math/vector4.h b/core/math/vector4.h
index 645c51db87..37ddb509d6 100644
--- a/core/math/vector4.h
+++ b/core/math/vector4.h
@@ -54,11 +54,13 @@ struct _NO_DISCARD_ Vector4 {
real_t components[4] = { 0, 0, 0, 0 };
};
- _FORCE_INLINE_ real_t &operator[](int idx) {
- return components[idx];
+ _FORCE_INLINE_ real_t &operator[](const int p_axis) {
+ DEV_ASSERT((unsigned int)p_axis < 4);
+ return components[p_axis];
}
- _FORCE_INLINE_ const real_t &operator[](int idx) const {
- return components[idx];
+ _FORCE_INLINE_ const real_t &operator[](const int p_axis) const {
+ DEV_ASSERT((unsigned int)p_axis < 4);
+ return components[p_axis];
}
_FORCE_INLINE_ real_t length_squared() const;
bool is_equal_approx(const Vector4 &p_vec4) const;
@@ -66,8 +68,13 @@ struct _NO_DISCARD_ Vector4 {
void normalize();
Vector4 normalized() const;
bool is_normalized() const;
+
Vector4 abs() const;
Vector4 sign() const;
+ Vector4 floor() const;
+ Vector4 ceil() const;
+ Vector4 round() const;
+ Vector4 lerp(const Vector4 &p_to, const real_t p_weight) const;
Vector4::Axis min_axis_index() const;
Vector4::Axis max_axis_index() const;
diff --git a/core/math/vector4i.cpp b/core/math/vector4i.cpp
index 8c571b02e3..2dc5b74202 100644
--- a/core/math/vector4i.cpp
+++ b/core/math/vector4i.cpp
@@ -47,7 +47,7 @@ Vector4i::Axis Vector4i::min_axis_index() const {
uint32_t min_index = 0;
int32_t min_value = x;
for (uint32_t i = 1; i < 4; i++) {
- if (operator[](i) < min_value) {
+ if (operator[](i) <= min_value) {
min_index = i;
min_value = operator[](i);
}
diff --git a/core/multiplayer/SCsub b/core/multiplayer/SCsub
deleted file mode 100644
index 19a6549225..0000000000
--- a/core/multiplayer/SCsub
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-
-env.add_source_files(env.core_sources, "*.cpp")
diff --git a/core/multiplayer/multiplayer_api.cpp b/core/multiplayer/multiplayer_api.cpp
deleted file mode 100644
index 6cce31e0d1..0000000000
--- a/core/multiplayer/multiplayer_api.cpp
+++ /dev/null
@@ -1,593 +0,0 @@
-/*************************************************************************/
-/* multiplayer_api.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 "multiplayer_api.h"
-
-#include "core/debugger/engine_debugger.h"
-#include "core/io/marshalls.h"
-
-#include <stdint.h>
-
-#ifdef DEBUG_ENABLED
-#include "core/os/os.h"
-#endif
-
-MultiplayerReplicationInterface *(*MultiplayerAPI::create_default_replication_interface)(MultiplayerAPI *p_multiplayer) = nullptr;
-MultiplayerRPCInterface *(*MultiplayerAPI::create_default_rpc_interface)(MultiplayerAPI *p_multiplayer) = nullptr;
-MultiplayerCacheInterface *(*MultiplayerAPI::create_default_cache_interface)(MultiplayerAPI *p_multiplayer) = nullptr;
-
-#ifdef DEBUG_ENABLED
-void MultiplayerAPI::profile_bandwidth(const String &p_inout, int p_size) {
- if (EngineDebugger::is_profiling("multiplayer")) {
- Array values;
- values.push_back(p_inout);
- values.push_back(OS::get_singleton()->get_ticks_msec());
- values.push_back(p_size);
- EngineDebugger::profiler_add_frame_data("multiplayer", values);
- }
-}
-#endif
-
-void MultiplayerAPI::poll() {
- if (!multiplayer_peer.is_valid() || multiplayer_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED) {
- return;
- }
-
- multiplayer_peer->poll();
-
- if (!multiplayer_peer.is_valid()) { // It's possible that polling might have resulted in a disconnection, so check here.
- return;
- }
-
- while (multiplayer_peer->get_available_packet_count()) {
- int sender = multiplayer_peer->get_packet_peer();
- const uint8_t *packet;
- int len;
-
- Error err = multiplayer_peer->get_packet(&packet, len);
- if (err != OK) {
- ERR_PRINT("Error getting packet!");
- return; // Something is wrong!
- }
-
- remote_sender_id = sender;
- _process_packet(sender, packet, len);
- remote_sender_id = 0;
-
- if (!multiplayer_peer.is_valid()) {
- return; // It's also possible that a packet or RPC caused a disconnection, so also check here.
- }
- }
- replicator->on_network_process();
-}
-
-void MultiplayerAPI::clear() {
- connected_peers.clear();
- packet_cache.clear();
- cache->clear();
-}
-
-void MultiplayerAPI::set_root_path(const NodePath &p_path) {
- ERR_FAIL_COND_MSG(!p_path.is_absolute() && !p_path.is_empty(), "MultiplayerAPI root path must be absolute.");
- root_path = p_path;
-}
-
-NodePath MultiplayerAPI::get_root_path() const {
- return root_path;
-}
-
-void MultiplayerAPI::set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) {
- if (p_peer == multiplayer_peer) {
- return; // Nothing to do
- }
-
- ERR_FAIL_COND_MSG(p_peer.is_valid() && p_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED,
- "Supplied MultiplayerPeer must be connecting or connected.");
-
- if (multiplayer_peer.is_valid()) {
- multiplayer_peer->disconnect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
- multiplayer_peer->disconnect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
- multiplayer_peer->disconnect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
- multiplayer_peer->disconnect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
- multiplayer_peer->disconnect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
- clear();
- }
-
- multiplayer_peer = p_peer;
-
- if (multiplayer_peer.is_valid()) {
- multiplayer_peer->connect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
- multiplayer_peer->connect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
- multiplayer_peer->connect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
- multiplayer_peer->connect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
- multiplayer_peer->connect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
- }
- replicator->on_reset();
-}
-
-Ref<MultiplayerPeer> MultiplayerAPI::get_multiplayer_peer() const {
- return multiplayer_peer;
-}
-
-void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(root_path.is_empty(), "Multiplayer root was not initialized. If you are using custom multiplayer, remember to set the root path via MultiplayerAPI.set_root_path before using it.");
- ERR_FAIL_COND_MSG(p_packet_len < 1, "Invalid packet received. Size too small.");
-
-#ifdef DEBUG_ENABLED
- profile_bandwidth("in", p_packet_len);
-#endif
-
- // Extract the `packet_type` from the LSB three bits:
- uint8_t packet_type = p_packet[0] & CMD_MASK;
-
- switch (packet_type) {
- case NETWORK_COMMAND_SIMPLIFY_PATH: {
- cache->process_simplify_path(p_from, p_packet, p_packet_len);
- } break;
-
- case NETWORK_COMMAND_CONFIRM_PATH: {
- cache->process_confirm_path(p_from, p_packet, p_packet_len);
- } break;
-
- case NETWORK_COMMAND_REMOTE_CALL: {
- rpc->process_rpc(p_from, p_packet, p_packet_len);
- } break;
-
- case NETWORK_COMMAND_RAW: {
- _process_raw(p_from, p_packet, p_packet_len);
- } break;
- case NETWORK_COMMAND_SPAWN: {
- replicator->on_spawn_receive(p_from, p_packet, p_packet_len);
- } break;
- case NETWORK_COMMAND_DESPAWN: {
- replicator->on_despawn_receive(p_from, p_packet, p_packet_len);
- } break;
- case NETWORK_COMMAND_SYNC: {
- replicator->on_sync_receive(p_from, p_packet, p_packet_len);
- } break;
- }
-}
-
-// The variant is compressed and encoded; The first byte contains all the meta
-// information and the format is:
-// - The first LSB 5 bits are used for the variant type.
-// - The next two bits are used to store the encoding mode.
-// - The most significant is used to store the boolean value.
-#define VARIANT_META_TYPE_MASK 0x1F
-#define VARIANT_META_EMODE_MASK 0x60
-#define VARIANT_META_BOOL_MASK 0x80
-#define ENCODE_8 0 << 5
-#define ENCODE_16 1 << 5
-#define ENCODE_32 2 << 5
-#define ENCODE_64 3 << 5
-Error MultiplayerAPI::encode_and_compress_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_allow_object_decoding) {
- // Unreachable because `VARIANT_MAX` == 27 and `ENCODE_VARIANT_MASK` == 31
- CRASH_COND(p_variant.get_type() > VARIANT_META_TYPE_MASK);
-
- uint8_t *buf = r_buffer;
- r_len = 0;
- uint8_t encode_mode = 0;
-
- switch (p_variant.get_type()) {
- case Variant::BOOL: {
- if (buf) {
- // We still have 1 free bit in the meta, so let's use it.
- buf[0] = (p_variant.operator bool()) ? (1 << 7) : 0;
- buf[0] |= encode_mode | p_variant.get_type();
- }
- r_len += 1;
- } break;
- case Variant::INT: {
- if (buf) {
- // Reserve the first byte for the meta.
- buf += 1;
- }
- r_len += 1;
- int64_t val = p_variant;
- if (val <= (int64_t)INT8_MAX && val >= (int64_t)INT8_MIN) {
- // Use 8 bit
- encode_mode = ENCODE_8;
- if (buf) {
- buf[0] = val;
- }
- r_len += 1;
- } else if (val <= (int64_t)INT16_MAX && val >= (int64_t)INT16_MIN) {
- // Use 16 bit
- encode_mode = ENCODE_16;
- if (buf) {
- encode_uint16(val, buf);
- }
- r_len += 2;
- } else if (val <= (int64_t)INT32_MAX && val >= (int64_t)INT32_MIN) {
- // Use 32 bit
- encode_mode = ENCODE_32;
- if (buf) {
- encode_uint32(val, buf);
- }
- r_len += 4;
- } else {
- // Use 64 bit
- encode_mode = ENCODE_64;
- if (buf) {
- encode_uint64(val, buf);
- }
- r_len += 8;
- }
- // Store the meta
- if (buf) {
- buf -= 1;
- buf[0] = encode_mode | p_variant.get_type();
- }
- } break;
- default:
- // Any other case is not yet compressed.
- Error err = encode_variant(p_variant, r_buffer, r_len, p_allow_object_decoding);
- if (err != OK) {
- return err;
- }
- if (r_buffer) {
- // The first byte is not used by the marshalling, so store the type
- // so we know how to decompress and decode this variant.
- r_buffer[0] = p_variant.get_type();
- }
- }
-
- return OK;
-}
-
-Error MultiplayerAPI::decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len, bool p_allow_object_decoding) {
- const uint8_t *buf = p_buffer;
- int len = p_len;
-
- ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
- uint8_t type = buf[0] & VARIANT_META_TYPE_MASK;
- uint8_t encode_mode = buf[0] & VARIANT_META_EMODE_MASK;
-
- ERR_FAIL_COND_V(type >= Variant::VARIANT_MAX, ERR_INVALID_DATA);
-
- switch (type) {
- case Variant::BOOL: {
- bool val = (buf[0] & VARIANT_META_BOOL_MASK) > 0;
- r_variant = val;
- if (r_len) {
- *r_len = 1;
- }
- } break;
- case Variant::INT: {
- buf += 1;
- len -= 1;
- if (r_len) {
- *r_len = 1;
- }
- if (encode_mode == ENCODE_8) {
- // 8 bits.
- ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
- int8_t val = buf[0];
- r_variant = val;
- if (r_len) {
- (*r_len) += 1;
- }
- } else if (encode_mode == ENCODE_16) {
- // 16 bits.
- ERR_FAIL_COND_V(len < 2, ERR_INVALID_DATA);
- int16_t val = decode_uint16(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 2;
- }
- } else if (encode_mode == ENCODE_32) {
- // 32 bits.
- ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
- int32_t val = decode_uint32(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 4;
- }
- } else {
- // 64 bits.
- ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
- int64_t val = decode_uint64(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 8;
- }
- }
- } break;
- default:
- Error err = decode_variant(r_variant, p_buffer, p_len, r_len, p_allow_object_decoding);
- if (err != OK) {
- return err;
- }
- }
-
- return OK;
-}
-
-Error MultiplayerAPI::encode_and_compress_variants(const Variant **p_variants, int p_count, uint8_t *p_buffer, int &r_len, bool *r_raw, bool p_allow_object_decoding) {
- r_len = 0;
- int size = 0;
-
- if (p_count == 0) {
- if (r_raw) {
- *r_raw = true;
- }
- return OK;
- }
-
- // Try raw encoding optimization.
- if (r_raw && p_count == 1) {
- *r_raw = false;
- const Variant &v = *(p_variants[0]);
- if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
- *r_raw = true;
- const PackedByteArray pba = v;
- if (p_buffer) {
- memcpy(p_buffer, pba.ptr(), pba.size());
- }
- r_len += pba.size();
- } else {
- encode_and_compress_variant(v, p_buffer, size, p_allow_object_decoding);
- r_len += size;
- }
- return OK;
- }
-
- // Regular encoding.
- for (int i = 0; i < p_count; i++) {
- const Variant &v = *(p_variants[i]);
- encode_and_compress_variant(v, p_buffer ? p_buffer + r_len : nullptr, size, p_allow_object_decoding);
- r_len += size;
- }
- return OK;
-}
-
-Error MultiplayerAPI::decode_and_decompress_variants(Vector<Variant> &r_variants, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw, bool p_allow_object_decoding) {
- r_len = 0;
- int argc = r_variants.size();
- if (argc == 0 && p_raw) {
- return OK;
- }
- ERR_FAIL_COND_V(p_raw && argc != 1, ERR_INVALID_DATA);
- if (p_raw) {
- r_len = p_len;
- PackedByteArray pba;
- pba.resize(p_len);
- memcpy(pba.ptrw(), p_buffer, p_len);
- r_variants.write[0] = pba;
- return OK;
- }
-
- Vector<Variant> args;
- Vector<const Variant *> argp;
- args.resize(argc);
-
- for (int i = 0; i < argc; i++) {
- ERR_FAIL_COND_V_MSG(r_len >= p_len, ERR_INVALID_DATA, "Invalid packet received. Size too small.");
-
- int vlen;
- Error err = MultiplayerAPI::decode_and_decompress_variant(r_variants.write[i], &p_buffer[r_len], p_len - r_len, &vlen, p_allow_object_decoding);
- ERR_FAIL_COND_V_MSG(err != OK, err, "Invalid packet received. Unable to decode state variable.");
- r_len += vlen;
- }
- return OK;
-}
-
-void MultiplayerAPI::_add_peer(int p_id) {
- connected_peers.insert(p_id);
- cache->on_peer_change(p_id, true);
- replicator->on_peer_change(p_id, true);
- emit_signal(SNAME("peer_connected"), p_id);
-}
-
-void MultiplayerAPI::_del_peer(int p_id) {
- replicator->on_peer_change(p_id, false);
- cache->on_peer_change(p_id, false);
- connected_peers.erase(p_id);
- emit_signal(SNAME("peer_disconnected"), p_id);
-}
-
-void MultiplayerAPI::_connected_to_server() {
- emit_signal(SNAME("connected_to_server"));
-}
-
-void MultiplayerAPI::_connection_failed() {
- emit_signal(SNAME("connection_failed"));
-}
-
-void MultiplayerAPI::_server_disconnected() {
- replicator->on_reset();
- emit_signal(SNAME("server_disconnected"));
-}
-
-Error MultiplayerAPI::send_bytes(Vector<uint8_t> p_data, int p_to, Multiplayer::TransferMode p_mode, int p_channel) {
- ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet.");
- ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no multiplayer peer is active.");
- ERR_FAIL_COND_V_MSG(multiplayer_peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a multiplayer peer which is not connected.");
-
- if (packet_cache.size() < p_data.size() + 1) {
- packet_cache.resize(p_data.size() + 1);
- }
-
- const uint8_t *r = p_data.ptr();
- packet_cache.write[0] = NETWORK_COMMAND_RAW;
- memcpy(&packet_cache.write[1], &r[0], p_data.size());
-
- multiplayer_peer->set_target_peer(p_to);
- multiplayer_peer->set_transfer_channel(p_channel);
- multiplayer_peer->set_transfer_mode(p_mode);
-
- return multiplayer_peer->put_packet(packet_cache.ptr(), p_data.size() + 1);
-}
-
-void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small.");
-
- Vector<uint8_t> out;
- int len = p_packet_len - 1;
- out.resize(len);
- {
- uint8_t *w = out.ptrw();
- memcpy(&w[0], &p_packet[1], len);
- }
- emit_signal(SNAME("peer_packet"), p_from, out);
-}
-
-bool MultiplayerAPI::is_cache_confirmed(NodePath p_path, int p_peer) {
- return cache->is_cache_confirmed(p_path, p_peer);
-}
-
-bool MultiplayerAPI::send_object_cache(Object *p_obj, int p_peer_id, int &r_id) {
- return cache->send_object_cache(p_obj, p_peer_id, r_id);
-}
-
-int MultiplayerAPI::make_object_cache(Object *p_obj) {
- return cache->make_object_cache(p_obj);
-}
-
-Object *MultiplayerAPI::get_cached_object(int p_from, uint32_t p_cache_id) {
- return cache->get_cached_object(p_from, p_cache_id);
-}
-
-int MultiplayerAPI::get_unique_id() const {
- ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), 0, "No multiplayer peer is assigned. Unable to get unique ID.");
- return multiplayer_peer->get_unique_id();
-}
-
-bool MultiplayerAPI::is_server() const {
- return multiplayer_peer.is_valid() && multiplayer_peer->is_server();
-}
-
-void MultiplayerAPI::set_refuse_new_connections(bool p_refuse) {
- ERR_FAIL_COND_MSG(!multiplayer_peer.is_valid(), "No multiplayer peer is assigned. Unable to set 'refuse_new_connections'.");
- multiplayer_peer->set_refuse_new_connections(p_refuse);
-}
-
-bool MultiplayerAPI::is_refusing_new_connections() const {
- ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), false, "No multiplayer peer is assigned. Unable to get 'refuse_new_connections'.");
- return multiplayer_peer->is_refusing_new_connections();
-}
-
-Vector<int> MultiplayerAPI::get_peer_ids() const {
- ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected.");
-
- Vector<int> ret;
- for (const int &E : connected_peers) {
- ret.push_back(E);
- }
-
- return ret;
-}
-
-void MultiplayerAPI::set_allow_object_decoding(bool p_enable) {
- allow_object_decoding = p_enable;
-}
-
-bool MultiplayerAPI::is_object_decoding_allowed() const {
- return allow_object_decoding;
-}
-
-String MultiplayerAPI::get_rpc_md5(const Object *p_obj) const {
- return rpc->get_rpc_md5(p_obj);
-}
-
-void MultiplayerAPI::rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
- rpc->rpcp(p_obj, p_peer_id, p_method, p_arg, p_argcount);
-}
-
-Error MultiplayerAPI::spawn(Object *p_object, Variant p_config) {
- return replicator->on_spawn(p_object, p_config);
-}
-
-Error MultiplayerAPI::despawn(Object *p_object, Variant p_config) {
- return replicator->on_despawn(p_object, p_config);
-}
-
-Error MultiplayerAPI::replication_start(Object *p_object, Variant p_config) {
- return replicator->on_replication_start(p_object, p_config);
-}
-
-Error MultiplayerAPI::replication_stop(Object *p_object, Variant p_config) {
- return replicator->on_replication_stop(p_object, p_config);
-}
-
-void MultiplayerAPI::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_root_path", "path"), &MultiplayerAPI::set_root_path);
- ClassDB::bind_method(D_METHOD("get_root_path"), &MultiplayerAPI::get_root_path);
- ClassDB::bind_method(D_METHOD("send_bytes", "bytes", "id", "mode", "channel"), &MultiplayerAPI::send_bytes, DEFVAL(MultiplayerPeer::TARGET_PEER_BROADCAST), DEFVAL(Multiplayer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
- ClassDB::bind_method(D_METHOD("has_multiplayer_peer"), &MultiplayerAPI::has_multiplayer_peer);
- ClassDB::bind_method(D_METHOD("get_multiplayer_peer"), &MultiplayerAPI::get_multiplayer_peer);
- ClassDB::bind_method(D_METHOD("set_multiplayer_peer", "peer"), &MultiplayerAPI::set_multiplayer_peer);
- ClassDB::bind_method(D_METHOD("get_unique_id"), &MultiplayerAPI::get_unique_id);
- ClassDB::bind_method(D_METHOD("is_server"), &MultiplayerAPI::is_server);
- ClassDB::bind_method(D_METHOD("get_remote_sender_id"), &MultiplayerAPI::get_remote_sender_id);
- ClassDB::bind_method(D_METHOD("poll"), &MultiplayerAPI::poll);
- ClassDB::bind_method(D_METHOD("clear"), &MultiplayerAPI::clear);
-
- ClassDB::bind_method(D_METHOD("get_peers"), &MultiplayerAPI::get_peer_ids);
- ClassDB::bind_method(D_METHOD("set_refuse_new_connections", "refuse"), &MultiplayerAPI::set_refuse_new_connections);
- ClassDB::bind_method(D_METHOD("is_refusing_new_connections"), &MultiplayerAPI::is_refusing_new_connections);
- ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &MultiplayerAPI::set_allow_object_decoding);
- ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &MultiplayerAPI::is_object_decoding_allowed);
-
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_connections"), "set_refuse_new_connections", "is_refusing_new_connections");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer_peer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerPeer", PROPERTY_USAGE_NONE), "set_multiplayer_peer", "get_multiplayer_peer");
- ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_path"), "set_root_path", "get_root_path");
- ADD_PROPERTY_DEFAULT("refuse_new_connections", false);
-
- ADD_SIGNAL(MethodInfo("peer_connected", PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("peer_disconnected", PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "packet")));
- ADD_SIGNAL(MethodInfo("connected_to_server"));
- ADD_SIGNAL(MethodInfo("connection_failed"));
- ADD_SIGNAL(MethodInfo("server_disconnected"));
-}
-
-MultiplayerAPI::MultiplayerAPI() {
- if (create_default_replication_interface) {
- replicator = Ref<MultiplayerReplicationInterface>(create_default_replication_interface(this));
- } else {
- replicator.instantiate();
- }
- if (create_default_rpc_interface) {
- rpc = Ref<MultiplayerRPCInterface>(create_default_rpc_interface(this));
- } else {
- rpc.instantiate();
- }
- if (create_default_cache_interface) {
- cache = Ref<MultiplayerCacheInterface>(create_default_cache_interface(this));
- } else {
- cache.instantiate();
- }
-}
-
-MultiplayerAPI::~MultiplayerAPI() {
- clear();
-}
diff --git a/core/multiplayer/multiplayer_api.h b/core/multiplayer/multiplayer_api.h
deleted file mode 100644
index 35452acb1f..0000000000
--- a/core/multiplayer/multiplayer_api.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*************************************************************************/
-/* multiplayer_api.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 MULTIPLAYER_API_H
-#define MULTIPLAYER_API_H
-
-#include "core/multiplayer/multiplayer.h"
-#include "core/multiplayer/multiplayer_peer.h"
-#include "core/object/ref_counted.h"
-
-class MultiplayerAPI;
-
-class MultiplayerReplicationInterface : public RefCounted {
- GDCLASS(MultiplayerReplicationInterface, RefCounted);
-
-public:
- virtual void on_peer_change(int p_id, bool p_connected) {}
- virtual void on_reset() {}
- virtual Error on_spawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) { return ERR_UNAVAILABLE; }
- virtual Error on_despawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) { return ERR_UNAVAILABLE; }
- virtual Error on_sync_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) { return ERR_UNAVAILABLE; }
- virtual Error on_spawn(Object *p_obj, Variant p_config) { return ERR_UNAVAILABLE; }
- virtual Error on_despawn(Object *p_obj, Variant p_config) { return ERR_UNAVAILABLE; }
- virtual Error on_replication_start(Object *p_obj, Variant p_config) { return ERR_UNAVAILABLE; }
- virtual Error on_replication_stop(Object *p_obj, Variant p_config) { return ERR_UNAVAILABLE; }
- virtual void on_network_process() {}
-
- MultiplayerReplicationInterface() {}
-};
-
-class MultiplayerRPCInterface : public RefCounted {
- GDCLASS(MultiplayerRPCInterface, RefCounted);
-
-public:
- // Called by Node.rpc
- virtual void rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {}
- virtual void process_rpc(int p_from, const uint8_t *p_packet, int p_packet_len) {}
- virtual String get_rpc_md5(const Object *p_obj) const { return String(); }
-
- MultiplayerRPCInterface() {}
-};
-
-class MultiplayerCacheInterface : public RefCounted {
- GDCLASS(MultiplayerCacheInterface, RefCounted);
-
-public:
- virtual void clear() {}
- virtual void on_peer_change(int p_id, bool p_connected) {}
- virtual void process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len) {}
- virtual void process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len) {}
-
- // Returns true if all peers have cached path.
- virtual bool send_object_cache(Object *p_obj, int p_target, int &r_id) { return false; }
- virtual int make_object_cache(Object *p_obj) { return false; }
- virtual Object *get_cached_object(int p_from, uint32_t p_cache_id) { return nullptr; }
- virtual bool is_cache_confirmed(NodePath p_path, int p_peer) { return false; }
-
- MultiplayerCacheInterface() {}
-};
-
-class MultiplayerAPI : public RefCounted {
- GDCLASS(MultiplayerAPI, RefCounted);
-
-public:
- enum NetworkCommands {
- NETWORK_COMMAND_REMOTE_CALL = 0,
- NETWORK_COMMAND_SIMPLIFY_PATH,
- NETWORK_COMMAND_CONFIRM_PATH,
- NETWORK_COMMAND_RAW,
- NETWORK_COMMAND_SPAWN,
- NETWORK_COMMAND_DESPAWN,
- NETWORK_COMMAND_SYNC,
- };
-
- // For each command, the 4 MSB can contain custom flags, as defined by subsystems.
- enum {
- CMD_FLAG_0_SHIFT = 4,
- CMD_FLAG_1_SHIFT = 5,
- CMD_FLAG_2_SHIFT = 6,
- CMD_FLAG_3_SHIFT = 7,
- };
-
- // This is the mask that will be used to extract the command.
- enum {
- CMD_MASK = 7, // 0x7 -> 0b00001111
- };
-
-private:
- Ref<MultiplayerPeer> multiplayer_peer;
- HashSet<int> connected_peers;
- int remote_sender_id = 0;
- int remote_sender_override = 0;
-
- Vector<uint8_t> packet_cache;
-
- NodePath root_path;
- bool allow_object_decoding = false;
-
- Ref<MultiplayerCacheInterface> cache;
- Ref<MultiplayerReplicationInterface> replicator;
- Ref<MultiplayerRPCInterface> rpc;
-
-protected:
- static void _bind_methods();
-
- void _process_packet(int p_from, const uint8_t *p_packet, int p_packet_len);
- void _process_raw(int p_from, const uint8_t *p_packet, int p_packet_len);
-
-public:
- static MultiplayerReplicationInterface *(*create_default_replication_interface)(MultiplayerAPI *p_multiplayer);
- static MultiplayerRPCInterface *(*create_default_rpc_interface)(MultiplayerAPI *p_multiplayer);
- static MultiplayerCacheInterface *(*create_default_cache_interface)(MultiplayerAPI *p_multiplayer);
-
- static Error encode_and_compress_variant(const Variant &p_variant, uint8_t *p_buffer, int &r_len, bool p_allow_object_decoding);
- static Error decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len, bool p_allow_object_decoding);
- static Error encode_and_compress_variants(const Variant **p_variants, int p_count, uint8_t *p_buffer, int &r_len, bool *r_raw = nullptr, bool p_allow_object_decoding = false);
- static Error decode_and_decompress_variants(Vector<Variant> &r_variants, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw = false, bool p_allow_object_decoding = false);
-
- void poll();
- void clear();
- void set_root_path(const NodePath &p_path);
- NodePath get_root_path() const;
- void set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer);
- Ref<MultiplayerPeer> get_multiplayer_peer() const;
-
- Error send_bytes(Vector<uint8_t> p_data, int p_to = MultiplayerPeer::TARGET_PEER_BROADCAST, Multiplayer::TransferMode p_mode = Multiplayer::TRANSFER_MODE_RELIABLE, int p_channel = 0);
-
- // RPC API
- void rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
- String get_rpc_md5(const Object *p_obj) const;
- // Replication API
- Error spawn(Object *p_object, Variant p_config);
- Error despawn(Object *p_object, Variant p_config);
- Error replication_start(Object *p_object, Variant p_config);
- Error replication_stop(Object *p_object, Variant p_config);
- // Cache API
- bool send_object_cache(Object *p_obj, int p_target, int &r_id);
- int make_object_cache(Object *p_obj);
- Object *get_cached_object(int p_from, uint32_t p_cache_id);
- bool is_cache_confirmed(NodePath p_path, int p_peer);
-
- void _add_peer(int p_id);
- void _del_peer(int p_id);
- void _connected_to_server();
- void _connection_failed();
- void _server_disconnected();
-
- bool has_multiplayer_peer() const { return multiplayer_peer.is_valid(); }
- Vector<int> get_peer_ids() const;
- const HashSet<int> get_connected_peers() const { return connected_peers; }
- int get_remote_sender_id() const { return remote_sender_override ? remote_sender_override : remote_sender_id; }
- void set_remote_sender_override(int p_id) { remote_sender_override = p_id; }
- int get_unique_id() const;
- bool is_server() const;
- void set_refuse_new_connections(bool p_refuse);
- bool is_refusing_new_connections() const;
-
- void set_allow_object_decoding(bool p_enable);
- bool is_object_decoding_allowed() const;
-
-#ifdef DEBUG_ENABLED
- void profile_bandwidth(const String &p_inout, int p_size);
-#endif
-
- MultiplayerAPI();
- ~MultiplayerAPI();
-};
-
-#endif // MULTIPLAYER_API_H
diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp
index fa1945cf79..13dc921c9f 100644
--- a/core/object/message_queue.cpp
+++ b/core/object/message_queue.cpp
@@ -226,7 +226,7 @@ void MessageQueue::_call_function(const Callable &p_callable, const Variant *p_a
Callable::CallError ce;
Variant ret;
- p_callable.call(argptrs, p_argcount, ret, ce);
+ p_callable.callp(argptrs, p_argcount, ret, ce);
if (p_show_error && ce.error != Callable::CallError::CALL_OK) {
ERR_PRINT("Error calling deferred method: " + Variant::get_callable_error_text(p_callable, argptrs, p_argcount, ce) + ".");
}
diff --git a/core/object/object.cpp b/core/object/object.cpp
index 5f2287c9d3..75dbe8872f 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -166,7 +166,6 @@ Object::Connection::operator Variant() const {
d["signal"] = signal;
d["callable"] = callable;
d["flags"] = flags;
- d["binds"] = binds;
return d;
}
@@ -189,9 +188,6 @@ Object::Connection::Connection(const Variant &p_variant) {
if (d.has("flags")) {
flags = d["flags"];
}
- if (d.has("binds")) {
- binds = d["binds"];
- }
}
bool Object::_predelete() {
@@ -973,8 +969,6 @@ Error Object::emit_signalp(const StringName &p_name, const Variant **p_args, int
OBJ_DEBUG_LOCK
- Vector<const Variant *> bind_mem;
-
Error err = OK;
for (int i = 0; i < ssize; i++) {
@@ -989,28 +983,13 @@ Error Object::emit_signalp(const StringName &p_name, const Variant **p_args, int
const Variant **args = p_args;
int argc = p_argcount;
- if (c.binds.size()) {
- //handle binds
- bind_mem.resize(p_argcount + c.binds.size());
-
- for (int j = 0; j < p_argcount; j++) {
- bind_mem.write[j] = p_args[j];
- }
- for (int j = 0; j < c.binds.size(); j++) {
- bind_mem.write[p_argcount + j] = &c.binds[j];
- }
-
- args = (const Variant **)bind_mem.ptr();
- argc = bind_mem.size();
- }
-
if (c.flags & CONNECT_DEFERRED) {
MessageQueue::get_singleton()->push_callablep(c.callable, args, argc, true);
} else {
Callable::CallError ce;
_emitting = true;
Variant ret;
- c.callable.call(args, argc, ret, ce);
+ c.callable.callp(args, argc, ret, ce);
_emitting = false;
if (ce.error != Callable::CallError::CALL_OK) {
@@ -1196,7 +1175,7 @@ void Object::get_signals_connected_to_this(List<Connection> *p_connections) cons
}
}
-Error Object::connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
+Error Object::connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags) {
ERR_FAIL_COND_V_MSG(p_callable.is_null(), ERR_INVALID_PARAMETER, "Cannot connect to '" + p_signal + "': the provided callable is null.");
Object *target_object = p_callable.get_object();
@@ -1244,7 +1223,6 @@ Error Object::connect(const StringName &p_signal, const Callable &p_callable, co
conn.callable = target;
conn.signal = ::Signal(this, p_signal);
conn.flags = p_flags;
- conn.binds = p_binds;
slot.conn = conn;
slot.cE = target_object->connections.push_back(conn);
if (p_flags & CONNECT_REFERENCE_COUNTED) {
@@ -1492,7 +1470,7 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_signal_connection_list", "signal"), &Object::_get_signal_connection_list);
ClassDB::bind_method(D_METHOD("get_incoming_connections"), &Object::_get_incoming_connections);
- ClassDB::bind_method(D_METHOD("connect", "signal", "callable", "binds", "flags"), &Object::connect, DEFVAL(Array()), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("connect", "signal", "callable", "flags"), &Object::connect, DEFVAL(0));
ClassDB::bind_method(D_METHOD("disconnect", "signal", "callable"), &Object::disconnect);
ClassDB::bind_method(D_METHOD("is_connected", "signal", "callable"), &Object::is_connected);
diff --git a/core/object/object.h b/core/object/object.h
index 17f75a4e1d..f3f89982d9 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -510,7 +510,6 @@ public:
Callable callable;
uint32_t flags = 0;
- Vector<Variant> binds;
bool operator<(const Connection &p_conn) const;
operator Variant() const;
@@ -829,7 +828,7 @@ public:
int get_persistent_signal_connection_count() const;
void get_signals_connected_to_this(List<Connection> *p_connections) const;
- Error connect(const StringName &p_signal, const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
+ Error connect(const StringName &p_signal, const Callable &p_callable, uint32_t p_flags = 0);
void disconnect(const StringName &p_signal, const Callable &p_callable);
bool is_connected(const StringName &p_signal, const Callable &p_callable) const;
diff --git a/core/object/script_language.h b/core/object/script_language.h
index 686ab5b8d3..c9f8a4f828 100644
--- a/core/object/script_language.h
+++ b/core/object/script_language.h
@@ -33,7 +33,6 @@
#include "core/doc_data.h"
#include "core/io/resource.h"
-#include "core/multiplayer/multiplayer.h"
#include "core/templates/pair.h"
#include "core/templates/rb_map.h"
@@ -159,7 +158,7 @@ public:
virtual bool is_placeholder_fallback_enabled() const { return false; }
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const = 0;
+ virtual const Variant get_rpc_config() const = 0;
Script() {}
};
@@ -213,7 +212,7 @@ public:
virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid);
virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid);
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const { return get_script()->get_rpc_methods(); }
+ virtual const Variant get_rpc_config() const { return get_script()->get_rpc_config(); }
virtual ScriptLanguage *get_language() = 0;
virtual ~ScriptInstance();
@@ -469,7 +468,7 @@ public:
virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid = nullptr) override;
virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid = nullptr) override;
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override { return Vector<Multiplayer::RPCConfig>(); }
+ virtual const Variant get_rpc_config() const override { return Variant(); }
PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner);
~PlaceHolderScriptInstance();
diff --git a/core/object/script_language_extension.cpp b/core/object/script_language_extension.cpp
index ab8dd6d1ee..9de784ea7f 100644
--- a/core/object/script_language_extension.cpp
+++ b/core/object/script_language_extension.cpp
@@ -74,7 +74,7 @@ void ScriptExtension::_bind_methods() {
GDVIRTUAL_BIND(_get_members);
GDVIRTUAL_BIND(_is_placeholder_fallback_enabled);
- GDVIRTUAL_BIND(_get_rpc_methods);
+ GDVIRTUAL_BIND(_get_rpc_config);
}
void ScriptLanguageExtension::_bind_methods() {
diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h
index 2c53139ec2..10eacfd9f7 100644
--- a/core/object/script_language_extension.h
+++ b/core/object/script_language_extension.h
@@ -173,28 +173,12 @@ public:
EXBIND0RC(bool, is_placeholder_fallback_enabled)
- GDVIRTUAL0RC(TypedArray<Dictionary>, _get_rpc_methods)
+ GDVIRTUAL0RC(Variant, _get_rpc_config)
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override {
- TypedArray<Dictionary> ret;
- GDVIRTUAL_REQUIRED_CALL(_get_rpc_methods, ret);
- Vector<Multiplayer::RPCConfig> rpcret;
- for (int i = 0; i < ret.size(); i++) {
- Dictionary d = ret[i];
- Multiplayer::RPCConfig rpc;
- ERR_CONTINUE(!d.has("name"));
- rpc.name = d["name"];
- ERR_CONTINUE(!d.has("rpc_mode"));
- rpc.rpc_mode = Multiplayer::RPCMode(int(d["rpc_mode"]));
- ERR_CONTINUE(!d.has("call_local"));
- rpc.call_local = d["call_local"];
- ERR_CONTINUE(!d.has("transfer_mode"));
- rpc.transfer_mode = Multiplayer::TransferMode(int(d["transfer_mode"]));
- ERR_CONTINUE(!d.has("channel"));
- rpc.channel = d["channel"];
- rpcret.push_back(rpc);
- }
- return rpcret;
+ virtual const Variant get_rpc_config() const override {
+ Variant ret;
+ GDVIRTUAL_REQUIRED_CALL(_get_rpc_config, ret);
+ return ret;
}
ScriptExtension() {}
diff --git a/core/object/worker_thread_pool.cpp b/core/object/worker_thread_pool.cpp
index 54738a673e..c770515b9e 100644
--- a/core/object/worker_thread_pool.cpp
+++ b/core/object/worker_thread_pool.cpp
@@ -72,7 +72,7 @@ void WorkerThreadPool::_process_task(Task *p_task) {
p_task->template_userdata->callback_indexed(work_index);
} else {
arg = work_index;
- p_task->callable.call((const Variant **)&argptr, 1, ret, ce);
+ p_task->callable.callp((const Variant **)&argptr, 1, ret, ce);
}
// This is the only way to ensure posting is done when all tasks are really complete.
@@ -123,7 +123,7 @@ void WorkerThreadPool::_process_task(Task *p_task) {
} else {
Callable::CallError ce;
Variant ret;
- p_task->callable.call(nullptr, 0, ret, ce);
+ p_task->callable.callp(nullptr, 0, ret, ce);
}
p_task->completed = true;
diff --git a/core/os/os.cpp b/core/os/os.cpp
index b9daf6fa53..1358c926d1 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -159,7 +159,7 @@ int OS::get_process_id() const {
}
void OS::vibrate_handheld(int p_duration_ms) {
- WARN_PRINT("vibrate_handheld() only works with Android and iOS");
+ WARN_PRINT("vibrate_handheld() only works with Android, iOS and HTML5");
}
bool OS::is_stdout_verbose() const {
@@ -362,9 +362,10 @@ String OS::get_model_name() const {
return "GenericDevice";
}
-void OS::set_cmdline(const char *p_execpath, const List<String> &p_args) {
+void OS::set_cmdline(const char *p_execpath, const List<String> &p_args, const List<String> &p_user_args) {
_execpath = String::utf8(p_execpath);
_cmdline = p_args;
+ _user_args = p_user_args;
}
String OS::get_unique_id() const {
diff --git a/core/os/os.h b/core/os/os.h
index 0428f6df2a..9152b797ef 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -46,6 +46,7 @@ class OS {
static uint64_t target_ticks;
String _execpath;
List<String> _cmdline;
+ List<String> _user_args;
bool _keep_screen_on = true; // set default value to true, because this had been true before godot 2.0.
bool low_processor_usage_mode = false;
int low_processor_usage_mode_sleep_usec = 10000;
@@ -106,7 +107,7 @@ protected:
virtual void finalize() = 0;
virtual void finalize_core() = 0;
- virtual void set_cmdline(const char *p_execpath, const List<String> &p_args);
+ virtual void set_cmdline(const char *p_execpath, const List<String> &p_args, const List<String> &p_user_args);
virtual bool _check_internal_feature_support(const String &p_feature) = 0;
@@ -142,6 +143,8 @@ public:
virtual void set_low_processor_usage_mode_sleep_usec(int p_usec);
virtual int get_low_processor_usage_mode_sleep_usec() const;
+ virtual Vector<String> get_system_fonts() const { return Vector<String>(); };
+ virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const { return String(); };
virtual String get_executable_path() const;
virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0;
@@ -160,6 +163,7 @@ public:
virtual String get_name() const = 0;
virtual List<String> get_cmdline_args() const { return _cmdline; }
+ virtual List<String> get_cmdline_user_args() const { return _user_args; }
virtual List<String> get_cmdline_platform_args() const { return List<String>(); }
virtual String get_model_name() const;
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index aab4b9a580..1ae5d1c83f 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -69,8 +69,6 @@
#include "core/math/geometry_3d.h"
#include "core/math/random_number_generator.h"
#include "core/math/triangle_mesh.h"
-#include "core/multiplayer/multiplayer_api.h"
-#include "core/multiplayer/multiplayer_peer.h"
#include "core/object/class_db.h"
#include "core/object/script_language_extension.h"
#include "core/object/undo_redo.h"
@@ -212,9 +210,6 @@ void register_core_types() {
resource_format_loader_crypto.instantiate();
ResourceLoader::add_resource_format_loader(resource_format_loader_crypto);
- GDREGISTER_ABSTRACT_CLASS(MultiplayerPeer);
- GDREGISTER_CLASS(MultiplayerPeerExtension);
- GDREGISTER_CLASS(MultiplayerAPI);
GDREGISTER_CLASS(MainLoop);
GDREGISTER_CLASS(Translation);
GDREGISTER_CLASS(OptimizedTranslation);
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index beefe54faf..e93375bff7 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -1656,7 +1656,7 @@ String String::utf8(const char *p_utf8, int p_len) {
return ret;
}
-Error String::parse_utf8(const char *p_utf8, int p_len) {
+Error String::parse_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
if (!p_utf8) {
return ERR_INVALID_DATA;
}
@@ -1689,6 +1689,10 @@ Error String::parse_utf8(const char *p_utf8, int p_len) {
uint8_t c = *ptrtmp >= 0 ? *ptrtmp : uint8_t(256 + *ptrtmp);
if (skip == 0) {
+ if (p_skip_cr && c == '\r') {
+ ptrtmp++;
+ continue;
+ }
/* Determine the number of characters in sequence */
if ((c & 0x80) == 0) {
skip = 0;
@@ -1753,6 +1757,10 @@ Error String::parse_utf8(const char *p_utf8, int p_len) {
uint8_t c = *p_utf8 >= 0 ? *p_utf8 : uint8_t(256 + *p_utf8);
if (skip == 0) {
+ if (p_skip_cr && c == '\r') {
+ p_utf8++;
+ continue;
+ }
/* Determine the number of characters in sequence */
if ((c & 0x80) == 0) {
*(dst++) = c;
diff --git a/core/string/ustring.h b/core/string/ustring.h
index 7672663964..6c3169f136 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -377,7 +377,7 @@ public:
CharString ascii(bool p_allow_extended = false) const;
CharString utf8() const;
- Error parse_utf8(const char *p_utf8, int p_len = -1);
+ Error parse_utf8(const char *p_utf8, int p_len = -1, bool p_skip_cr = false);
static String utf8(const char *p_utf8, int p_len = -1);
Char16String utf16() const;
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index af166e09a3..c1bdd6a6bc 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -441,7 +441,7 @@ Array Array::filter(const Callable &p_callable) const {
Variant result;
Callable::CallError ce;
- p_callable.call(argptrs, 1, result, ce);
+ p_callable.callp(argptrs, 1, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(Array(), "Error calling method from 'filter': " + Variant::get_callable_error_text(p_callable, argptrs, 1, ce));
}
@@ -467,7 +467,7 @@ Array Array::map(const Callable &p_callable) const {
Variant result;
Callable::CallError ce;
- p_callable.call(argptrs, 1, result, ce);
+ p_callable.callp(argptrs, 1, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(Array(), "Error calling method from 'map': " + Variant::get_callable_error_text(p_callable, argptrs, 1, ce));
}
@@ -493,7 +493,7 @@ Variant Array::reduce(const Callable &p_callable, const Variant &p_accum) const
Variant result;
Callable::CallError ce;
- p_callable.call(argptrs, 2, result, ce);
+ p_callable.callp(argptrs, 2, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(Variant(), "Error calling method from 'reduce': " + Variant::get_callable_error_text(p_callable, argptrs, 2, ce));
}
@@ -510,7 +510,7 @@ bool Array::any(const Callable &p_callable) const {
Variant result;
Callable::CallError ce;
- p_callable.call(argptrs, 1, result, ce);
+ p_callable.callp(argptrs, 1, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(false, "Error calling method from 'any': " + Variant::get_callable_error_text(p_callable, argptrs, 1, ce));
}
@@ -532,7 +532,7 @@ bool Array::all(const Callable &p_callable) const {
Variant result;
Callable::CallError ce;
- p_callable.call(argptrs, 1, result, ce);
+ p_callable.callp(argptrs, 1, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(false, "Error calling method from 'all': " + Variant::get_callable_error_text(p_callable, argptrs, 1, ce));
}
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp
index f20ec4037a..28efb43fc5 100644
--- a/core/variant/callable.cpp
+++ b/core/variant/callable.cpp
@@ -36,11 +36,11 @@
#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
-void Callable::call_deferred(const Variant **p_arguments, int p_argcount) const {
+void Callable::call_deferredp(const Variant **p_arguments, int p_argcount) const {
MessageQueue::get_singleton()->push_callablep(*this, p_arguments, p_argcount);
}
-void Callable::call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const {
+void Callable::callp(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const {
if (is_null()) {
r_call_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL;
r_call_error.argument = 0;
@@ -63,21 +63,23 @@ void Callable::call(const Variant **p_arguments, int p_argcount, Variant &r_retu
}
}
-void Callable::rpc(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const {
+Error Callable::rpcp(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const {
if (is_null()) {
r_call_error.error = CallError::CALL_ERROR_INSTANCE_IS_NULL;
r_call_error.argument = 0;
r_call_error.expected = 0;
+ return ERR_UNCONFIGURED;
} else if (!is_custom()) {
r_call_error.error = CallError::CALL_ERROR_INVALID_METHOD;
r_call_error.argument = 0;
r_call_error.expected = 0;
+ return ERR_UNCONFIGURED;
} else {
- custom->rpc(p_id, p_arguments, p_argcount, r_call_error);
+ return custom->rpc(p_id, p_arguments, p_argcount, r_call_error);
}
}
-Callable Callable::bind(const Variant **p_arguments, int p_argcount) const {
+Callable Callable::bindp(const Variant **p_arguments, int p_argcount) const {
Vector<Variant> args;
args.resize(p_argcount);
for (int i = 0; i < p_argcount; i++) {
@@ -316,10 +318,11 @@ StringName CallableCustom::get_method() const {
ERR_FAIL_V_MSG(StringName(), vformat("Can't get method on CallableCustom \"%s\".", get_as_text()));
}
-void CallableCustom::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
+Error CallableCustom::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
r_call_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
r_call_error.argument = 0;
r_call_error.expected = 0;
+ return ERR_UNCONFIGURED;
}
const Callable *CallableCustom::get_base_comparator() const {
@@ -387,7 +390,7 @@ Error Signal::connect(const Callable &p_callable, uint32_t p_flags) {
Object *object = get_object();
ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED);
- return object->connect(name, p_callable, varray(), p_flags);
+ return object->connect(name, p_callable, p_flags);
}
void Signal::disconnect(const Callable &p_callable) {
@@ -435,7 +438,7 @@ bool CallableComparator::operator()(const Variant &p_l, const Variant &p_r) cons
const Variant *args[2] = { &p_l, &p_r };
Callable::CallError err;
Variant res;
- func.call(args, 2, res, err);
+ func.callp(args, 2, res, err);
ERR_FAIL_COND_V_MSG(err.error != Callable::CallError::CALL_OK, false,
"Error calling compare method: " + Variant::get_callable_error_text(func, args, 2, err));
return res;
diff --git a/core/variant/callable.h b/core/variant/callable.h
index bbcf5427ba..1f1c983eb3 100644
--- a/core/variant/callable.h
+++ b/core/variant/callable.h
@@ -45,6 +45,7 @@ class CallableCustom;
// but can be optimized or customized.
// Enforce 16 bytes with `alignas` to avoid arch-specific alignment issues on x86 vs armv7.
+
class Callable {
alignas(8) StringName method;
union {
@@ -68,10 +69,10 @@ public:
int expected = 0;
};
- void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;
- void call_deferred(const Variant **p_arguments, int p_argcount) const;
+ void callp(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;
+ void call_deferredp(const Variant **p_arguments, int p_argcount) const;
- void rpc(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const;
+ Error rpcp(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const;
_FORCE_INLINE_ bool is_null() const {
return method == StringName() && object == 0;
@@ -84,7 +85,10 @@ public:
}
bool is_valid() const;
- Callable bind(const Variant **p_arguments, int p_argcount) const;
+ template <typename... VarArgs>
+ Callable bind(VarArgs... p_args);
+
+ Callable bindp(const Variant **p_arguments, int p_argcount) const;
Callable unbind(int p_argcount) const;
Object *get_object() const;
@@ -129,7 +133,7 @@ public:
virtual StringName get_method() const;
virtual ObjectID get_object() const = 0; //must always be able to provide an object
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const = 0;
- virtual void rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const;
+ virtual Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const;
virtual const Callable *get_base_comparator() const;
CallableCustom();
diff --git a/core/variant/callable_bind.cpp b/core/variant/callable_bind.cpp
index 1a400b4360..d26aa2ae46 100644
--- a/core/variant/callable_bind.cpp
+++ b/core/variant/callable_bind.cpp
@@ -96,7 +96,7 @@ void CallableCustomBind::call(const Variant **p_arguments, int p_argcount, Varia
args[i + p_argcount] = (const Variant *)&binds[i];
}
- callable.call(args, p_argcount + binds.size(), r_return_value, r_call_error);
+ callable.callp(args, p_argcount + binds.size(), r_return_value, r_call_error);
}
CallableCustomBind::CallableCustomBind(const Callable &p_callable, const Vector<Variant> &p_binds) {
@@ -171,7 +171,7 @@ void CallableCustomUnbind::call(const Variant **p_arguments, int p_argcount, Var
r_call_error.expected = argcount;
return;
}
- callable.call(p_arguments, p_argcount - argcount, r_return_value, r_call_error);
+ callable.callp(p_arguments, p_argcount - argcount, r_return_value, r_call_error);
}
CallableCustomUnbind::CallableCustomUnbind(const Callable &p_callable, int p_argcount) {
@@ -181,28 +181,3 @@ CallableCustomUnbind::CallableCustomUnbind(const Callable &p_callable, int p_arg
CallableCustomUnbind::~CallableCustomUnbind() {
}
-
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1) {
- const Variant *args[1] = { &p_arg1 };
- return p_callable.bind(args, 1);
-}
-
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2) {
- const Variant *args[2] = { &p_arg1, &p_arg2 };
- return p_callable.bind(args, 2);
-}
-
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3) {
- const Variant *args[3] = { &p_arg1, &p_arg2, &p_arg3 };
- return p_callable.bind(args, 3);
-}
-
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4) {
- const Variant *args[4] = { &p_arg1, &p_arg2, &p_arg3, &p_arg4 };
- return p_callable.bind(args, 4);
-}
-
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4, const Variant &p_arg5) {
- const Variant *args[5] = { &p_arg1, &p_arg2, &p_arg3, &p_arg4, &p_arg5 };
- return p_callable.bind(args, 5);
-}
diff --git a/core/variant/callable_bind.h b/core/variant/callable_bind.h
index a5c830e109..f7351d29e0 100644
--- a/core/variant/callable_bind.h
+++ b/core/variant/callable_bind.h
@@ -84,10 +84,4 @@ public:
virtual ~CallableCustomUnbind();
};
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1);
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2);
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3);
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4);
-Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4, const Variant &p_arg5);
-
#endif // CALLABLE_BIND_H
diff --git a/core/variant/variant.h b/core/variant/variant.h
index 465c31730c..bfa110842a 100644
--- a/core/variant/variant.h
+++ b/core/variant/variant.h
@@ -784,4 +784,14 @@ const Variant::ObjData &Variant::_get_obj() const {
String vformat(const String &p_text, const Variant &p1 = Variant(), const Variant &p2 = Variant(), const Variant &p3 = Variant(), const Variant &p4 = Variant(), const Variant &p5 = Variant());
+template <typename... VarArgs>
+Callable Callable::bind(VarArgs... p_args) {
+ Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
+ const Variant *argptrs[sizeof...(p_args) + 1];
+ for (uint32_t i = 0; i < sizeof...(p_args); i++) {
+ argptrs[i] = &args[i];
+ }
+ return bindp(sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args));
+}
+
#endif // VARIANT_H
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 7518d81233..b933a90a48 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -895,17 +895,17 @@ struct _VariantCall {
static void func_Callable_call(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
Callable *callable = VariantGetInternalPtr<Callable>::get_ptr(v);
- callable->call(p_args, p_argcount, r_ret, r_error);
+ callable->callp(p_args, p_argcount, r_ret, r_error);
}
static void func_Callable_call_deferred(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
Callable *callable = VariantGetInternalPtr<Callable>::get_ptr(v);
- callable->call_deferred(p_args, p_argcount);
+ callable->call_deferredp(p_args, p_argcount);
}
static void func_Callable_rpc(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
Callable *callable = VariantGetInternalPtr<Callable>::get_ptr(v);
- callable->rpc(0, p_args, p_argcount, r_error);
+ callable->rpcp(0, p_args, p_argcount, r_error);
}
static void func_Callable_rpc_id(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
@@ -920,13 +920,13 @@ struct _VariantCall {
r_error.expected = Variant::INT;
} else {
Callable *callable = VariantGetInternalPtr<Callable>::get_ptr(v);
- callable->rpc(*p_args[0], &p_args[1], p_argcount - 1, r_error);
+ callable->rpcp(*p_args[0], &p_args[1], p_argcount - 1, r_error);
}
}
static void func_Callable_bind(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
Callable *callable = VariantGetInternalPtr<Callable>::get_ptr(v);
- r_ret = callable->bind(p_args, p_argcount);
+ r_ret = callable->bindp(p_args, p_argcount);
}
static void func_Signal_emit(Variant *v, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
@@ -1731,8 +1731,12 @@ static void _register_variant_builtin_methods() {
bind_method(Vector4, max_axis_index, sarray(), varray());
bind_method(Vector4, length, sarray(), varray());
bind_method(Vector4, length_squared, sarray(), varray());
- bind_method(Vector4, sign, sarray(), varray());
bind_method(Vector4, abs, sarray(), varray());
+ bind_method(Vector4, sign, sarray(), varray());
+ bind_method(Vector4, floor, sarray(), varray());
+ bind_method(Vector4, ceil, sarray(), varray());
+ bind_method(Vector4, round, sarray(), varray());
+ bind_method(Vector4, lerp, sarray("to", "weight"), varray());
bind_method(Vector4, clamp, sarray("min", "max"), varray());
bind_method(Vector4, normalized, sarray(), varray());
bind_method(Vector4, is_normalized, sarray(), varray());
@@ -1777,7 +1781,7 @@ static void _register_variant_builtin_methods() {
bind_method(Quaternion, dot, sarray("with"), varray());
bind_method(Quaternion, slerp, sarray("to", "weight"), varray());
bind_method(Quaternion, slerpni, sarray("to", "weight"), varray());
- bind_method(Quaternion, cubic_slerp, sarray("b", "pre_a", "post_b", "weight"), varray());
+ bind_method(Quaternion, spherical_cubic_interpolate, sarray("b", "pre_a", "post_b", "weight"), varray());
bind_method(Quaternion, get_euler, sarray(), varray());
bind_method(Quaternion, get_axis, sarray(), varray());
bind_method(Quaternion, get_angle, sarray(), varray());
@@ -1879,7 +1883,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform2D, orthonormalized, sarray(), varray());
bind_method(Transform2D, rotated, sarray("angle"), varray());
bind_method(Transform2D, scaled, sarray("scale"), varray());
- bind_method(Transform2D, translated, sarray("offset"), varray());
+ bind_method(Transform2D, translated_local, sarray("offset"), varray());
bind_method(Transform2D, basis_xform, sarray("v"), varray());
bind_method(Transform2D, basis_xform_inv, sarray("v"), varray());
bind_method(Transform2D, interpolate_with, sarray("xform", "weight"), varray());
@@ -1944,9 +1948,9 @@ static void _register_variant_builtin_methods() {
bind_method(Transform3D, orthonormalized, sarray(), varray());
bind_method(Transform3D, rotated, sarray("axis", "angle"), varray());
bind_method(Transform3D, scaled, sarray("scale"), varray());
- bind_method(Transform3D, translated, sarray("offset"), varray());
+ bind_method(Transform3D, translated_local, sarray("offset"), varray());
bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
- bind_method(Transform3D, sphere_interpolate_with, sarray("xform", "weight"), varray());
+ bind_method(Transform3D, spherical_interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, is_equal_approx, sarray("xform"), varray());
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 1df5fa969e..34653310b1 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -1575,11 +1575,11 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
case Variant::VECTOR4: {
Vector4 v = p_variant;
- p_store_string_func(p_store_string_ud, "Vector4(" + rtos_fix(v.x) + ", " + rtos_fix(v.y) + ", " + rtos_fix(v.z) + ")");
+ p_store_string_func(p_store_string_ud, "Vector4(" + rtos_fix(v.x) + ", " + rtos_fix(v.y) + ", " + rtos_fix(v.z) + ", " + rtos_fix(v.w) + ")");
} break;
case Variant::VECTOR4I: {
Vector4i v = p_variant;
- p_store_string_func(p_store_string_ud, "Vector4i(" + itos(v.x) + ", " + itos(v.y) + ", " + itos(v.z) + ")");
+ p_store_string_func(p_store_string_ud, "Vector4i(" + itos(v.x) + ", " + itos(v.y) + ", " + itos(v.z) + ", " + itos(v.w) + ")");
} break;
case Variant::PLANE: {
Plane p = p_variant;
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index 92dbf45f2a..57b953f7f0 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -819,6 +819,8 @@ INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector2, double, real_t, 2)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector2i, int64_t, int32_t, 2)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector3, double, real_t, 3)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector3i, int64_t, int32_t, 3)
+INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector4, double, real_t, 4)
+INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Vector4i, int64_t, int32_t, 4)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Quaternion, double, real_t, 4)
INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Color, double, float, 4)
@@ -883,6 +885,8 @@ void register_indexed_setters_getters() {
REGISTER_INDEXED_MEMBER(Vector2i);
REGISTER_INDEXED_MEMBER(Vector3);
REGISTER_INDEXED_MEMBER(Vector3i);
+ REGISTER_INDEXED_MEMBER(Vector4);
+ REGISTER_INDEXED_MEMBER(Vector4i);
REGISTER_INDEXED_MEMBER(Quaternion);
REGISTER_INDEXED_MEMBER(Color);
REGISTER_INDEXED_MEMBER(Transform2D);
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 30a2228294..709863b70f 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2728,24 +2728,6 @@
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
- <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
- </constant>
- <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
- </constant>
- <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority].
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
- </constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
</constant>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a92b237624..f40f11944d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -391,13 +391,13 @@
</description>
</method>
<method name="track_insert_key">
- <return type="void" />
+ <return type="int" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="time" type="float" />
<argument index="2" name="key" type="Variant" />
<argument index="3" name="transition" type="float" default="1" />
<description>
- Insert a generic key in a given track.
+ Inserts a generic key in a given track. Returns the key index.
</description>
</method>
<method name="track_is_compressed" qualifiers="const">
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 653607610d..b24c439432 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -220,6 +220,10 @@
<member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode" default="0">
The call mode to use for Call Method tracks.
</member>
+ <member name="movie_quit_on_finish" type="bool" setter="set_movie_quit_on_finish_enabled" getter="is_movie_quit_on_finish_enabled" default="false">
+ If [code]true[/code] and the engine is running in Movie Maker mode (see [MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an animation is done playing in this [AnimationPlayer]. A message is printed when the engine quits for this reason.
+ [b]Note:[/b] This obeys the same logic as the [signal animation_finished] signal, so it will not quit the engine if the animation is set to be looping.
+ </member>
<member name="playback_active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code], updates animations in response to process-related notifications.
</member>
@@ -253,6 +257,7 @@
<argument index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation finished playing.
+ [b]Note:[/b] This signal is not emitted if an animation is looping.
</description>
</signal>
<signal name="animation_started">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 0f2dd6587a..f5c799d4de 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -67,7 +67,7 @@
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear_blend_shapes">
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 9728011bb2..32a6aea340 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -14,7 +14,7 @@
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
- <return type="AudioStreamSample" />
+ <return type="AudioStreamWAV" />
<description>
Returns the recorded sample.
</description>
@@ -34,8 +34,8 @@
</method>
</methods>
<members>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
- Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="1">
+ Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats.
</member>
</members>
</class>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 68f64505d0..7645cafe86 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -4,7 +4,7 @@
Base class for audio streams.
</brief_description>
<description>
- Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
+ Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via [AudioStreamOggVorbis]) file formats.
</description>
<tutorials>
<link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index d3d97e0c8a..f1a1c18c1c 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -4,7 +4,7 @@
Meta class for playing back audio.
</brief_description>
<description>
- Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage.
+ Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOggVorbis] for usage.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamWAV.xml
index 62f27ce876..17595aec2f 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamWAV.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AudioStreamWAV" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
<description>
- AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
+ AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
</description>
<tutorials>
@@ -14,7 +14,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
+ Saves the AudioStreamWAV as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
</description>
</method>
@@ -24,7 +24,7 @@
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="0">
Audio format. See [enum Format] constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0">
@@ -33,7 +33,7 @@
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0">
The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present.
</member>
- <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0">
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamWAV.LoopMode" default="0">
The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 6c5cd62fe1..795bd7a429 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -159,10 +159,10 @@
Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
- Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity.
</member>
<member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
- Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 5d025985cc..95d99855f6 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -16,7 +16,8 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -218,17 +219,19 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
+ Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_shape_entered">
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 2aac5528f4..7284a7e341 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -18,6 +18,7 @@
<argument index="4" name="shape_idx" type="int" />
<description>
Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -199,12 +200,14 @@
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse pointer enters any of this object's shapes.
+ Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes.
+ Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
</signals>
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index 861b4b480c..3322ab4c66 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -58,34 +58,35 @@
</methods>
<members>
<member name="albedo_mix" type="float" setter="set_albedo_mix" getter="get_albedo_mix" default="1.0">
- Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh.
+ Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh. This can be set to [code]0.0[/code] to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also [member modulate].
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
</member>
- <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0">
- Distance from the camera at which the Decal begins to fade away.
+ <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="40.0">
+ The distance from the camera at which the Decal begins to fade away (in 3D units).
</member>
<member name="distance_fade_enabled" type="bool" setter="set_enable_distance_fade" getter="is_distance_fade_enabled" default="false">
- If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
+ If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
</member>
- <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="1.0">
- Distance over which the Decal fades. The Decal becomes slowly more transparent over this distance and is completely invisible at the end.
+ <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
+ The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
- Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
+ Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also [member modulate].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code].
</member>
<member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member upper_fade].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
- Changes the [Color] of the Decal by multiplying it with this value.
+ Changes the [Color] of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also [member emission_energy] and [member albedo_mix] to change the emission and albedo intensity independently of each other.
</member>
<member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0">
Fades the Decal if the angle between the Decal's [AABB] and the target surface becomes too large. A value of [code]0[/code] projects the Decal regardless of angle, a value of [code]1[/code] limits the Decal to surfaces that are nearly perpendicular.
+ [b]Note:[/b] Setting [member normal_fade] to a value greater than [code]0.0[/code] has a small performance cost due to the added normal angle computations.
</member>
<member name="texture_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the base [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
@@ -98,13 +99,15 @@
<member name="texture_normal" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the per-pixel normal map for the decal. Use this to add extra detail to decals.
[b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a normal-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity).
</member>
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
[b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
</member>
<member name="upper_fade" type="float" setter="set_upper_fade" getter="get_upper_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member lower_fade].
</member>
</members>
<constants>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index 2ab87b0dd1..a6bdc294ac 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -57,7 +57,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] button.
+ Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] method.
</description>
</method>
<method name="set_disable_class">
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index d44c08cb0f..2975ea6d75 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -48,6 +48,12 @@
[/codeblock]
</description>
</method>
+ <method name="get_project_settings_dir" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved.
+ </description>
+ </method>
<method name="get_self_contained_file" qualifiers="const">
<return type="String" />
<description>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 84f8523da3..586458bd28 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -101,6 +101,13 @@
Used by sub-inspectors. Emit it if what was selected was an Object ID.
</description>
</signal>
+ <signal name="property_can_revert_changed">
+ <argument index="0" name="property" type="StringName" />
+ <argument index="1" name="can_revert" type="bool" />
+ <description>
+ Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
+ </description>
+ </signal>
<signal name="property_changed">
<argument index="0" name="property" type="StringName" />
<argument index="1" name="value" type="Variant" />
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index ac2250ab6d..687c3d70ca 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -105,12 +105,6 @@
Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata].
</description>
</method>
- <method name="get_project_settings_dir" qualifiers="const">
- <return type="String" />
- <description>
- Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.
- </description>
- </method>
<method name="get_recent_dirs" qualifiers="const">
<return type="PackedStringArray" />
<description>
@@ -200,6 +194,454 @@
</description>
</method>
</methods>
+ <members>
+ <member name="debugger/profiler_frame_history_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/always_show_folders" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/textfile_extensions" type="String" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/start_create_dialog_fully_expanded" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color1" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color2" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_ik_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_width" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/constrain_editor_view" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/guides_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/smart_snapping_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/viewport_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_fov" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_far" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_near" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_activation_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_base_speed" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_speed_zoom_link" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_bias" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_max" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_min" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_numpad" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_x_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_y_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/orbit_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/pan_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_style" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/translation_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/zoom_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_steps" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/secondary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/confirm_insert_track" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_past_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/grid_map/pick_distance" type="float" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_pan_speed" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/animation_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/simple_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/panning/sub_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/point_grab_radius" type="int" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/show_previous_outline" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/display_grid" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/lines_curvature" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/visualshader/port_preview_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/default_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/display_mode" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/show_hidden_files" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/compress_binary_resources" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/safe_save_on_backup_then_rename" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_contextual_ligatures" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_opentype_features" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_variations" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/custom_display_scale" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/debug/enable_pseudolocalization" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/display_scale" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/editor_language" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_antialiased" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_hinting" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_bold" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/mouse_extra_buttons_navigate_history" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/show_internal_errors_in_toast_notifications" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/single_window_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
+ </member>
+ <member name="interface/inspector/show_low_level_opentype_features" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/display_close_button" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/maximum_width" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_script_button" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_thumbnail_on_hover" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/theme/accent_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/additional_spacing" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/base_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/border_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/contrast" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/corner_radius" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/custom_theme" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_and_font_color" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_saturation" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/preset" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/relationship_line_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_host" type="String" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_port" type="int" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/host" type="String" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/port" type="int" setter="" getter="">
+ </member>
+ <member name="network/ssl/editor_ssl_certificates" type="String" setter="" getter="">
+ </member>
+ <member name="project_manager/sorting_order" type="int" setter="" getter="">
+ </member>
+ <member name="run/auto_save/save_before_running" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_clear_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_close_output_on_stop" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_open_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/font_size" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
+ </member>
+ <member name="run/window_placement/screen" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink_speed" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_all_occurrences" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_soft_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/show_line_length_guidelines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/highlight_type_safe_lines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/line_numbers_zero_padded" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_bookmark_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_info_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_line_numbers" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/code_folding" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/word_wrap" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/minimap_width" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/show_minimap" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_spaces" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_tabs" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/line_spacing" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/autosave_interval_secs" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/convert_indent_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/restore_scripts_on_load" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/move_caret_on_right_click" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/smooth_scrolling" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/stay_in_script_editor_on_node_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/v_scroll_speed" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/code_complete_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/complete_file_paths" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/idle_parse_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/put_callhint_tooltip_below_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/help/class_reference_examples" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_source_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_title_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/show_help_index" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/show_members_overview" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/sort_members_outline_alphabetically" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/color_theme" type="String" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/base_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/brace_mismatch_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/breakpoint_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/code_folding_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/comment_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_existing_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_font_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_hovered_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/control_flow_keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/current_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/engine_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/executing_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/function_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/mark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/member_variable_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/safe_line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/selection_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/string_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/symbol_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
+ </member>
+ </members>
<signals>
<signal name="settings_changed">
<description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 506992e3af..36dfee833b 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -151,6 +151,12 @@
[/codeblocks]
</description>
</method>
+ <method name="get_write_movie_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the path to the [MovieWriter]'s output file, or an empty string if the engine wasn't started in Movie Maker mode. This path can be absolute or relative depending on how the user specified it.
+ </description>
+ </method>
<method name="has_singleton" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 0b4a8fa46e..3a2776ff21 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -115,9 +115,10 @@
</method>
<method name="get_as_text" qualifiers="const">
<return type="String" />
+ <argument index="0" name="skip_cr" type="bool" default="false" />
<description>
- Returns the whole file as a [String].
- Text is interpreted as being UTF-8 encoded.
+ Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded.
+ If [code]skip_cr[/code] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention).
</description>
</method>
<method name="get_buffer" qualifiers="const">
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 6377c829e1..ec2776f636 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -14,8 +14,8 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
- <argument index="3" name="modulate" type="int" />
- <argument index="4" name="arg4" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
@@ -26,9 +26,9 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="modulate" type="int" default="-1" />
- <argument index="5" name="arg5" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="3" name="font_size" type="int" />
+ <argument index="4" name="size" type="int" default="-1" />
+ <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
@@ -129,7 +129,7 @@
<method name="get_char_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="arg1" type="int" />
+ <argument index="1" name="font_size" type="int" />
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index aaf871d55a..dc2cbdde63 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FontFile" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- FontFile source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
</brief_description>
<description>
[FontFile] contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback [Font]s to use.
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index b84e221d1c..195c481187 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -126,7 +126,7 @@
<return type="Dictionary" />
<argument index="0" name="sizes" type="PackedVector2Array" />
<description>
- Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
+ Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is an array of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
</description>
</method>
<method name="merge_polygons">
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 965dbe7449..33145dccd0 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -55,6 +55,29 @@
[/codeblock]
</description>
</method>
+ <method name="_is_node_hover_valid" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="from" type="StringName" />
+ <argument index="1" name="from_slot" type="int" />
+ <argument index="2" name="to" type="StringName" />
+ <argument index="3" name="to_slot" type="int" />
+ <description>
+ This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
+ Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
+ In this example a connection to same node is suppressed:
+ [codeblocks]
+ [gdscript]
+ func _is_node_hover_valid(from, from_slot, to, to_slot):
+ return from != to
+ [/gdscript]
+ [csharp]
+ public override bool _IsNodeHoverValid(String from, int fromSlot, String to, int toSlot) {
+ return from != to;
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 00601cec75..201c0ddd38 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -30,7 +30,7 @@
<description>
Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays].
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index e73021ead4..796a80873f 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -354,9 +354,11 @@
<return type="void" />
<argument index="0" name="duration_ms" type="int" default="500" />
<description>
- Vibrate Android and iOS devices.
+ Vibrate handheld devices.
+ [b]Note:[/b] This method is implemented on Android, iOS, and HTML5.
[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset.
[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later.
+ [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method.
</description>
</method>
<method name="warp_mouse">
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
index 2c3c27079a..5ba0a2d79a 100644
--- a/doc/classes/Label3D.xml
+++ b/doc/classes/Label3D.xml
@@ -79,7 +79,7 @@
</member>
<member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1">
Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
@@ -90,7 +90,7 @@
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
@@ -126,7 +126,7 @@
If set, lights in the environment affect the label.
</constant>
<constant name="FLAG_DOUBLE_SIDED" value="1" enum="DrawFlags">
- If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
+ If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
</constant>
<constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="DrawFlags">
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index f368190a29..24f1f9918b 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reusing geometry, which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 059d147979..06658bf004 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,88 +1,108 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerAPI" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- High-level multiplayer API.
+ High-level multiplayer API interface.
</brief_description>
<description>
- This class implements the high-level multiplayer API. See also [MultiplayerPeer].
- By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
+ Base class for high-level multiplayer API implementations. See also [MultiplayerPeer].
+ By default, [SceneTree] has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the [method SceneTree.set_multiplayer] method, effectively allowing to run both client and server in the same scene.
- [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
- [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
+ It is also possible to extend or replace the default implementation via scripting or native extensions. See [MultiplayerAPIExtension] for details about extensions, [SceneMultiplayer] for the details about the default implementation.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="clear">
- <return type="void" />
+ <method name="create_default_interface" qualifiers="static">
+ <return type="MultiplayerAPI" />
+ <description>
+ Returns a new instance of the default MultiplayerAPI.
+ </description>
+ </method>
+ <method name="get_default_interface" qualifiers="static">
+ <return type="StringName" />
<description>
- Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing).
+ Returns the default MultiplayerAPI implementation class name. This is usually [code]"SceneMultiplayer"[/code] when [SceneMultiplayer] is available. See [method set_default_interface].
</description>
</method>
- <method name="get_peers" qualifiers="const">
+ <method name="get_peers">
<return type="PackedInt32Array" />
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="get_remote_sender_id" qualifiers="const">
+ <method name="get_remote_sender_id">
<return type="int" />
<description>
Returns the sender's peer ID for the RPC currently being executed.
[b]Note:[/b] If not inside an RPC this method will return 0.
</description>
</method>
- <method name="get_unique_id" qualifiers="const">
+ <method name="get_unique_id">
<return type="int" />
<description>
Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="has_multiplayer_peer" qualifiers="const">
+ <method name="has_multiplayer_peer">
<return type="bool" />
<description>
Returns [code]true[/code] if there is a [member multiplayer_peer] set.
</description>
</method>
- <method name="is_server" qualifiers="const">
+ <method name="is_server">
<return type="bool" />
<description>
Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections).
</description>
</method>
+ <method name="object_configuration_add">
+ <return type="int" enum="Error" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Notifies the MultiplayerAPI of a new [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
+ </description>
+ </method>
+ <method name="object_configuration_remove">
+ <return type="int" enum="Error" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Notifies the MultiplayerAPI to remove a [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
+ </description>
+ </method>
<method name="poll">
- <return type="void" />
+ <return type="int" enum="Error" />
<description>
Method used for polling the MultiplayerAPI. You only need to worry about this if you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI(s) for you.
[b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]).
</description>
</method>
- <method name="send_bytes">
+ <method name="rpc">
<return type="int" enum="Error" />
- <argument index="0" name="bytes" type="PackedByteArray" />
- <argument index="1" name="id" type="int" default="0" />
- <argument index="2" name="mode" type="int" enum="TransferMode" default="2" />
- <argument index="3" name="channel" type="int" default="0" />
+ <argument index="0" name="peer" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="method" type="StringName" />
+ <argument index="3" name="arguments" type="Array" default="[]" />
+ <description>
+ Sends an RPC to the target [code]peer[/code]. The given [code]method[/code] will be called on the remote [code]object[/code] with the provided [code]arguments[/code]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config].
+ [b]Note:[/b] Prefer using [method Node.rpc], [method Node.rpc_id], or [code]my_method.rpc(peer, arg1, arg2, ...)[/code] (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when augmenting or replacing the multiplayer capabilities.
+ </description>
+ </method>
+ <method name="set_default_interface" qualifiers="static">
+ <return type="void" />
+ <argument index="0" name="interface_name" type="StringName" />
<description>
- Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
+ Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by [SceneTree] when the engine starts.
</description>
</method>
</methods>
<members>
- <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
- If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs.
- [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
- </member>
<member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer">
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
</member>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
- If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections.
- </member>
- <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
- The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
- This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
- </member>
</members>
<signals>
<signal name="connected_to_server">
@@ -107,17 +127,21 @@
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
</description>
</signal>
- <signal name="peer_packet">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="packet" type="PackedByteArray" />
- <description>
- Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
- </description>
- </signal>
<signal name="server_disconnected">
<description>
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients.
</description>
</signal>
</signals>
+ <constants>
+ <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ </constant>
+ <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
+ </constant>
+ <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority].
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/MultiplayerAPIExtension.xml b/doc/classes/MultiplayerAPIExtension.xml
new file mode 100644
index 0000000000..c369977d57
--- /dev/null
+++ b/doc/classes/MultiplayerAPIExtension.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerAPIExtension" inherits="MultiplayerAPI" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class used for extending the [MultiplayerAPI].
+ </brief_description>
+ <description>
+ This class can be used to augment or replace the default [MultiplayerAPI] implementation via script or extensions.
+ The following example augment the default implemenation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication.
+ [codeblocks]
+ [gdscript]
+ extends MultiplayerAPIExtension
+ class_name LogMultiplayer
+
+ # We want to augment the default SceneMultiplayer.
+ var base_multiplayer = SceneMultiplayer.new()
+
+ func _init():
+ # Just passthourgh base signals (copied to var to avoid cyclic reference)
+ var cts = connected_to_server
+ var cf = connection_failed
+ var pc = peer_connected
+ var pd = peer_disconnected
+ base_multiplayer.connected_to_server.connect(func(): cts.emit())
+ base_multiplayer.connection_failed.connect(func(): cf.emit())
+ base_multiplayer.peer_connected.connect(func(id): pc.emit(id))
+ base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id))
+
+ # Log RPC being made and forward it to the default multiplayer.
+ func _rpc(peer: int, object: Object, method: StringName, args: Array) -&gt; int: # Error
+ print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args])
+ return base_multiplayer.rpc(peer, object, method, args)
+
+ # Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_add(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Adding node %s to the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_add(object, config)
+
+ # Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_remove(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Removing node %s from the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_remove(object, config)
+
+ # These can be optional, but in our case we want to augment SceneMultiplayer, so forward everything.
+ func _set_multiplayer_peer(p_peer: MultiplayerPeer):
+ base_multiplayer.multiplayer_peer = p_peer
+
+ func _get_multiplayer_peer() -&gt; MultiplayerPeer:
+ return base_multiplayer.multiplayer_peer
+
+ func _get_unique_id() -&gt; int:
+ return base_multiplayer.get_unique_id()
+
+ func _get_peer_ids() -&gt; PackedInt32Array:
+ return base_multiplayer.get_peers()
+ [/gdscript]
+ [/codeblocks]
+ Then in your main scene or in an autoload call [method SceneTree.set_multiplayer] to start using your custom [MultiplayerAPI]:
+ [codeblocks]
+ [gdscript]
+ # autoload.gd
+ func _enter_tree():
+ # Sets our custom multiplayer as the main one in SceneTree.
+ get_tree().set_multiplayer(LogMultiplayer.new())
+ [/gdscript]
+ [/codeblocks]
+ Native extensions can alternatively use the [method MultiplayerAPI.set_default_interface] method during initialization to configure themselves as the default implementation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_multiplayer_peer" qualifiers="virtual">
+ <return type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is retrieved.
+ </description>
+ </method>
+ <method name="_get_peer_ids" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Callback for [method MultiplayerAPI.get_peers].
+ </description>
+ </method>
+ <method name="_get_remote_sender_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_remote_sender_id].
+ </description>
+ </method>
+ <method name="_get_unique_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_unique_id].
+ </description>
+ </method>
+ <method name="_object_configuration_add" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_add].
+ </description>
+ </method>
+ <method name="_object_configuration_remove" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_remove].
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.poll].
+ </description>
+ </method>
+ <method name="_rpc" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="peer" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="method" type="StringName" />
+ <argument index="3" name="args" type="Array" />
+ <description>
+ Callback for [method MultiplayerAPI.rpc].
+ </description>
+ </method>
+ <method name="_set_multiplayer_peer" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="multiplayer_peer" type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is set.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 4a3559b0f7..6dde40f018 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -60,7 +60,7 @@
The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games.
[b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="2">
+ <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2">
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
</member>
</members>
@@ -109,5 +109,14 @@
<constant name="TARGET_PEER_SERVER" value="1">
Packets are sent to the server alone.
</constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
+ Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/MultiplayerSpawner.xml b/doc/classes/MultiplayerSpawner.xml
deleted file mode 100644
index 9de67068eb..0000000000
--- a/doc/classes/MultiplayerSpawner.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="_spawn_custom" qualifiers="virtual">
- <return type="Object" />
- <argument index="0" name="data" type="Variant" />
- <description>
- </description>
- </method>
- <method name="add_spawnable_scene">
- <return type="void" />
- <argument index="0" name="path" type="String" />
- <description>
- </description>
- </method>
- <method name="clear_spawnable_scenes">
- <return type="void" />
- <description>
- </description>
- </method>
- <method name="get_spawnable_scene" qualifiers="const">
- <return type="String" />
- <argument index="0" name="path" type="int" />
- <description>
- </description>
- </method>
- <method name="get_spawnable_scene_count" qualifiers="const">
- <return type="int" />
- <description>
- </description>
- </method>
- <method name="spawn">
- <return type="Node" />
- <argument index="0" name="data" type="Variant" default="null" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
- </member>
- <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
- </member>
- </members>
- <signals>
- <signal name="despawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- <signal name="spawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- </signals>
-</class>
diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml
deleted file mode 100644
index 3766491a6c..0000000000
--- a/doc/classes/MultiplayerSynchronizer.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSynchronizer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_visibility_filter">
- <return type="void" />
- <argument index="0" name="filter" type="Callable" />
- <description>
- </description>
- </method>
- <method name="get_visibility_for" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="peer" type="int" />
- <description>
- </description>
- </method>
- <method name="remove_visibility_filter">
- <return type="void" />
- <argument index="0" name="filter" type="Callable" />
- <description>
- </description>
- </method>
- <method name="set_visibility_for">
- <return type="void" />
- <argument index="0" name="peer" type="int" />
- <argument index="1" name="visible" type="bool" />
- <description>
- </description>
- </method>
- <method name="update_visibility">
- <return type="void" />
- <argument index="0" name="for_peer" type="int" default="0" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="public_visibility" type="bool" setter="set_visibility_public" getter="is_visibility_public" default="true">
- </member>
- <member name="replication_config" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config">
- </member>
- <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0">
- </member>
- <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;..&quot;)">
- </member>
- <member name="visibility_update_mode" type="int" setter="set_visibility_update_mode" getter="get_visibility_update_mode" enum="MultiplayerSynchronizer.VisibilityUpdateMode" default="0">
- </member>
- </members>
- <signals>
- <signal name="visibility_changed">
- <argument index="0" name="for_peer" type="int" />
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="VISIBILITY_PROCESS_IDLE" value="0" enum="VisibilityUpdateMode">
- </constant>
- <constant name="VISIBILITY_PROCESS_PHYSICS" value="1" enum="VisibilityUpdateMode">
- </constant>
- <constant name="VISIBILITY_PROCESS_NONE" value="2" enum="VisibilityUpdateMode">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index c48ca18e9e..75b6544827 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -8,7 +8,7 @@
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin].
[b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge.
The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value.
- [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</description>
<tutorials>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index 9f4feee072..f5824a24fd 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -8,7 +8,7 @@
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin].
[b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge.
The cost of entering this region from another region can be controlled with the [member enter_cost] value.
- [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</description>
<tutorials>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 5185b353bc..8600c2643a 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -415,5 +415,10 @@
Emitted when a navigation map is updated, when a region moves or is modified.
</description>
</signal>
+ <signal name="navigation_debug_changed">
+ <description>
+ Emitted when navigation debug settings are changed. Only available in debug builds.
+ </description>
+ </signal>
</signals>
</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index b7591ed4f4..8cc8498609 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -622,7 +622,7 @@
</description>
</method>
<method name="rpc" qualifiers="vararg">
- <return type="void" />
+ <return type="int" enum="Error" />
<argument index="0" name="method" type="StringName" />
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
@@ -630,18 +630,24 @@
</description>
</method>
<method name="rpc_config">
- <return type="int" />
+ <return type="void" />
<argument index="0" name="method" type="StringName" />
- <argument index="1" name="rpc_mode" type="int" enum="RPCMode" />
- <argument index="2" name="call_local" type="bool" default="false" />
- <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
- <argument index="4" name="channel" type="int" default="0" />
+ <argument index="1" name="config" type="Variant" />
<description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs).
+ Changes the RPC mode for the given [code]method[/code] with the given [code]config[/code] which should be [code]null[/code] (to disable) or a [Dictionary] in the form:
+ [codeblock]
+ {
+ rpc_mode = MultiplayerAPI.RPCMode,
+ transfer_mode = MultiplayerPeer.TranferMode,
+ call_local = false,
+ channel = 0,
+ }
+ [/codeblock]
+ See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
- <return type="void" />
+ <return type="int" enum="Error" />
<argument index="0" name="peer_id" type="int" />
<argument index="1" name="method" type="StringName" />
<description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index aaf08dec2f..49c666ec51 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -198,6 +198,17 @@
}
[/csharp]
[/codeblocks]
+ [b]Note:[/b] Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash ([code]--[/code]) and then pass custom arguments, which the engine itself will ignore. These can be read via [method get_cmdline_user_args].
+ </description>
+ </method>
+ <method name="get_cmdline_user_args">
+ <return type="PackedStringArray" />
+ <description>
+ Similar to [method get_cmdline_args], but this returns the user arguments (any argument passed after the double dash [code]--[/code] argument). These are left untouched by Godot for the user.
+ For example, in the command line below, [code]--fullscreen[/code] will not be returned in [method get_cmdline_user_args] and [code]--level 1[/code] will only be returned in [method get_cmdline_user_args]:
+ [codeblock]
+ godot --fullscreen -- --level 1
+ [/codeblock]
</description>
</method>
<method name="get_config_dir" qualifiers="const">
@@ -385,6 +396,23 @@
[b]Note:[/b] Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android.
</description>
</method>
+ <method name="get_system_font_path" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_name" type="String" />
+ <argument index="1" name="bold" type="bool" default="false" />
+ <argument index="2" name="italic" type="bool" default="false" />
+ <description>
+ Returns path to the system font file with [code]font_name[/code] and style. Return empty string if no matching fonts found.
+ [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ </description>
+ </method>
+ <method name="get_system_fonts" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns list of font family names available.
+ [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="get_thread_caller_id" qualifiers="const">
<return type="int" />
<description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 11ae7cc2b0..061b32bfdf 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -152,11 +152,9 @@
<return type="int" enum="Error" />
<argument index="0" name="signal" type="StringName" />
<argument index="1" name="callable" type="Callable" />
- <argument index="2" name="binds" type="Array" default="[]" />
- <argument index="3" name="flags" type="int" default="0" />
+ <argument index="2" name="flags" type="int" default="0" />
<description>
- Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
- [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
+ Connects a [code]signal[/code] to a [code]callable[/code]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the callable's target is destroyed in the game's lifecycle, the connection will be lost.
[b]Examples with recommended syntax:[/b]
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index f7567133cd..b1e3d2f628 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -494,9 +494,39 @@
<member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color(1, 0.7, 0.1, 0.4)">
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
+ Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
+ If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
+ Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
+ Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
+ Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
+ Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/paths/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
</member>
@@ -1632,13 +1662,13 @@
Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
- Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
+ Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
<member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
</member>
<member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false">
- Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion.
+ Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
[b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25">
@@ -1856,9 +1886,6 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/scaling_3d/fsr_mipmap_bias" type="float" setter="" getter="" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
- </member>
<member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
</member>
@@ -1940,6 +1967,11 @@
Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
</member>
+ <member name="rendering/textures/default_filters/texture_mipmap_bias" type="float" setter="" getter="" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ [b]Note:[/b] This property is only read when the project starts. To change the mipmap LOD bias at run-time, set [member Viewport.texture_mipmap_bias] instead.
+ </member>
<member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
index 115015c2d7..2bbfd04e9e 100644
--- a/doc/classes/Projection.xml
+++ b/doc/classes/Projection.xml
@@ -211,13 +211,13 @@
</method>
</methods>
<members>
- <member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0)">
+ <member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0, 1)">
</member>
- <member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0)">
+ <member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0, 0)">
</member>
- <member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0)">
+ <member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0, 0)">
</member>
- <member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1)">
+ <member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1, 0)">
</member>
</members>
<constants>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 48e6317b11..30e96607da 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -74,16 +74,6 @@
[b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably.
</description>
</method>
- <method name="cubic_slerp" qualifiers="const">
- <return type="Quaternion" />
- <argument index="0" name="b" type="Quaternion" />
- <argument index="1" name="pre_a" type="Quaternion" />
- <argument index="2" name="post_b" type="Quaternion" />
- <argument index="3" name="weight" type="float" />
- <description>
- Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
- </description>
- </method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Quaternion" />
@@ -171,6 +161,16 @@
Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
</description>
</method>
+ <method name="spherical_cubic_interpolate" qualifiers="const">
+ <return type="Quaternion" />
+ <argument index="0" name="b" type="Quaternion" />
+ <argument index="1" name="pre_a" type="Quaternion" />
+ <argument index="2" name="post_b" type="Quaternion" />
+ <argument index="3" name="weight" type="float" />
+ <description>
+ Performs a spherical cubic interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
+ </description>
+ </method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="1.0">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index c2752d9f7b..9616ab3515 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1293,45 +1293,45 @@
If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
</description>
</method>
- <method name="global_variable_add">
+ <method name="global_shader_uniform_add">
<return type="void" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType" />
+ <argument index="1" name="type" type="int" enum="RenderingServer.GlobalShaderUniformType" />
<argument index="2" name="default_value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_get" qualifiers="const">
+ <method name="global_shader_uniform_get" qualifiers="const">
<return type="Variant" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_get_list" qualifiers="const">
+ <method name="global_shader_uniform_get_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
</description>
</method>
- <method name="global_variable_get_type" qualifiers="const">
- <return type="int" enum="RenderingServer.GlobalVariableType" />
+ <method name="global_shader_uniform_get_type" qualifiers="const">
+ <return type="int" enum="RenderingServer.GlobalShaderUniformType" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_remove">
+ <method name="global_shader_uniform_remove">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_set">
+ <method name="global_shader_uniform_set">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_set_override">
+ <method name="global_shader_uniform_set_override">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="value" type="Variant" />
@@ -3175,14 +3175,6 @@
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
- <method name="viewport_set_fsr_mipmap_bias">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="mipmap_bias" type="float" />
- <description>
- Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
- </description>
- </method>
<method name="viewport_set_fsr_sharpness">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3325,6 +3317,15 @@
<description>
</description>
</method>
+ <method name="viewport_set_texture_mipmap_bias">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="mipmap_bias" type="float" />
+ <description>
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ </description>
+ </method>
<method name="viewport_set_transparent_background">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -4536,63 +4537,63 @@
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
- <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderUniformType">
</constant>
<constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo">
</constant>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index c156814a1d..f9c4ca0d49 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -26,8 +26,8 @@
</method>
<method name="_save" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
+ <argument index="0" name="path" type="Resource" />
+ <argument index="1" name="resource" type="String" />
<argument index="2" name="flags" type="int" />
<description>
Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants.
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index dd52d09750..729058c9b3 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -95,8 +95,10 @@
<argument index="0" name="path" type="String" />
<argument index="1" name="type_hint" type="String" default="&quot;&quot;" />
<argument index="2" name="use_sub_threads" type="bool" default="false" />
+ <argument index="3" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" />
<description>
Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns).
+ The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
<method name="remove_resource_format_loader">
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index 240c72a131..10387a4f14 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -35,11 +35,11 @@
</method>
<method name="save">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
+ <argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="path" type="String" default="&quot;&quot;" />
<argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" />
<description>
- Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object.
+ Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [code]path[/code] is empty, [ResourceSaver] will try to use [member Resource.resource_path].
The [code]flags[/code] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags.
Returns [constant OK] on success.
</description>
diff --git a/doc/classes/ScriptExtension.xml b/doc/classes/ScriptExtension.xml
index 91fa6206d7..4e432ca9a8 100644
--- a/doc/classes/ScriptExtension.xml
+++ b/doc/classes/ScriptExtension.xml
@@ -65,8 +65,8 @@
<description>
</description>
</method>
- <method name="_get_rpc_methods" qualifiers="virtual const">
- <return type="Dictionary[]" />
+ <method name="_get_rpc_config" qualifiers="virtual const">
+ <return type="Variant" />
<description>
</description>
</method>
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
index 5fcb60dd09..70da03dc6e 100644
--- a/doc/classes/ShapeCast2D.xml
+++ b/doc/classes/ShapeCast2D.xml
@@ -6,7 +6,7 @@
<description>
Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity.
- The node can detect multiple collision objects, but usually the first detected collision
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
[b]Note:[/b] shape casting is more computationally expensive compared to ray casting.
</description>
<tutorials>
@@ -42,27 +42,27 @@
<method name="get_closest_collision_safe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
</description>
</method>
<method name="get_closest_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object" />
<argument index="0" name="index" type="int" />
<description>
- Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
- Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -82,14 +82,14 @@
<return type="Vector2" />
<argument index="0" name="index" type="int" />
<description>
- Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object.
+ Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="index" type="int" />
<description>
- Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object.
+ Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
</description>
</method>
@@ -133,7 +133,7 @@
The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
</member>
<member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
- A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
@@ -148,7 +148,7 @@
The number of intersections can be limited with this parameter, to reduce the processing time.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
- Any [Shape2D] derived shape used for collision queries.
+ The [Shape2D]-derived shape to be used for collision queries.
</member>
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The shape's destination point, relative to this node's [code]position[/code].
diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml
new file mode 100644
index 0000000000..085bc9acd1
--- /dev/null
+++ b/doc/classes/ShapeCast3D.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShapeCast3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Node for physics collision sweep and immediate overlap queries. Similar to the [RayCast3D] node.
+ </brief_description>
+ <description>
+ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
+ Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity.
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
+ [b]Note:[/b] Shape casting is more computationally expensive compared to ray casting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="Object" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void" />
+ <description>
+ Removes all collision exceptions for this [ShapeCast3D].
+ </description>
+ </method>
+ <method name="force_shapecast_update">
+ <return type="void" />
+ <description>
+ Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the shape or its parent has changed state.
+ [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_closest_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
+ </description>
+ </method>
+ <method name="get_closest_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collision_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.
+ </description>
+ </method>
+ <method name="get_collision_mask_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
+ [b]Note:[/b] this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether any object is intersecting with the shape's vector (considering the vector length).
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="Object" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="resource_changed">
+ <return type="void" />
+ <argument index="0" name="resource" type="Resource" />
+ <description>
+ This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the [member shape] resource is modified.
+ </description>
+ </method>
+ <method name="set_collision_mask_value">
+ <return type="void" />
+ <argument index="0" name="layer_number" type="int" />
+ <argument index="1" name="value" type="bool" />
+ <description>
+ Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], collision with [Area3D]s will be reported.
+ </member>
+ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], collision with [PhysicsBody3D]s will be reported.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState3D.get_rest_info] method.
+ </member>
+ <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
+ The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [ShapeCast3D] is colliding with something.
+ If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ If [code]true[/code], collisions will be reported.
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
+ If [code]true[/code], the parent node will be excluded from collision detection.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
+ </member>
+ <member name="max_results" type="int" setter="set_max_results" getter="get_max_results" default="32">
+ The number of intersections can be limited with this parameter, to reduce the processing time.
+ </member>
+ <member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
+ The [Shape3D]-derived shape to be used for collision queries.
+ </member>
+ <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
+ The shape's destination point, relative to this node's [code]position[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index f271220989..6295724aa2 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -392,6 +392,10 @@
<members>
<member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true">
</member>
+ <member name="motion_scale" type="float" setter="set_motion_scale" getter="get_motion_scale" default="1.0">
+ Multiplies the position 3D track animation.
+ [b]Note:[/b] Unless this value is [code]1.0[/code], the key value in animation will not match the actual position value.
+ </member>
<member name="show_rest_only" type="bool" setter="set_show_rest_only" getter="is_show_rest_only" default="false">
</member>
</members>
diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml
index a7f5f7a0a6..5c2d0eefb4 100644
--- a/doc/classes/SkeletonProfile.xml
+++ b/doc/classes/SkeletonProfile.xml
@@ -162,12 +162,20 @@
</member>
<member name="group_size" type="int" setter="set_group_size" getter="get_group_size" default="0">
</member>
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&amp;&quot;&quot;">
+ A name of bone that will be used as the root bone in [AnimationTree].
+ [b]Note:[/b] In most cases, it is the bone of the parent of the hips that exists at the world origin in the humanoid model.
+ </member>
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" default="&amp;&quot;&quot;">
+ A name of bone which height will be used as the coefficient for normalization.
+ [b]Note:[/b] In most cases, it is hips in the humanoid model.
+ </member>
</members>
<signals>
<signal name="profile_updated">
<description>
This signal is emitted when change the value in profile. This is used to update key name in the [BoneMap] and to redraw the [BoneMap] editor.
- [b]Note[/b]: This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the [BoneMap].
+ [b]Note:[/b] This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the [BoneMap].
</description>
</signal>
</signals>
diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml
index 065184244e..11f0521718 100644
--- a/doc/classes/SkeletonProfileHumanoid.xml
+++ b/doc/classes/SkeletonProfileHumanoid.xml
@@ -10,5 +10,7 @@
<members>
<member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" overrides="SkeletonProfile" default="56" />
<member name="group_size" type="int" setter="set_group_size" getter="get_group_size" overrides="SkeletonProfile" default="4" />
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" overrides="SkeletonProfile" default="&amp;&quot;Root&quot;" />
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" overrides="SkeletonProfile" default="&amp;&quot;Hips&quot;" />
</members>
</class>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 41b02b6dc9..bc381578d9 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -77,7 +77,7 @@
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects.
- [b]Node:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
new file mode 100644
index 0000000000..b1b78f1705
--- /dev/null
+++ b/doc/classes/SystemFont.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SystemFont" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Font loaded from a system font.
+ [b]Note:[/b] This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font.
+ </brief_description>
+ <description>
+ [SystemFont] loads a font from a system font with the first matching name from [member font_names].
+ It will attempt to match font style, but it's not guaranteed.
+ The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
+ You can create [FontVariation] of the system font for fine control over its features.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
+ If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ </member>
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s.
+ </member>
+ <member name="font_names" type="PackedStringArray" setter="set_font_names" getter="get_font_names" default="PackedStringArray()">
+ Array of font family names to search, first matching font found is used.
+ </member>
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
+ Font style flags, see [enum TextServer.FontStyle].
+ </member>
+ <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
+ If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting.
+ </member>
+ <member name="generate_mipmaps" type="bool" setter="set_generate_mipmaps" getter="get_generate_mipmaps" default="false">
+ If set to [code]true[/code], generate mipmaps for the font textures.
+ </member>
+ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
+ Font hinting mode.
+ </member>
+ <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0">
+ Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead.
+ </member>
+ <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
+ Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index ad52b2f2f1..180e868ef8 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -117,6 +117,27 @@
If the TileSet has no proxy for the given identifiers, returns an empty Array.
</description>
</method>
+ <method name="get_custom_data_layer_by_name" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="layer_name" type="String" />
+ <description>
+ Returns the index of the custom data layer identified by the given name.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Returns the name of the custom data layer identified by the given index.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_type" qualifiers="const">
+ <return type="int" enum="Variant.Type" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Returns the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="get_custom_data_layers_count" qualifiers="const">
<return type="int" />
<description>
@@ -464,6 +485,22 @@
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
+ <method name="set_custom_data_layer_name">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="layer_name" type="String" />
+ <description>
+ Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
+ </description>
+ </method>
+ <method name="set_custom_data_layer_type">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="layer_type" type="int" enum="Variant.Type" />
+ <description>
+ Sets the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="set_navigation_layer_layers">
<return type="void" />
<argument index="0" name="layer_index" type="int" />
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index e1f7ff21d0..924b4cd8e4 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -173,7 +173,7 @@
Sets the transform's skew (in radians).
</description>
</method>
- <method name="translated" qualifiers="const">
+ <method name="translated_local" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="offset" type="Vector2" />
<description>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 147eba9f25..de1db718c2 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -112,7 +112,7 @@
Returns a copy of the transform with its basis and origin scaled by the given [code]scale[/code] factor, using matrix multiplication.
</description>
</method>
- <method name="sphere_interpolate_with" qualifiers="const">
+ <method name="spherical_interpolate_with" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="xform" type="Transform3D" />
<argument index="1" name="weight" type="float" />
@@ -120,7 +120,7 @@
Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
- <method name="translated" qualifiers="const">
+ <method name="translated_local" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" />
<description>
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index e1175e57bd..da0df2672e 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector4" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Vector used for 4D math using floating point coordinates.
</brief_description>
<description>
+ 4-element structure that can be used to represent any quadruplet of numeric values.
+ It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
+ [b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
</description>
<tutorials>
</tutorials>
@@ -10,18 +14,21 @@
<constructor name="Vector4">
<return type="Vector4" />
<description>
+ Constructs a default-initialized [Vector4] with all components set to [code]0[/code].
</description>
</constructor>
<constructor name="Vector4">
<return type="Vector4" />
<argument index="0" name="from" type="Vector4" />
<description>
+ Constructs a [Vector4] as a copy of the given [Vector4].
</description>
</constructor>
<constructor name="Vector4">
<return type="Vector4" />
<argument index="0" name="from" type="Vector4i" />
<description>
+ Constructs a new [Vector4] from [Vector4i].
</description>
</constructor>
<constructor name="Vector4">
@@ -31,6 +38,7 @@
<argument index="2" name="z" type="float" />
<argument index="3" name="w" type="float" />
<description>
+ Returns a [Vector4] with the given components.
</description>
</constructor>
</constructors>
@@ -38,6 +46,13 @@
<method name="abs" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="ceil" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -45,85 +60,127 @@
<argument index="0" name="min" type="Vector4" />
<argument index="1" name="max" type="Vector4" />
<description>
+ Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Vector4" />
<description>
+ Returns the dot product of this vector and [code]with[/code].
+ </description>
+ </method>
+ <method name="floor" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns the inverse of the vector. This is the same as [code]Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)[/code].
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<argument index="0" name="with" type="Vector4" />
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1.
</description>
</method>
<method name="length" qualifiers="const">
<return type="float" />
<description>
+ Returns the length (magnitude) of this vector.
</description>
</method>
<method name="length_squared" qualifiers="const">
<return type="float" />
<description>
+ Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length].
+ </description>
+ </method>
+ <method name="lerp" qualifiers="const">
+ <return type="Vector4" />
+ <argument index="0" name="to" type="Vector4" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
<method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
</description>
</method>
<method name="normalized" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ </description>
+ </method>
+ <method name="round" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector4" />
<description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="0.0">
+ The vector's W component. Also accessible by using the index position [code][3][/code].
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
</member>
<member name="y" type="float" setter="" getter="" default="0.0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
</member>
<member name="z" type="float" setter="" getter="" default="0.0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
</member>
</members>
<constants>
<constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_W" value="3">
+ Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
- <constant name="ZERO" value="Vector4(0, 0, 0)">
+ <constant name="ZERO" value="Vector4(0, 0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
- <constant name="ONE" value="Vector4(1, 1, 1)">
+ <constant name="ONE" value="Vector4(1, 1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
</constant>
- <constant name="INF" value="Vector4(inf, inf, inf)">
+ <constant name="INF" value="Vector4(inf, inf, inf, inf)">
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
</constants>
<operators>
@@ -131,100 +188,144 @@
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="Projection" />
<description>
+ Inversely transforms (multiplies) the [Vector4] by the given [Projection] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Adds each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Subtracts each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Divides each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector4" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], [code]v[2][/code] is equivalent to [code]v.z[/code], and [code]v[3][/code] is equivalent to [code]v.w[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector4" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector4" />
<description>
+ Returns the negative value of the [Vector4]. This is the same as writing [code]Vector4(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
</description>
</operator>
</operators>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index c3114e20e2..6acce12e9f 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -92,9 +92,9 @@
</constant>
<constant name="AXIS_W" value="3">
</constant>
- <constant name="ZERO" value="Vector4i(0, 0, 0)">
+ <constant name="ZERO" value="Vector4i(0, 0, 0, 0)">
</constant>
- <constant name="ONE" value="Vector4i(1, 1, 1)">
+ <constant name="ONE" value="Vector4i(1, 1, 1, 1)">
</constant>
</constants>
<operators>
@@ -194,6 +194,12 @@
<description>
</description>
</operator>
+ <operator name="operator []">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
<operator name="operator unary+">
<return type="Vector4i" />
<description>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 53603b5356..0808a8f1cf 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -196,10 +196,6 @@
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
Disable 3D rendering (but keep 2D rendering).
</member>
- <member name="fsr_mipmap_bias" type="float" setter="set_fsr_mipmap_bias" getter="get_fsr_mipmap_bias" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]. This updates the rendering server's mipmap bias when called
- To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias] project setting.
- </member>
<member name="fsr_sharpness" type="float" setter="set_fsr_sharpness" getter="get_fsr_sharpness" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_sharpness] project setting.
@@ -270,6 +266,11 @@
</member>
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
</member>
+ <member name="texture_mipmap_bias" type="float" setter="set_texture_mipmap_bias" getter="get_texture_mipmap_bias" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias] project setting.
+ </member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index b8d424b5fe..9198da4bc6 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -72,10 +72,10 @@
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
- If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.5">
+ The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
- <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
+ <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="true">
If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
</member>
</members>
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 312dffc7ee..469bb4a310 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -10,6 +10,11 @@ import sys
import xml.etree.ElementTree as ET
from collections import OrderedDict
+# Import hardcoded version information from version.py
+root_directory = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../")
+sys.path.append(root_directory) # Include the root directory
+import version
+
# Uncomment to do type checks. I have it commented out so it works below Python 3.5
# from typing import List, Dict, TextIO, Tuple, Iterable, Optional, DefaultDict, Any, Union
@@ -587,12 +592,26 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S
else:
f = open(os.path.join(output_dir, "class_" + class_name.lower() + ".rst"), "w", encoding="utf-8")
- # Warn contributors not to edit this file directly
+ # Remove the "Edit on Github" button from the online docs page.
f.write(":github_url: hide\n\n")
- f.write(".. Generated automatically by doc/tools/make_rst.py in Godot's source tree.\n")
- f.write(".. DO NOT EDIT THIS FILE, but the " + class_name + ".xml source instead.\n")
- f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n")
+ # Warn contributors not to edit this file directly.
+ # Also provide links to the source files for reference.
+
+ git_branch = "master"
+ if hasattr(version, "docs") and version.docs != "latest":
+ git_branch = version.docs
+
+ source_xml_path = os.path.relpath(class_def.filepath, root_directory).replace("\\", "/")
+ source_github_url = "https://github.com/godotengine/godot/tree/{}/{}".format(git_branch, source_xml_path)
+ generator_github_url = "https://github.com/godotengine/godot/tree/{}/doc/tools/make_rst.py".format(git_branch)
+
+ f.write(".. DO NOT EDIT THIS FILE!!!\n")
+ f.write(".. Generated automatically from Godot engine sources.\n")
+ f.write(".. Generator: " + generator_github_url + ".\n")
+ f.write(".. XML source: " + source_github_url + ".\n\n")
+
+ # Document reference id and header.
f.write(".. _class_" + class_name + ":\n\n")
f.write(make_heading(class_name, "=", False))
@@ -907,7 +926,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S
f.write(make_footer())
-def escape_rst(text, until_pos=-1): # type: (str) -> str
+def escape_rst(text, until_pos=-1): # type: (str, int) -> str
# Escape \ character, otherwise it ends up as an escape character in rst
pos = 0
while True:
@@ -1301,7 +1320,7 @@ def rstize_text(text, state): # type: (str, State) -> str
return text
-def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None
+def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]], bool) -> None
if len(data) == 0:
return
@@ -1382,7 +1401,7 @@ def make_method_signature(
if ref_type != "":
if ref_type == "operator":
out += ":ref:`{0}<class_{1}_{2}_{3}_{4}>` ".format(
- method_def.name,
+ method_def.name.replace("<", "\\<"), # So operator "<" gets correctly displayed.
class_def.name,
ref_type,
sanitize_operator_name(method_def.name, state),
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index a4488f3339..43e62ecab2 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -19,12 +19,14 @@
# Hamza Kalash <mogo.gogo170@gmail.com>, 2022.
# ywmaa <ywmaa.personal@gmail.com>, 2022.
# TabbyDev <Mandomody25@gmail.com>, 2022.
+# عبد الرحمن أبو سعدة ||Abd Alrahman abo saada <abdalrahmanabs2005@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-05-31 22:35+0000\n"
-"Last-Translator: TabbyDev <Mandomody25@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:56+0000\n"
+"Last-Translator: عبد الرحمن أبو سعدة ||Abd Alrahman abo saada "
+"<abdalrahmanabs2005@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/ar/>\n"
"Language: ar\n"
@@ -33,7 +35,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\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.13-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: doc/tools/make_rst.py
msgid "Description"
@@ -1004,7 +1006,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7850,8 +7859,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11922,7 +11931,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20347,7 +20361,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23739,7 +23753,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25576,7 +25590,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32679,7 +32693,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32695,7 +32709,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32725,7 +32739,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36859,7 +36873,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37122,7 +37136,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37240,6 +37254,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -37794,7 +37854,7 @@ msgstr ""
#: doc/classes/Node.xml
msgid "Nodes and Scenes"
-msgstr ""
+msgstr "العقد و المشاهد"
#: doc/classes/Node.xml
msgid "All Demos"
@@ -39937,7 +39997,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39949,7 +40015,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57735,7 +57802,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60636,8 +60703,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64269,13 +64336,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64287,13 +64355,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71202,7 +71271,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71287,6 +71360,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index bd84c415cc..2fce9a4d08 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -960,7 +960,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7797,8 +7804,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11866,7 +11873,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20277,7 +20289,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23666,7 +23678,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25497,7 +25509,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32593,7 +32605,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32609,7 +32621,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32639,7 +32651,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36739,7 +36751,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37000,7 +37012,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37114,6 +37126,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39811,7 +39869,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39823,7 +39887,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57577,7 +57642,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60468,8 +60533,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64092,13 +64157,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64110,13 +64176,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71002,7 +71069,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71087,6 +71158,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 90ebdbf9f3..b8187d24d5 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -840,7 +840,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7677,8 +7684,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11746,7 +11753,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20157,7 +20169,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23543,7 +23555,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25374,7 +25386,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32470,7 +32482,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32486,7 +32498,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32516,7 +32528,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36616,7 +36628,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36877,7 +36889,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36991,6 +37003,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39688,7 +39746,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39700,7 +39764,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57454,7 +57519,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60345,8 +60410,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63969,13 +64034,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63987,13 +64053,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -65801,11 +65868,11 @@ msgstr ""
#: doc/classes/VehicleBody.xml
msgid ""
"Accelerates the vehicle by applying an engine force. The vehicle is only "
-"sped up if the wheels that have [member VehicleWheel.use_as_traction] set "
-"to [code]true[/code] and are in contact with a surface. The [member "
-"RigidBody.mass] of the vehicle has an effect on the acceleration of the "
-"vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 "
-"range for acceleration.\n"
+"sped up if the wheels that have [member VehicleWheel.use_as_traction] set to "
+"[code]true[/code] and are in contact with a surface. The [member RigidBody."
+"mass] of the vehicle has an effect on the acceleration of the vehicle. For a "
+"vehicle with a mass set to 1000, try a value in the 25 - 50 range for "
+"acceleration.\n"
"[b]Note:[/b] The simulation does not take the effect of gears into account, "
"you will need to add logic for this if you wish to simulate gears.\n"
"A negative value will result in the vehicle reversing."
@@ -65885,8 +65952,8 @@ msgstr ""
#: doc/classes/VehicleWheel.xml
msgid ""
-"Accelerates the wheel by applying an engine force. The wheel is only sped "
-"up if it is in contact with a surface. The [member RigidBody.mass] of the "
+"Accelerates the wheel by applying an engine force. The wheel is only sped up "
+"if it is in contact with a surface. The [member RigidBody.mass] of the "
"vehicle has an effect on the acceleration of the vehicle. For a vehicle with "
"a mass set to 1000, try a value in the 25 - 50 range for acceleration.\n"
"[b]Note:[/b] The simulation does not take the effect of gears into account, "
@@ -70879,7 +70946,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70964,6 +71035,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 48a79d9ec3..878b7e9aae 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -1230,8 +1230,15 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "Jako [method print], ale tiskne pouze pokud je použita v debug módu."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8187,8 +8194,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12266,7 +12273,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20725,7 +20737,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24123,7 +24135,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25960,7 +25972,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33074,7 +33086,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33090,7 +33102,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33121,7 +33133,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37264,7 +37276,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37527,7 +37539,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37645,6 +37657,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40345,7 +40403,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40357,7 +40421,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58166,7 +58231,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61082,8 +61147,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64740,13 +64805,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64758,13 +64824,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71688,9 +71755,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "Vrátí [code] true [/code], pokud je vektor normalizován, jinak false."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -71774,6 +71844,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/de.po b/doc/translations/de.po
index ba4e24c02b..0cf8d9ae17 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -35,7 +35,7 @@
# spoadr <spoadr@gmx.ch>, 2021.
# Tim <tim14speckenwirth@gmail.com>, 2021.
# user <online141@gmx.de>, 2021.
-# Jummit <jummit@web.de>, 2021.
+# Jummit <jummit@web.de>, 2021, 2022.
# Bastian <bastian.ike@gmail.com>, 2021.
# KuhnChris <kuhnchris@kuhnchris.eu>, 2021.
# Rémi Verschelde <remi@godotengine.org>, 2021.
@@ -52,7 +52,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-06-22 23:17+0000\n"
+"PO-Revision-Date: 2022-07-23 03:56+0000\n"
"Last-Translator: Hans Peter <figefi6308@runqx.com>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/de/>\n"
@@ -61,7 +61,7 @@ msgstr ""
"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.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: doc/tools/make_rst.py
msgid "Description"
@@ -534,7 +534,6 @@ msgstr ""
"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
-#, fuzzy
msgid ""
"Compares two values by checking their actual contents, recursing into any "
"[Array] or [Dictionary] up to its deepest level.\n"
@@ -566,9 +565,9 @@ msgstr ""
"- Für [code]Array[/code]s, [code]==[/code] werden die Arrays elementweise "
"mit [code]==[/code] verglichen. Der Elemente-Vergleich ist also wieder "
"einfach, nicht tief.\n"
-"Zusammengefasst, immer wenn ein [code]Dictionary[/code] potentiell "
-"involviert ist, und du einen wahren Inhaltsvergleich brauchst, musst du "
-"[code]deep_equal[/code] verwenden."
+"Zusammengefasst, immer wenn möglicherweise ein [code]Dictionary[/code] "
+"involviert ist und du einen echten Inhaltsvergleich brauchst, verwende "
+"[code]deep_equal[/code]."
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -969,7 +968,6 @@ msgstr ""
"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
-#, fuzzy
msgid ""
"Linearly interpolates between two values by the factor defined in "
"[code]weight[/code]. To perform interpolation, [code]weight[/code] should be "
@@ -989,17 +987,24 @@ msgid ""
"To perform eased interpolation with [method lerp], combine it with [method "
"ease] or [method smoothstep]."
msgstr ""
-"Interpoliert einen normalisierten Wert linear zwischen zwei Grenzwerten. "
-"Dies entspricht der Umkehrfunktion von [method inverse_lerp].\n"
-"Wenn die [code]from[/code] und [code]to[/code] Argumente vom Typ [int] oder "
-"[float] sind, dann ist der Rückgabewert ein [float].\n"
-"Sind beide Argumente vom gleichen Typ ([Vector2], [Vector3] oder [Color]), "
-"dann ist der Rückgabewert auch von diesem Typ ([code]lerp[/code] ruft dann "
-"die Methode [code]lerp[/code] dieses Vektortyps auf).\n"
+"Interpoliert linear zwischen zwei Werten mit dem in [code]weight[/code] "
+"definierten Faktor. Um eine Interpolation durchzuführen, sollte "
+"[code]Gewicht[/code] zwischen [code]0.0[/code] und [code]1.0[/code] "
+"(einschließlich) liegen. Werte außerhalb dieses Bereichs sind jedoch "
+"zulässig und können verwendet werden, um [i]Extrapolation[/i] "
+"durchzuführen.\n"
+"Wenn die Argumente [code]von[/code] und [code]bis[/code] vom Typ [int] oder "
+"[float] sind, ist der Rückgabewert ein [float].\n"
+"Wenn beide vom gleichen Vektortyp sind ([Vector2], [Vector3] oder [Color]), "
+"ist der Rückgabewert vom gleichen Typ ([code]lerp[/code] ruft dann die "
+"Methode [code]linear_interpolate[/code] des Vektortyps auf).\n"
"[codeblock]\n"
-"lerp(0, 4, 0.75) # Returns 3.0\n"
-"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)\n"
-"[/codeblock]"
+"lerp(0, 4, 0.75) # Gibt 3.0 zurück\n"
+"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Liefert Vector2(2, 3.5)\n"
+"[/codeblock]\n"
+"Siehe auch [method inverse_lerp], die die Umkehrung dieser Operation "
+"durchführt. Um eine Interpolation mit [method lerp] durchzuführen, "
+"kombiniere sie mit [method ease] oder [method smoothstep]."
#: modules/gdscript/doc_classes/@GDScript.xml
#, fuzzy
@@ -1398,9 +1403,22 @@ msgstr ""
"Trace aus."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Funktioniert wie [method print], gibt jedoch nur im Debug Modues Text aus."
+"Gibt einen Stacktrace zum Quelltextort aus, funktioniert nur wenn das "
+"\"Ausführen mit Debugger\" aktiviert ist.\n"
+"Die Ausgabe in der Konsole würde ungefähr so aussehen:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -1660,6 +1678,45 @@ msgid ""
"3\n"
"[/codeblock]"
msgstr ""
+"Gibt ein Array mit dem angegebenen Bereich zurück. Die [Methode range] kann "
+"auf drei Arten aufgerufen werden:\n"
+"[code]range(n: int)[/code]: Beginnt bei 0, erhöht sich in Schritten von 1 "
+"und endet [i]vor[/i] [code]n[/code]. Das Argument [code]n[/code] ist "
+"[b]exklusiv[/b].\n"
+"[code]range(b: int, n: int)[/code]: Beginnt bei [code]b[/code], erhöht sich "
+"in Schritten von 1 und endet [i]vor[/i] [code]n[/code]. Die Argumente "
+"[code]b[/code] und [code]n[/code] sind [b]inklusive[/b] bzw. [b]exklusive[/"
+"b].\n"
+"[code]bereich(b: int, n: int, s: int)[/code]: Beginnt bei [code]b[/code], "
+"erhöht/verringert sich um Schritte von [code]s[/code] und endet [i]vor[/i] "
+"[code]n[/code]. Die Argumente [code]b[/code] und [code]n[/code] sind "
+"[b]inklusive[/b] bzw. [b]exklusive[/b]. Das Argument [code]s[/code] [b]kann[/"
+"b] negativ sein, aber nicht [code]0[/code]. Wenn [code]s[/code] [code]0[/"
+"code] ist, wird eine Fehlermeldung ausgegeben.\n"
+"Der [Methodenbereich] wandelt alle Argumente vor der Verarbeitung in [int] "
+"um.\n"
+"[b]Hinweis:[/b] Gibt ein leeres Array zurück, wenn kein Wert die "
+"Werteinschränkung erfüllt (z. B. [code]range(2, 5, -1)[/code] oder "
+"[code]range(5, 5, 1)[/code]).\n"
+"Beispiele:\n"
+"[codeblock]\n"
+"print(bereich(4)) # Gibt [0, 1, 2, 3] aus\n"
+"print(bereich(2, 5)) # Gibt [2, 3, 4] aus\n"
+"print(range(0, 6, 2)) # Gibt [0, 2, 4] aus\n"
+"print(range(4, 1, -1)) # Gibt [4, 3, 2] aus\n"
+"[/codeblock]\n"
+"Um rückwärts über ein [Array] zu iterieren, benutze:\n"
+"[codeblock]\n"
+"var array = [3, 6, 9]\n"
+"for i in range(array.size(), 0, -1):\n"
+" print(array[i - 1])\n"
+"[/codeblock]\n"
+"Ausgabe:\n"
+"[codeblock]\n"
+"9\n"
+"6\n"
+"3\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -2194,6 +2251,50 @@ msgid ""
"[code]GDScriptFunctionState[/code]. Notice [code]yield(get_tree(), "
"\"idle_frame\")[/code] from the above example."
msgstr ""
+"Stoppt die Ausführung der Funktion und gibt den aktuellen angehaltenen "
+"Zustand an die aufrufende Funktion zurück.\n"
+"Rufe vom Aufrufer [Methode GDScriptFunctionState.resume] von dem Zustand "
+"auf, um die Ausführung wieder aufzunehmen. Dadurch wird der Zustand "
+"ungültig. Innerhalb der wiederaufgenommenen Funktion gibt [code]yield()[/"
+"code] das zurück, was an den Funktionsaufruf [code]resume()[/code] übergeben "
+"wurde.\n"
+"Wenn ein Objekt und ein Signal übergeben werden, wird die Ausführung "
+"fortgesetzt, wenn das Objekt das angegebene Signal aussendet. In diesem Fall "
+"gibt [code]yield()[/code] das an [code]emit_signal()[/code] übergebene "
+"Argument zurück, wenn das Signal nur ein Argument benötigt, oder ein Array "
+"mit allen an [code]emit_signal()[/code] übergebenen Argumenten, wenn das "
+"Signal mehrere Argumente benötigt.\n"
+"[code]yield[/code] kann auch verwendet werden um auf das Ende einer Funktion "
+"zu warten:\n"
+"[codeblock]\n"
+"func _ready():\n"
+" yield(countdown(), \"completed\") # Warten auf die Beendigung der "
+"Funktion countdown()\n"
+" print('Fertig')\n"
+"\n"
+"func countdown():\n"
+" yield(get_tree(), \"idle_frame\") # gibt ein GDScriptFunctionState "
+"Objekt an _ready() zurück\n"
+" print(3)\n"
+" yield(get_tree().create_timer(1.0), \"timeout\")\n"
+" print(2)\n"
+" yield(get_tree().create_timer(1.0), \"timeout\")\n"
+" print(1)\n"
+" yield(get_tree().create_timer(1.0), \"timeout\")\n"
+"\n"
+"# gibt aus:\n"
+"# 3\n"
+"# 2\n"
+"# 1\n"
+"# bereit\n"
+"[/codeblock]\n"
+"Beim Yielding einer Funktion wird das Signal [code]completed[/code] "
+"automatisch ausgegeben, wenn die Funktion zurückkehrt. Es kann daher als "
+"[code]signal[/code] Parameter der [code]yield[/code] Methode verwendet "
+"werden, um fortzufahren.\n"
+"Um eine Funktion zu beenden, sollte die resultierende Funktion auch einen "
+"[code]GDScriptFunctionState[/code] zurückgeben. Beachte "
+"[code]yield(get_tree(), \"idle_frame\")[/code] aus dem obigen Beispiel."
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -3946,6 +4047,8 @@ msgid ""
"MIDI aftertouch message. This message is most often sent by pressing down on "
"the key after it \"bottoms out\"."
msgstr ""
+"MIDI-Aftertouch-Meldung. Diese Meldung wird meistens durch Drücken der Taste "
+"nachdem sie den Tiefpunkt erreicht hat gesendet."
#: doc/classes/@GlobalScope.xml
msgid ""
@@ -3961,6 +4064,8 @@ msgid ""
"MIDI program change message. This message sent when the program patch number "
"changes."
msgstr ""
+"MIDI-Programmwechselmeldung. Diese Meldung wird gesendet, wenn sich die "
+"Programm-Patch-Nummer ändert."
#: doc/classes/@GlobalScope.xml
msgid ""
@@ -3968,12 +4073,18 @@ msgid ""
"down on the key after it \"bottoms out\". This message is different from "
"polyphonic after-touch as it indicates the highest pressure across all keys."
msgstr ""
+"MIDI-Kanal-Druckmeldung. Diese Meldung wird meistens durch Drücken der Taste "
+"nachdem sie den Tiefpunkt erreicht hat gesendet.Diese Meldung unterscheidet "
+"sich von der polyphonen Aftertouch-Meldung, da sie den höchsten Druck über "
+"alle Tasten hinweg anzeigt."
#: doc/classes/@GlobalScope.xml
msgid ""
"MIDI pitch bend message. This message is sent to indicate a change in the "
"pitch bender (wheel or lever, typically)."
msgstr ""
+"MIDI-Pitch-Bend-Meldung. Diese Meldung wird gesendet, um eine Änderung des "
+"Pitch-Benders (typischerweise Rad oder Hebel) anzuzeigen."
#: doc/classes/@GlobalScope.xml
msgid ""
@@ -9731,8 +9842,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -13833,7 +13944,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -22443,7 +22559,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -25861,7 +25977,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -27703,7 +27819,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -31788,7 +31904,7 @@ msgstr ""
#: doc/classes/Input.xml
msgid "A singleton that deals with inputs."
-msgstr ""
+msgstr "Ein Singleton, der sich mit Inputs befasst."
#: doc/classes/Input.xml
msgid ""
@@ -31797,6 +31913,11 @@ msgid ""
"set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or "
"with the [InputMap] class."
msgstr ""
+"Ein Singleton, das sich mit Inputs befasst. Dazu gehören Tastendrucke, "
+"Maustasten und -bewegungen, Joypads und Eingabeaktionen. Aktionen und ihre "
+"Ereignisse können auf der Registerkarte [b]Eingabe-Zuordnung[/b] unter "
+"[b]Projekt > Projekteinstellungen[/b] oder mit der Klasse [InputMap] "
+"festgelegt werden."
#: doc/classes/Input.xml
msgid "Inputs tutorial index"
@@ -32028,6 +32149,20 @@ msgid ""
"[url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input "
"examples[/url] in the documentation for more information."
msgstr ""
+"Gibt [code]true[/code] aus, wenn Sie das Aktionsereignis drücken. Beachten "
+"Sie, dass, wenn einer Aktion mehrere Tasten zugewiesen sind und mehr als "
+"eine von ihnen gedrückt wird, das Loslassen einer Taste die Aktion auslöst, "
+"selbst wenn eine andere Taste, die dieser Aktion zugewiesen ist, noch "
+"gedrückt ist.\n"
+"Wenn [code]exact[/code] [code] false[/code] ist, werden zusätzliche "
+"Eingabemodifikatoren für die Ereignisse [InputEventKey] und "
+"[InputEventMouseButton] sowie die Richtung für die Ereignisse "
+"[InputEventJoypadMotion] ignoriert.\n"
+"[b]Hinweis:[/b] Aufgrund von Tastatur-Ghosting kann [method "
+"is_action_pressed] [code]false[/code] zurückgeben, auch wenn eine der Tasten "
+"der Aktion gedrückt ist. Siehe [url=$DOCS_URL/tutorials/inputs/"
+"input_examples.html#keyboard-events]Eingabebeispiele[/url] in der "
+"Dokumentation für weitere Informationen."
#: doc/classes/Input.xml
#, fuzzy
@@ -34911,7 +35046,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -34927,7 +35062,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -34963,7 +35098,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -39140,7 +39275,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -39407,7 +39542,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -39528,6 +39663,53 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "Gibt das AnimationNode mit dem gegebenen Namen zurück."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -42231,7 +42413,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -42243,7 +42431,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -60237,7 +60426,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -63197,8 +63386,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -66895,13 +67084,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -66913,13 +67103,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -74065,9 +74256,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "Wenn [code]true[/code], wird die Textur zentriert."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -74151,6 +74345,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/el.po b/doc/translations/el.po
index c7236b41df..87eee32604 100644
--- a/doc/translations/el.po
+++ b/doc/translations/el.po
@@ -855,7 +855,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7694,8 +7701,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11766,7 +11773,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20192,7 +20204,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23584,7 +23596,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25421,7 +25433,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32524,7 +32536,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32540,7 +32552,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32570,7 +32582,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36698,7 +36710,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36961,7 +36973,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37079,6 +37091,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39776,7 +39834,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39788,7 +39852,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57561,7 +57626,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60462,8 +60527,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64095,13 +64160,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64113,13 +64179,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71028,7 +71095,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71113,6 +71184,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 50425a97d9..f9d008c41a 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -1380,9 +1380,22 @@ msgstr ""
"mientras muestra un trazo de cuando un error o advertencia se muestra."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Como [method print], pero imprime sólo cuando se usa en modo de depuración."
+"Imprime una registro de la pila en la ubicación del código, sólo funciona "
+"cuando se ejecuta con el depurador activado.\n"
+"La salida en la consola se vería algo así:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -10108,8 +10121,8 @@ msgstr ""
#, fuzzy
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -15375,10 +15388,13 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
-"Si [code]true[/code], el ancestro [Viewport] está actualmente usando esta "
-"cámara."
#: doc/classes/Camera.xml
msgid ""
@@ -26618,10 +26634,11 @@ msgstr ""
"save_to_file]."
#: doc/classes/EditorFeatureProfile.xml
+#, fuzzy
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
"Guarda el perfil de características del editor en un archivo en formato "
"JSON. Luego puede ser importado usando el botón [b]Import[/b] del "
@@ -31150,9 +31167,10 @@ msgid "The default exposure used for tonemapping."
msgstr "La exposición predeterminada que se utiliza para el mapeo de tonos."
#: doc/classes/Environment.xml
+#, fuzzy
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
"El modo de mapeo de tonos a utilizar. El \"tonemapping\" es el proceso que "
@@ -33579,9 +33597,10 @@ msgstr ""
"puntos finales."
#: doc/classes/Geometry.xml
+#, fuzzy
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -43052,7 +43071,7 @@ msgstr "La altura del cilindro."
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -43078,7 +43097,7 @@ msgstr "El tamaño del ancho de un píxel en el sprite para escalarlo en 3D."
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -43125,7 +43144,7 @@ msgstr "Si se ajusta, las luces del entorno afectan al sprite."
#: doc/classes/Label3D.xml
#, fuzzy
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
"Si se fija, la textura puede ser vista desde atrás también, si no, es "
@@ -48253,7 +48272,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -48576,7 +48595,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -48702,6 +48721,54 @@ msgstr ""
msgid "Control activation of this server."
msgstr "Traducción local de este nodo."
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr "Devuelve el estado actual de la conexión. Ver [enum ConnectionStatus]."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "Establece la piel que se utilizará en esta instancia."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -52624,8 +52691,14 @@ msgid "See [enum ShadowDetail]."
msgstr "Ver [enum ShadowMode]."
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
-msgstr "Ver [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
+msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
@@ -52636,9 +52709,11 @@ msgstr ""
"que [constant SHADOW_CUBE], pero de menor calidad."
#: doc/classes/OmniLight.xml
+#, fuzzy
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
"Las sombras se representan en un mapa de cubos. Más lento que [constant "
"SHADOW_DUAL_PARABOLOID], pero de mayor calidad."
@@ -75508,7 +75583,7 @@ msgstr "El tamaño del ancho de un píxel en el sprite para escalarlo en 3D."
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -79211,8 +79286,8 @@ msgstr "Establece el texto para una línea específica."
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -83834,15 +83909,18 @@ msgstr ""
"elementos pueden establecerse utilizando [method set_item_metadata]."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
"Devuelve el siguiente TreeItem del árbol o un objeto nulo si no hay ninguno."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -83858,15 +83936,18 @@ msgid "Returns the parent TreeItem or a null object if there is none."
msgstr "Devuelve el TreeItem padre o un objeto nulo si no hay ninguno."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
"Devuelve el TreeItem anterior del árbol o un objeto nulo si no hay ninguno."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -93040,9 +93121,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr "Establece la matriz de transformación global del Viewport."
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "Si [code]true[/code], el canvas del viewport no se renderiza."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -93150,6 +93234,15 @@ msgstr ""
"ViewportUpdateMode] para las opciones."
#: doc/classes/VisualServer.xml
+msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
#, fuzzy
msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 5f170b2b28..7416d80072 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -1269,8 +1269,15 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "شبیه متد چاپ، اما چاپ کردن تنها در حالت اشکال زدایی Ø§Ø³ØªÙØ§Ø¯Ù‡ میشود."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8118,8 +8125,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12187,7 +12194,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20598,7 +20610,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23987,7 +23999,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25818,7 +25830,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32914,7 +32926,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32930,7 +32942,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32960,7 +32972,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37066,7 +37078,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37327,7 +37339,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37441,6 +37453,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40138,7 +40196,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40150,7 +40214,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57920,7 +57985,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60811,8 +60876,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64435,13 +64500,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64453,13 +64519,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71345,7 +71412,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71430,6 +71501,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index 0ab098fd33..b1d940aa14 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -922,7 +922,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7767,8 +7774,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11840,7 +11847,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20268,7 +20280,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23660,7 +23672,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25497,7 +25509,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32607,7 +32619,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32623,7 +32635,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32653,7 +32665,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36783,7 +36795,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37046,7 +37058,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37164,6 +37176,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39861,7 +39919,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39873,7 +39937,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57648,7 +57713,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60550,8 +60615,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64185,13 +64250,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64203,13 +64269,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71123,7 +71190,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71208,6 +71279,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/fil.po b/doc/translations/fil.po
index 2dabe612e9..42ab5537f4 100644
--- a/doc/translations/fil.po
+++ b/doc/translations/fil.po
@@ -856,7 +856,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7693,8 +7700,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11762,7 +11769,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20173,7 +20185,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23562,7 +23574,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25393,7 +25405,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32489,7 +32501,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32505,7 +32517,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32535,7 +32547,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36635,7 +36647,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36896,7 +36908,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37010,6 +37022,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39707,7 +39765,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39719,7 +39783,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57473,7 +57538,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60364,8 +60429,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63988,13 +64053,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64006,13 +64072,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70898,7 +70965,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70983,6 +71054,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index 9d5c5f4a01..2866dc9b70 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -61,7 +61,7 @@ msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2022-07-18 08:12+0000\n"
+"PO-Revision-Date: 2022-07-27 05:24+0000\n"
"Last-Translator: Maxime Leroy <lisacintosh@gmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/fr/>\n"
@@ -1423,9 +1423,22 @@ msgstr ""
"ou un avertissement est affiché."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Comme [method print], mais ne s'affiche que lorsqu'utilisé en mode débogage."
+"Affiche la trace d'appels à l'emplacement du code, ne fonctionne que lorsque "
+"le débogueur est activé.\n"
+"La sortie dans la console ressemblerait à ceci :\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -10371,10 +10384,11 @@ msgstr ""
"identifiant inférieur est éteint."
#: doc/classes/ARVRController.xml
+#, fuzzy
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -15718,9 +15732,13 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
-"Si [code]true[/code], l’ancêtre [Viewport] utilise actuellement cette caméra."
#: doc/classes/Camera.xml
msgid ""
@@ -27361,10 +27379,11 @@ msgstr ""
"[method save_to_file]."
#: doc/classes/EditorFeatureProfile.xml
+#, fuzzy
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
"Enregistre le profil de fonctionnalité de l'éditeur dans un fichier au "
"format JSON. Il peut ensuite être importé en utilisant le bouton [b]Import[/"
@@ -31942,7 +31961,7 @@ msgstr "L’exposition par défaut utilisée pour tonifier."
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -34020,9 +34039,10 @@ msgstr ""
"fin."
#: doc/classes/Geometry.xml
+#, fuzzy
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -42492,6 +42512,8 @@ msgid ""
"Controls the text's horizontal alignment. Supports left, center, right. Set "
"it to one of the [enum Align] constants."
msgstr ""
+"Control l'alignement horizontal du texte. Supporte à gauche, au centre, ou à "
+"droite. Réglez-le à l'une des constantes de [enum Align]."
#: doc/classes/Label3D.xml
#, fuzzy
@@ -42509,6 +42531,8 @@ msgid ""
"If [code]true[/code], depth testing is disabled and the object will be drawn "
"in render order."
msgstr ""
+"Si [code]true[/code], les tests de profondeur sont désactivés et l'objet "
+"sera dessiné suivant son ordre de rendu et non suivant sa distance."
#: doc/classes/Label3D.xml
#, fuzzy
@@ -42521,16 +42545,26 @@ msgid "The tint of [Font]'s outline."
msgstr "La hauteur du cylindre."
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
"This is because opaque objects are not sorted, while transparent objects are "
"sorted from back to front (subject to priority)."
msgstr ""
+"Définit la priorité de rendu pour la bordure du texte. Des objets plus "
+"prioritaires seront affichés par-dessus des objets moins inférieurs.\n"
+"[b]Note: [/b] Cela ne s'applique que si [member alpha_cut] est défini à "
+"[constant ALPHA_CUT_DISABLED] (c'est la valeur par défaut).\n"
+"[b]Note :[/b] Cela ne s'applique qu'au tri des objets transparents. Cela "
+"n'affectera pas la façon dont les objets transparents sont triés par rapport "
+"aux objets opaques. C'est parce que les objets opaques ne sont pas triés, "
+"alors que les objets transparents sont triés de l'arrière à l'avant (et "
+"suivant leur priorité)."
#: doc/classes/Label3D.xml
#, fuzzy
@@ -42538,16 +42572,26 @@ msgid "The size of one pixel's width on the label to scale it in 3D."
msgstr "La taille d'un des pixels de la sprite pour définir sa taille en 3D."
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
"This is because opaque objects are not sorted, while transparent objects are "
"sorted from back to front (subject to priority)."
msgstr ""
+"Définit la priorité de rendu pour le texte. Des objets plus prioritaires "
+"seront affichés par-dessus des objets moins inférieurs.\n"
+"[b]Note: [/b] Cela ne s'applique que si [member alpha_cut] est défini à "
+"[constant ALPHA_CUT_DISABLED] (c'est la valeur par défaut).\n"
+"[b]Note :[/b] Cela ne s'applique qu'au tri des objets transparents. Cela "
+"n'affectera pas la façon dont les objets transparents sont triés par rapport "
+"aux objets opaques. C'est parce que les objets opaques ne sont pas triés, "
+"alors que les objets transparents sont triés de l'arrière à l'avant (et "
+"suivant leur priorité)."
#: doc/classes/Label3D.xml
#, fuzzy
@@ -42561,10 +42605,14 @@ msgid ""
"Controls the text's vertical alignment. Supports top, center, bottom. Set it "
"to one of the [enum VAlign] constants."
msgstr ""
+"Control l'alignement vertical du texte. Supports en haut, au centre, et en "
+"bas. Réglez-le à l'une des constantes de [enum VAlign]."
#: doc/classes/Label3D.xml
msgid "Text width (in pixels), used for autowrap and fill alignment."
msgstr ""
+"La largeur de texte (en pixels), utilisée pour les retours à la ligne et "
+"l'alignement de remplissage."
#: doc/classes/Label3D.xml
#, fuzzy
@@ -42572,10 +42620,13 @@ msgid "If set, lights in the environment affect the label."
msgstr "Si [code]true[/code], ce [HTTPClient] a une réponse disponible."
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
+"Si défini, le texte sera aussi visible de derrière. Sinon, le texture n'est "
+"invisible que de face."
#: doc/classes/Label3D.xml doc/classes/SpatialMaterial.xml
#: doc/classes/SpriteBase3D.xml
@@ -42583,11 +42634,16 @@ msgid ""
"Disables the depth test, so this object is drawn on top of all others. "
"However, objects drawn after it in the draw order may cover it."
msgstr ""
+"Désactive le test de profondeur, de sorte que cet objet sera dessiné devant "
+"tous les autres. Cependant, les objets dessinés après lui dans l'ordre "
+"d'affichage peuvent être devant."
#: doc/classes/Label3D.xml
msgid ""
"Label is scaled by depth so that it always appears the same size on screen."
msgstr ""
+"L'étiquette est mise à l'échelle suivant la distance pour qu'elle apparaisse "
+"toujours à la même taille à l'écran."
#: doc/classes/Label3D.xml doc/classes/SpriteBase3D.xml
msgid "Represents the size of the [enum DrawFlags] enum."
@@ -42599,6 +42655,9 @@ msgid ""
"areas, but transparency sorting issues may be visible when multiple "
"transparent materials are overlapping."
msgstr ""
+"Ce mode réalise un mélange l'opacité standard. Il peut afficher des zones "
+"translucides, mais des problèmes de tri selon la transparence peuvent être "
+"visibles lorsque plusieurs matériaux transparents se chevauchent."
#: doc/classes/Label3D.xml
msgid ""
@@ -42610,6 +42669,15 @@ msgid ""
"scripts), this mode might have transparency sorting issues between the main "
"text and the outline."
msgstr ""
+"Ce mode ne permet que les pixels transparents ou alors entièrement opaques. "
+"Ce mode est également connu sous le nom de [i]alpha testing[/i] ou "
+"[i]transparence 1 bit[/i].\n"
+"[b]Note :[/b] Ce mode peut avoir des problèmes avec des polices avec "
+"anticrénelage et des contours, essayez d'ajuster [member "
+"alpha_scisor_threshold] ou en utilisant la police avec SDF.\n"
+"[b]Note :[/b] Lors de l'utilisation de texte avec des caractères superposés "
+"(par exemple des cursives), ce mode pourrait avoir des problèmes de tri de "
+"la transparence entre le texte principal et le contour."
#: doc/classes/Label3D.xml
msgid ""
@@ -42621,6 +42689,13 @@ msgid ""
"scripts), this mode might have transparency sorting issues between the main "
"text and the outline."
msgstr ""
+"Ce mode dessine des pixels entièrement opaques lors de la pré-passe de "
+"profondeur. Ceci est plus lent que [constant ALPHA_CUT_DISABLED] ou "
+"[constant ALPHA_CUT_DISCARD], mais ça permet d'afficher des zones "
+"translucides et des bords lisses tout en utilisant le tri approprié.\n"
+"[b]Note :[/b] Lors de l'utilisation de texte avec des caractères superposés "
+"(par exemple des cursives), ce mode pourrait avoir des problèmes de tri de "
+"la transparence entre le texte principal et le contour."
#: doc/classes/LargeTexture.xml
msgid ""
@@ -42637,6 +42712,10 @@ msgid ""
"You can dynamically add pieces ([Texture]s) to this [LargeTexture] using "
"different offsets."
msgstr ""
+"[i]Obsolète (elle sera retiré dans Godot 4.0).[/i] Une [Texture] capable de "
+"stocker de nombreuses textures plus petites avec des décalages.\n"
+"Vous pouvez ajouter dynamiquement des [Texture] à ce [LargeTexture] en "
+"utilisant différents décalages."
#: doc/classes/LargeTexture.xml
msgid ""
@@ -42694,6 +42773,11 @@ msgid ""
"from it. Light contains the common variables and parameters used for "
"lighting."
msgstr ""
+"Light est la classe de base [i]abstraite[/i] pour les lumières. Puisque ça "
+"ne peut être instancié, ça ne devrait pas être utilisé directement. D'autres "
+"types de nœuds de lumière héritent de cette classe, qui contient les "
+"variables communes aux sous-classes, et les paramètres utilisés pour "
+"l'éclairage."
#: doc/classes/Light.xml doc/classes/SpotLight.xml
msgid "3D lights and shadows"
@@ -42712,6 +42796,8 @@ msgid ""
"If [code]true[/code], the light only appears in the editor and will not be "
"visible at runtime."
msgstr ""
+"Si [code]true[/code], la lumière n'apparaît que dans l'éditeur et ne sera "
+"pas visible au lancement du jeu."
#: doc/classes/Light.xml
msgid "The light's bake mode. See [enum BakeMode]."
@@ -42722,6 +42808,9 @@ msgid ""
"The light's color. An [i]overbright[/i] color can be used to achieve a "
"result equivalent to increasing the light's [member light_energy]."
msgstr ""
+"La couleur de la lumière. Une couleur [i]sur-brillante[/i] peut être "
+"utilisée pour un résultant équivalent à augmenter l'énergie [member "
+"light_energy] de la lumière."
#: doc/classes/Light.xml
msgid "The light will affect objects in the selected layers."
@@ -42733,18 +42822,26 @@ msgid ""
"[OmniLight] and [SpotLight], changing this value will only change the light "
"color's intensity, not the light's radius."
msgstr ""
+"Le multiplicateur de force de la lumière (ça n'a aucune unité physique). "
+"Pour [OmniLight] et [SpotLight], changer cette valeur ne changera que "
+"l'intensité de la constante de couleur de la lumière, et non le rayon de la "
+"lumière."
#: doc/classes/Light.xml
msgid ""
"Secondary multiplier used with indirect light (light bounces). This works on "
"both [BakedLightmap] and [GIProbe]."
msgstr ""
+"Le multiplicateur secondaire utilisé pour la lumière indirecte (les rebonds "
+"de lumière). Cela fonctionne avec [BakedLightmap] et aussi [GIProbe]."
#: doc/classes/Light.xml
msgid ""
"If [code]true[/code], the light's effect is reversed, darkening areas and "
"casting bright shadows."
msgstr ""
+"Si [code]true[/code], l'effet de la lumière est inversé, assombrissant les "
+"zones et lançant des ombres lumineuses."
#: doc/classes/Light.xml
msgid ""
@@ -42761,6 +42858,11 @@ msgid ""
"emission, this can be used to avoid unrealistic reflections when placing "
"lights above an emissive surface."
msgstr ""
+"L'intensité du reflet spéculaire dans les objets touchés par la lumière. "
+"Avec [code]0[/code], la lumière devient une lumière purement diffuse. Si ça "
+"n'est pas une émission pré-calculée, cela peut être utilisé pour éviter des "
+"reflets irréalistes lorsqu'on place des lumières au-dessus d'une surface "
+"émise."
#: doc/classes/Light.xml
msgid ""
@@ -42768,6 +42870,10 @@ msgid ""
"shadowing (\"shadow acne\"), while too large a value causes shadows to "
"separate from casters (\"peter-panning\"). Adjust as needed."
msgstr ""
+"Utilisé pour ajuster l'apparence de l'ombre. Une valeur trop petite résulte "
+"au auto-ombrage (« shadow acne »), et quqand trop grande, ça provoque des "
+"ombres séparées de l'objet qui crée l'ombre (« peter-panning »). Réglez "
+"selon les besoins."
#: doc/classes/Light.xml
msgid "The color of shadows cast by this light."
@@ -42781,6 +42887,11 @@ msgid ""
"[b]Note:[/b] Contact shadows can look broken, so leaving this property to "
"[code]0.0[/code] is recommended."
msgstr ""
+"Tente de réduire l'écart [member shadow_bias] en rendant les ombres de "
+"contact en fonction de l'espace-écran. Cela a un impact sur les "
+"performances, surtout avec des valeurs élevées.\n"
+"[b]Note :[/b] Les ombres de contact peuvent sembler brisées, donc laisser "
+"cette propriété à [code]0.0[/code] est plutôt recommandé."
#: doc/classes/Light.xml
msgid "If [code]true[/code], the light will cast shadows."
@@ -42793,6 +42904,11 @@ msgid ""
"cast a shadow on both sides of the mesh, set the mesh to use double-sided "
"shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]."
msgstr ""
+"Si [code]true[/code], inverse la face arrière du maillage. Cela peut être "
+"utile lorsque vous avez un maillage plat qui a une lumière derrière elle. Si "
+"vous avez besoin de lancer une ombre sur les deux côtés du maillage, "
+"définissez le maillage pour utiliser les deux faces avec [constant "
+"GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]"
#: doc/classes/Light.xml
msgid "Constant for accessing [member light_energy]."
@@ -42892,10 +43008,13 @@ msgid ""
"Light is ignored when baking.\n"
"[b]Note:[/b] Hiding a light does [i]not[/i] affect baking."
msgstr ""
+"La lumière est ignorée lors du pré-calcul.\n"
+"[b]Note :[/b] L'enregistrement d'une lumière ne [i]n'affecte pas[/i] le pré-"
+"calcul."
#: doc/classes/Light.xml
msgid "Only indirect lighting will be baked (default)."
-msgstr ""
+msgstr "Seul l'éclairage indirect sera pré-calculé (choix par défaut)."
#: doc/classes/Light.xml
msgid ""
@@ -42903,6 +43022,9 @@ msgid ""
"[b]Note:[/b] You should hide the light if you don't want it to appear twice "
"(dynamic and baked)."
msgstr ""
+"La lumière directe et indirecte sera pré-calculée.\n"
+"[b]Note :[/b] Vous devriez cacher la lumière si vous ne voulez pas qu'elle "
+"apparaisse deux fois (une fois dynamique et une autre pour le pré-calcul)."
#: doc/classes/Light2D.xml
msgid "Casts light in a 2D environment."
@@ -42915,6 +43037,11 @@ msgid ""
"parameters (range and shadows-related).\n"
"[b]Note:[/b] Light2D can also be used as a mask."
msgstr ""
+"Montre la lumière dans un environnement 2D. La lumière est définie par une "
+"texture (généralement grise), une couleur, une valeur énergétique, un mode "
+"(voir les constantes), et divers autres paramètres (relatifs à la portée et "
+"aux ombres).\n"
+"[b]Note :[/b] Light2D peut aussi être utilisée comme masque."
#: doc/classes/Light2D.xml
msgid "The Light2D's [Color]."
@@ -42939,20 +43066,23 @@ msgstr ""
#: doc/classes/Light2D.xml
msgid "The Light2D's mode. See [enum Mode] constants for values."
msgstr ""
+"Le mode de la Light2D. Voir les constantes [enum Mode] pour les valeurs."
#: doc/classes/Light2D.xml
msgid "The offset of the Light2D's [code]texture[/code]."
-msgstr ""
+msgstr "Le décalage de la [code]texture[/code] de la Light2D."
#: doc/classes/Light2D.xml
msgid "The height of the Light2D. Used with 2D normal mapping."
-msgstr ""
+msgstr "La hauteur du Light2D. Utilisé avec une mapping de normale 2D."
#: doc/classes/Light2D.xml
msgid ""
"The layer mask. Only objects with a matching mask will be affected by the "
"Light2D."
msgstr ""
+"Le masque de calque. Seuls les objets avec un masque correspondant seront "
+"sous l'influence de ce Light2D."
#: doc/classes/Light2D.xml
msgid "Maximum layer value of objects that are affected by the Light2D."
@@ -43003,13 +43133,16 @@ msgstr "Valeur de lissage pour les ombres."
#: doc/classes/Light2D.xml
msgid "Smooth shadow gradient length."
-msgstr ""
+msgstr "Longeur de lissage du dégradé d'ombre."
#: doc/classes/Light2D.xml
msgid ""
"The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders "
"with a matching light mask will cast shadows."
msgstr ""
+"Le masque d'ombre. Utilisé avec [LightOccluder2D] pour lancer des ombres. "
+"Seuls les occulteurs avec un masque de lumière correspondant lanceront des "
+"ombres."
#: doc/classes/Light2D.xml
msgid "[Texture] used for the Light2D's appearance."
@@ -43024,18 +43157,24 @@ msgid ""
"Adds the value of pixels corresponding to the Light2D to the values of "
"pixels under it. This is the common behavior of a light."
msgstr ""
+"Ajoute la valeur des pixels correspondant à la Light2D aux valeurs des "
+"pixels sous elle. C'est le comportement classique des lumières."
#: doc/classes/Light2D.xml
msgid ""
"Subtracts the value of pixels corresponding to the Light2D to the values of "
"pixels under it, resulting in inversed light effect."
msgstr ""
+"Soustrait la valeur des pixels correspondant à la Light2D aux valeurs des "
+"pixels sous elle, ce qui entraîne un effet de lumière inversé."
#: doc/classes/Light2D.xml
msgid ""
"Mix the value of pixels corresponding to the Light2D to the values of pixels "
"under it by linear interpolation."
msgstr ""
+"Mélange la valeur des pixels correspondant à la Light2D aux valeurs des "
+"pixels sous elle, via une interpolation linéaire."
#: doc/classes/Light2D.xml
msgid ""
@@ -43043,40 +43182,54 @@ msgid ""
"parts of the screen underneath depending on the value of each pixel of the "
"light (mask) texture."
msgstr ""
+"La texture de lumière de la Light2D est utilisée comme masque, cache ou "
+"révèle des parties de l'écran sous la valeur de chaque pixel de la texture "
+"de la lumière (masque)."
#: doc/classes/Light2D.xml
msgid "No filter applies to the shadow map. See [member shadow_filter]."
msgstr ""
+"Aucun filtre ne s'applique à la carte d'ombre. Voir [member Shadow_filter]."
#: doc/classes/Light2D.xml
msgid ""
"Percentage closer filtering (3 samples) applies to the shadow map. See "
"[member shadow_filter]."
msgstr ""
+"Le pourcentage de filtrage proche (3 échantillons) s'applique à la carte de "
+"l'ombre. Voir [member Shadow_filter]."
#: doc/classes/Light2D.xml
msgid ""
"Percentage closer filtering (5 samples) applies to the shadow map. See "
"[member shadow_filter]."
msgstr ""
+"Le pourcentage de filtrage proche (5 échantillons) s'applique à la carte de "
+"l'ombre. Voir [member Shadow_filter]."
#: doc/classes/Light2D.xml
msgid ""
"Percentage closer filtering (7 samples) applies to the shadow map. See "
"[member shadow_filter]."
msgstr ""
+"Le pourcentage de filtrage proche (7 échantillons) s'applique à la carte de "
+"l'ombre. Voir [member Shadow_filter]."
#: doc/classes/Light2D.xml
msgid ""
"Percentage closer filtering (9 samples) applies to the shadow map. See "
"[member shadow_filter]."
msgstr ""
+"Le pourcentage de filtrage proche (9 échantillons) s'applique à la carte de "
+"l'ombre. Voir [member Shadow_filter]."
#: doc/classes/Light2D.xml
msgid ""
"Percentage closer filtering (13 samples) applies to the shadow map. See "
"[member shadow_filter]."
msgstr ""
+"Le pourcentage de filtrage proche (13 échantillons) s'applique à la carte de "
+"l'ombre. Voir [member Shadow_filter]."
#: doc/classes/LightOccluder2D.xml
msgid "Occludes light cast by a Light2D, casting shadows."
@@ -43094,10 +43247,12 @@ msgid ""
"The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only "
"from Light2D(s) that have the same light mask(s)."
msgstr ""
+"Le masque de lumière du LightOccluder2D. Le LightOccluder2D ne lancera que "
+"des ombres que sur les Light2D qui ont le même masque de lumière."
#: doc/classes/LightOccluder2D.xml
msgid "The [OccluderPolygon2D] used to compute the shadow."
-msgstr ""
+msgstr "Le [OccluderPolygon2D] utilisé pour calculer l'ombre."
#: doc/classes/Line2D.xml
msgid "A 2D line."
@@ -43113,6 +43268,14 @@ msgid ""
"[member ProjectSettings.rendering/limits/buffers/"
"canvas_polygon_index_buffer_size_kb]."
msgstr ""
+"Une ligne à travers plusieurs points dans l'espace 2D. Supporte une largeur "
+"et une couleur différentes sur la longueur, la texture et plusieurs types "
+"d'embout et de jointure.\n"
+"[b]Note :[/b] Par défaut, Godot ne peut dessiner que 4 096 points de "
+"polygone à la fois. Pour augmenter cette limite, ouvrez les paramètres du "
+"projet et augmentez [member ProjectSettings.rendering/limits/buffers/"
+"canvas_polygon_buffer_size_kb] et [member ProjectSettings.rendering/limits/"
+"buffers/canvas_polygon_index_buffer_size_kb]"
#: doc/classes/Line2D.xml
msgid ""
@@ -43125,10 +43288,18 @@ msgid ""
"get_point_count][/code]), the point will be appended at the end of the point "
"list."
msgstr ""
+"Ajoute un point au [code]position[/code]. Ajoute le point à la fin de la "
+"ligne.\n"
+"Si [code]at_position[/code] est donné, le point est inséré avant l'indice "
+"[code]at_position[/code], en déplaçant ce point (et chaque point après) "
+"après le point inséré. Si [code]at_position[/code] n'est pas donné, ou est "
+"une valeur invalide ([code]at_position < 0[/code] ou [code]at_position >= "
+"[method get_point_count][/code]), le point sera ajouté à la fin de la liste "
+"des points."
#: doc/classes/Line2D.xml
msgid "Removes all points from the line."
-msgstr ""
+msgstr "Retire tous les points de la ligne."
#: doc/classes/Line2D.xml
msgid "Returns the Line2D's amount of points."
@@ -43422,6 +43593,15 @@ msgid ""
"select(2, 5) # Will select \"lco\".\n"
"[/codeblock]"
msgstr ""
+"Sélectionne les caractères à l'intérieur du [LineEdit] entre [code]from[/"
+"code] et [code]to[/code]. Par défaut, [code]from[/code] est au début et "
+"[code]to[/code] à la fin.\n"
+"[codeblock]\n"
+"text = \"Bienvenue\"\n"
+"select() # Will select \"Bienvenue\".\n"
+"select(5) # Will select \"venue\".\n"
+"select(2, 7) # Will select \"enven\".\n"
+"[/codeblock]"
#: doc/classes/LineEdit.xml
msgid "Selects the whole [String]."
@@ -43444,6 +43624,8 @@ msgid ""
"The cursor's position inside the [LineEdit]. When set, the text may scroll "
"to accommodate it."
msgstr ""
+"La position du curseur dans le [LineEdit]. Lorsqu'il est défini, le texte "
+"peut défiler pour l'afficher."
#: doc/classes/LineEdit.xml
msgid ""
@@ -44361,6 +44543,9 @@ msgid ""
"text color of the button. Disabled, hovered, and pressed states take "
"precedence over this color."
msgstr ""
+"Le texte [Color] utilisé quand le [MenuButton] a le focus. Il suffit de "
+"remplacer la couleur de texte normale du bouton. Les états désactivés, "
+"survolés et pressés sont prioritaires sur cette couleur."
#: doc/classes/MenuButton.xml
msgid "Text [Color] used when the [MenuButton] is being hovered."
@@ -44388,6 +44573,9 @@ msgid ""
"current [StyleBox], so using [StyleBoxEmpty] will just disable the focus "
"visual effect."
msgstr ""
+"La [StyleBox] utilisée quand le [MenuButton] a le focus. Elle est affichée "
+"par dessus l'actuelle [StyleBox], donc utiliser [StyleBoxEmpty] va tout "
+"simplement désactiver l'effet visuel du focus."
#: doc/classes/MenuButton.xml
msgid "[StyleBox] used when the [MenuButton] is being hovered."
@@ -44414,6 +44602,12 @@ msgid ""
"surfaces is preferred to a single surface, because objects created in 3D "
"editing software commonly contain multiple materials."
msgstr ""
+"Mesh est un type de [Resource] qui contient la géométrie à base de tableaux "
+"de sommets, divisé en [i]surfaces[/i]. Chaque surface contient un tableau "
+"complètement séparé et un matériau utilisé pour le dessiner. Au niveau du "
+"design, un maillage avec plusieurs surfaces est préféré à une seule surface, "
+"car les objets créés dans le logiciel d'édition 3D contiennent généralement "
+"plusieurs matériaux."
#: doc/classes/Mesh.xml
msgid ""
@@ -44424,6 +44618,13 @@ msgid ""
"If [code]simplify[/code] is [code]true[/code], the geometry can be further "
"simplified to reduce the amount of vertices. Disabled by default."
msgstr ""
+"Calcule la [ConvexPolygonShape] du maillage.\n"
+"Si [code]clean[/code] est [code]true[/code] (par défaut), les sommets "
+"intérieurs et en double sont automatiquement supprimés. Vous pouvez le "
+"définir à [code]false[/code] pour rendre le processus plus rapide si "
+"nécessaire.\n"
+"Si [code]simplify[/code] est [code]true[/code], la géométrie peut être plus "
+"simplifiée pour réduire la quantité de sommets. Désactivé par défaut."
#: doc/classes/Mesh.xml
msgid ""
@@ -44432,6 +44633,10 @@ msgid ""
"[b]Note:[/b] This method typically returns the vertices in reverse order (e."
"g. clockwise to counterclockwise)."
msgstr ""
+"Calcule un maillage de contour avec un décalage défini (marge) du maillage "
+"d'origine.\n"
+"[b]Note :[/b] Cette méthode renvoie généralement les sommets en ordre "
+"inverse (par ex., du sens horaire au sens anti-horaire)."
#: doc/classes/Mesh.xml
msgid "Calculate a [ConcavePolygonShape] from the mesh."
@@ -44448,6 +44653,10 @@ msgid ""
"get_transformed_aabb].\n"
"[b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]."
msgstr ""
+"Retourne le plus petit [AABB] englobant ce maillage dans l'espace local. Non "
+"affecté par [code]custom_aabb[/code]. Voir aussi [method VisualInstance."
+"get_transformed_aabb]\n"
+"[b]Note :[/b] Ceci n'est implémenté que pour [ArrayMesh] et [PrimitiveMesh]."
#: doc/classes/Mesh.xml
msgid ""
@@ -45303,12 +45512,16 @@ msgid ""
"The height at which the camera is placed in relation to the ground (i.e. "
"[ARVROrigin] node)."
msgstr ""
+"La hauteur à laquelle la caméra est placée par rapport au sol (c'est-à-dire "
+"au nœud [ARVROrigin])."
#: modules/mobile_vr/doc_classes/MobileVRInterface.xml
msgid ""
"The interocular distance, also known as the interpupillary distance. The "
"distance between the pupils of the left and right eye."
msgstr ""
+"La distance interoculaire, aussi appelée la distance interpupillaire. La "
+"distance entre la pupille de l'œil gauche et celle du l'œil droit."
#: modules/mobile_vr/doc_classes/MobileVRInterface.xml
msgid ""
@@ -45321,7 +45534,7 @@ msgstr ""
#: modules/mobile_vr/doc_classes/MobileVRInterface.xml
msgid "The k2 lens factor, see k1."
-msgstr ""
+msgstr "Le facteur k2 de lentille, voir k1."
#: modules/mobile_vr/doc_classes/MobileVRInterface.xml
msgid ""
@@ -46322,6 +46535,20 @@ msgid ""
"(which should be avoided in general) the result might not be what is "
"expected."
msgstr ""
+"Retourne [code]true[/code] si la coordonnée [code]point[/code] global "
+"appartient actuellement à la [code]region[/code] de la navigation. Dans ce "
+"contexte, l'une des faces du polygone de maillages de navigation de la "
+"région a une position possible à la distance la plus proche de ce point par "
+"rapport à tous les autres maillages de navigation provenant d'autres régions "
+"de navigation également enregistrées sur la carte de navigation de la région "
+"donnée.\n"
+"Si plusieurs maillages de navigation ont des positions à égale distance, la "
+"région de navigation dont les polygones sont traités en premier sont "
+"retournés. Les polygones sont traités dans l'ordre d'ajout des régions dans "
+"le serveur de navigation.\n"
+"[b]Note :[/b] Si les maillages de navigation provenant de différentes "
+"régions de navigation se chevauchent (qui doivent être évités en général), "
+"le résultat peut être inattendu."
#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml
#, fuzzy
@@ -46340,6 +46567,9 @@ msgid ""
"Set the region's navigation layers. This allows selecting regions from a "
"path request (when using [method Navigation2DServer.map_get_path])."
msgstr ""
+"Définit les calques de navigation de la région. Cela permet de sélectionner "
+"les régions à partir d'une requête de chemin (en utilisant [method "
+"Navigation2DServer.map_get_path])"
#: doc/classes/Navigation2DServer.xml doc/classes/NavigationServer.xml
#, fuzzy
@@ -46378,6 +46608,21 @@ msgid ""
"position from this function should be used as the next movement position for "
"the agent's parent Node."
msgstr ""
+"Agent 3D utilisé dans la navigation pour atteindre un emplacement tout en "
+"évitant les obstacles statiques et dynamiques. Les obstacles dynamiques sont "
+"évités en utilisant la méthode RVO (Reciprocal Velocity Obstacles). L'agent "
+"a besoin de données de navigation pour fonctionner correctement. Par défaut "
+"ce nœud s'enregistrera à la carte de navigation par défaut du [World]. Si ce "
+"nœud est un enfant d'un nœud [Navigation] il s'inscrira à la carte de "
+"navigation du nœud de navigation ou la fonction [method set_navigation] peut "
+"être utilisée pour définir le nœud de navigation directement. "
+"[NavigationAgent] est sûr lors du traitement physique.\n"
+"[b]Note :[/b] Après que [method set_target_location] est utilisé, il est "
+"nécessaire d'utiliser la fonction [method get_next_location] une fois par "
+"trame physique pour mettre à jour la logique de chemin interne du "
+"NavigationAgent. La position vectorielle retournée de cette fonction devrait "
+"être utilisée comme position de mouvement suivante pour le Node parent de "
+"l'agent principal."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46385,6 +46630,9 @@ msgid ""
"position. The user must set the target location with [method "
"set_target_location] in order for this to be accurate."
msgstr ""
+"Retourne la distance jusqu'à l'emplacement cible, en utilisant la position "
+"globale de l'agent observé. L'utilisateur doit définir l'emplacement de la "
+"cible avec [method set_target_location] afin d'être précis."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46392,6 +46640,9 @@ msgid ""
"if the navigation path is altered in any way. Because of this, it would be "
"best to check this each frame."
msgstr ""
+"Retourne l'emplacement final accessible dans les coordonnées globales. Cela "
+"peut changer si le chemin de navigation est modifié de quelque manière que "
+"ce soit. Pour cette raison, il serait préférable de vérifier chaque trame."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46404,6 +46655,15 @@ msgid ""
"for the agents movement as this function also updates the internal path "
"logic."
msgstr ""
+"Retourne le chemin actuel de l'agent du début jusqu'à la fin, dans les "
+"coordonnées globales. Le chemin ne met à jour que lorsque l'emplacement de "
+"la cible est modifié ou que l'agent demande un re-calcul du chemin. Le "
+"réseau de chemin n'est pas destiné à être utilisé dans le mouvement de "
+"chemin direct car l'agent a sa propre logique de chemin interne qui serait "
+"corrompu en changeant le réseau de chemin manuellement. Utilisez la [method "
+"get_next_location] voulue une fois chaque trame de physique pour recevoir le "
+"point de chemin suivant pour le mouvement des agents car cette fonction met "
+"également à jour la logique du chemin interne."
#: doc/classes/NavigationAgent.xml
msgid ""
@@ -46416,6 +46676,8 @@ msgid ""
"Returns the [Navigation] node that the agent is using for its navigation "
"system."
msgstr ""
+"Retourne le nœud [Navigation] que l'agent utilise pour son système de "
+"navigation."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46427,6 +46689,14 @@ msgid ""
"the navigation map for the NavigationAgent and also update the agent on the "
"NavigationServer."
msgstr ""
+"Retourne le [RID] de la carte de navigation pour ce nœud NavigationAgent. "
+"Cette fonction retourne toujours la carte définie sur le nœud "
+"NavigationAgent et non la carte de l'agent abstrait sur le serveur "
+"Navigation. Si la carte de l'agent est changée directement avec l'API de "
+"NavigationServer, le nœud NavigationAgent ne sera pas au courant du "
+"changement de carte. Utilisez [method set_navigation_map] pour changer la "
+"carte de navigation pour le NavigationAgent et mettre à jour l'agent sur le "
+"NavigationServer."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46436,6 +46706,12 @@ msgid ""
"use of this function once every physics frame is required to update the "
"internal path logic of the NavigationAgent."
msgstr ""
+"Retourne l'emplacement suivant dans les coordonnées globales qui peuvent "
+"être déplacées, en s'assurant qu'il n'y a pas d'objets statiques dans le "
+"chemin. Si l'agent n'a pas de chemin de navigation, il retourne la position "
+"du parent de l'agent. L'utilisation de cette fonction une fois chaque trame "
+"physique est nécessaire pour mettre à jour la logique de chemin interne de "
+"la NavigationAgent."
#: doc/classes/NavigationAgent.xml
#, fuzzy
@@ -46477,18 +46753,25 @@ msgid ""
"Sets the [Navigation] node used by the agent. Useful when you don't want to "
"make the agent a child of a [Navigation] node."
msgstr ""
+"Définit le nœud [Navigation] utilisé par l'agent. Utile lorsque vous ne "
+"voulez pas faire de l'agent un enfant d'un nœud [Navigation]."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
"Sets the [RID] of the navigation map this NavigationAgent node should use "
"and also updates the [code]agent[/code] on the NavigationServer."
msgstr ""
+"Définit le [RID] de la carte de navigation que ce nœud NavigationAgent "
+"devrait utiliser et met à jour le [code]agent[/code] sur le serveur de "
+"navigation."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
"Sets the user desired final location. This will clear the current navigation "
"path."
msgstr ""
+"Définit l'emplacement final souhaité de l'utilisateur. Cela permettra "
+"d'effacer le chemin de navigation actuel."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46496,6 +46779,9 @@ msgid ""
"adjust the velocity to avoid collisions. Once the adjustment to the velocity "
"is complete, it will emit the [signal velocity_computed] signal."
msgstr ""
+"Envoie la vitesse spécifiée à l'algorithme d'évitement de collision. Celui-"
+"ci ajustera la vitesse pour éviter les collisions. Une fois le réglage de la "
+"vitesse terminée, il émettra le signal [signal velocity_computed]."
#: doc/classes/NavigationAgent.xml
msgid ""
@@ -46506,6 +46792,14 @@ msgid ""
"that the developer baked with appropriate agent radius or height values are "
"required to support different-sized agents."
msgstr ""
+"La hauteur du NavigationAgent est soustraite de la valeur de l'axe Y de "
+"toute position de chemin vectoriel pour ce NavigationAgent. Le décalage de "
+"hauteur du NavigationAgent ne change pas ou n'influence pas le résultat de "
+"la requête du maillage de navigation ou du cheminement. Des cartes de "
+"navigation supplémentaires qui utilisent des régions avec des maillages de "
+"navigation que le développeur a pré-calculé avec un rayon d'agent approprié "
+"ou des valeurs de hauteur sont nécessaires pour supporter des agents de "
+"taille différente."
#: doc/classes/NavigationAgent.xml
msgid ""
@@ -46516,12 +46810,21 @@ msgid ""
"with many registered agents has a significant performance cost and should "
"only be enabled on agents that currently require it."
msgstr ""
+"Si [code]true[/code] l'agent est enregistré pour un rappel d'évitement RVO "
+"sur le [NavigationServer]. Lorsque [method set_velocity] est utilisé et que "
+"le traitement est terminé, un Vector3 [code]safe_velocity[/code] est reçu "
+"avec une connexion du signal [signal velocity_computed]. Le traitement de "
+"l'évitement avec de nombreux agents enregistrés a un coût de performance "
+"important et ne devrait être activé que pour les agents qui en ont "
+"actuellement besoin."
#: doc/classes/NavigationAgent.xml
msgid ""
"Ignores collisions on the Y axis. Must be [code]true[/code] to move on a "
"horizontal plane."
msgstr ""
+"Ignore les collisions sur l'axe Y. Doit être [code]true[/code] pour se "
+"déplacer sur un plan horizontal."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
#, fuzzy
@@ -46539,6 +46842,10 @@ msgid ""
"belongs to. On path requests the agent will ignore navmeshes without at "
"least one matching layer."
msgstr ""
+"Un masque de bit déterminant toutes les calque de carte de navigation "
+"auxquels ce [NavigationAgent] appartient. Lors de requête de chemin, l'agent "
+"va ignorer les maillages de navigation qui n'ont pas au moins un calque "
+"correspondant."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
#, fuzzy
@@ -46555,6 +46862,14 @@ msgid ""
"it will constantly overshoot or undershoot the distance to the next point on "
"each physics frame update."
msgstr ""
+"Le seuil de distance avant qu'un point de chemin soit considéré comme "
+"atteint. Cela permettra à un agent de ne pas avoir à atteindre un point de "
+"chemin exactement sur le chemin, mais uniquement un zone autour. Si cette "
+"valeur est élevée, la NavigationAgent sautera des points sur le chemin qui "
+"peut conduire à quitter le maillage de navigation. Si cette valeur est trop "
+"faible, le NavigationAgent sera coincé dans une boucle de chemin parce qu'il "
+"va constamment mal estimer la distance jusqu'au point suivant à chaque mise "
+"à jour de la trame physique."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46562,6 +46877,9 @@ msgid ""
"final location. This can happen due to trying to avoid collisions. When the "
"maximum distance is exceeded, it recalculates the ideal path."
msgstr ""
+"La distance maximale de l'agent est permise loin du chemin idéal jusqu'à "
+"l'emplacement final. Cela peut arriver en essayant d'éviter les collisions. "
+"Lorsque la distance maximale est dépassée, cela recalcule le chemin idéal."
#: doc/classes/NavigationAgent.xml
msgid ""
@@ -46572,6 +46890,13 @@ msgid ""
"bake [NavigationMesh] resources with a different [member NavigationMesh."
"agent_radius] property and use different navigation maps for each actor size."
msgstr ""
+"Le rayon d'évitement de l'agent. Il s'agit du « corps » de l'agent "
+"d'évitement et non le rayon de la manœuvre d'évitement (qui est contrôlé par "
+"[member neighbor_dist)].\n"
+"N'affecte pas le cheminement normal. Pour changer les ressources "
+"[NavigationMesh] de rayon de pré-calcul de cheminement d'un acteur avec la "
+"propriété [member NavigationMesh.agent_radius] différente et utiliser "
+"différentes cartes de navigation pour chaque acteur."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46582,6 +46907,12 @@ msgid ""
"overshoot or undershoot the distance to the final target point on each "
"physics frame update."
msgstr ""
+"Le seuil de distance avant qu'un point de chemin soit considéré comme "
+"atteint. Cela permettra à un agent de ne pas avoir à atteindre un point de "
+"chemin exactement sur le chemin, mais uniquement un zone autour. Si cette "
+"valeur est trop faible, le NavigationAgent sera coincé dans une boucle de "
+"chemin parce qu'il va constamment mal estimer la distance jusqu'au point "
+"suivant à chaque mise à jour de la trame physique."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46591,6 +46922,11 @@ msgid ""
"other agents, but the less freedom in choosing its velocities. Must be "
"positive."
msgstr ""
+"La quantité minimale de temps pour laquelle les vitesses de cet agent, "
+"calculées avec l'algorithme d'évitement de collision, sont sûres pour les "
+"autres agents. Plus le nombre est élevé, plus tôt l'agent répondra à "
+"d'autres agents, mais moins il aura la liberté de choisir sa vitesse. Ça "
+"doit être positif."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
#, fuzzy
@@ -46602,18 +46938,24 @@ msgid ""
"Notifies when the navigation path changes. This can be triggered by the "
"navigation system or by the user changing the path."
msgstr ""
+"Notifie quand le chemin de navigation change. Cela peut être déclenché par "
+"le système de navigation ou par l'utilisateur qui change le chemin."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
"Notifies when the player-defined target, set with [method "
"set_target_location], is reached."
msgstr ""
+"Notifie quand la cible définie par le joueur, définie avec [method "
+"set_target_location], est atteinte."
#: doc/classes/NavigationAgent.xml doc/classes/NavigationAgent2D.xml
msgid ""
"Notifies when the collision avoidance velocity is calculated after a call to "
"[method set_velocity]."
msgstr ""
+"Notifie quand la vitesse d'évitement de collision est calculée après un "
+"appel à [method set_velocity]."
#: doc/classes/NavigationAgent2D.xml
msgid "2D agent used in navigation for collision avoidance."
@@ -46635,6 +46977,21 @@ msgid ""
"position from this function should be used as the next movement position for "
"the agent's parent Node."
msgstr ""
+"L'agent 2D utilisé dans la navigation pour atteindre un emplacement tout en "
+"évitant les obstacles statiques et dynamiques. Les obstacles dynamiques sont "
+"évités en utilisant l'évitement de collision RVO (Reciprocal Velocity "
+"Obstacles). L'agent a besoin de données de navigation pour fonctionner "
+"correctement. Par défaut ce nœud s'enregistrera à la carte de navigation par "
+"défaut du [World2D]. Si ce nœud est un enfant d'un nœud [Navigation2D] il "
+"s'inscrira à la carte de navigation du nœud de navigation ou la fonction "
+"[method set_navigation] peut être utilisé pour définir le nœud de navigation "
+"directement. [NavigationAgent2D] est sûr lors des trames physiques.\n"
+"[b]Note :[/b] Après que [method set_target_location] est utilisé, il est "
+"nécessaire d'utiliser la fonction [method get_next_location] une fois chaque "
+"trame physique pour mettre à jour la logique interne de chemin du "
+"NavigationAgent. La position vectorielle retournée de cette fonction devrait "
+"être utilisée comme position de mouvement suivante pour le Node parent de "
+"l'agent principal."
#: doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46647,6 +47004,8 @@ msgid ""
"Returns the [Navigation2D] node that the agent is using for its navigation "
"system."
msgstr ""
+"Retourne le nœud [Navigation2D] que l'agent utilise pour son système de "
+"navigation."
#: doc/classes/NavigationAgent2D.xml
#, fuzzy
@@ -46658,6 +47017,8 @@ msgid ""
"Sets the [Navigation2D] node used by the agent. Useful when you don't want "
"to make the agent a child of a [Navigation2D] node."
msgstr ""
+"Définit le nœud [Navigation2D] utilisé par l'agent. Utile lorsque vous ne "
+"voulez pas faire de l'agent un enfant d'un nœud [Navigation2D]."
#: doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46668,6 +47029,13 @@ msgid ""
"with many registered agents has a significant performance cost and should "
"only be enabled on agents that currently require it."
msgstr ""
+"Si [code]true[/code] l'agent est enregistré pour un rappel d'évitement RVO "
+"sur le [Navigation2DServer]. Lorsque [method set_velocity] est utilisé et "
+"que le traitement est terminé, un Vector2 [code]safe_velocity[/code] est "
+"reçu avec une connexion au signal [signal velocity_computed]. Le traitement "
+"de l'évitement avec de nombreux agents enregistrés a un coût de performance "
+"important et ne devrait être activé que pour les agents qui en ont "
+"actuellement besoin."
#: doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46675,6 +47043,10 @@ msgid ""
"belongs to. On path requests the agent will ignore navmeshes without at "
"least one matching layer."
msgstr ""
+"Un masque de bit déterminant toutes les calque de carte de navigation "
+"auxquels ce [NavigationAgent2D] appartient. Lors de requête de chemin, "
+"l'agent va ignorer les maillages de navigation qui n'ont pas au moins un "
+"calque correspondant."
#: doc/classes/NavigationAgent2D.xml
msgid ""
@@ -46683,6 +47055,10 @@ msgid ""
"[member neighbor_dist]).\n"
"Does not affect normal pathfinding."
msgstr ""
+"Le rayon d'évitement de l'agent. Il s'agit du « corps » de l'agent "
+"d'évitement et non le rayon de la manœuvre d'évitement (qui est contrôlé par "
+"[member neighbor_dist)].\n"
+"N'affecte pas le cheminement normal."
#: doc/classes/NavigationMesh.xml
msgid "A mesh to approximate the walkable areas and obstacles."
@@ -46852,12 +47228,17 @@ msgid ""
"Only used when [member geometry_parsed_geometry_type] is [constant "
"PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]."
msgstr ""
+"Les calques de physique pour scanner les collisions statiques.\n"
+"Seulement utilisé quand [member geometry_parsed_geometry_type] est [constant "
+"PARSED_GEOMETRY_STATIC_COLLIDERS] ou [constant] PARSED_GEOMETRY_BOTH]."
#: doc/classes/NavigationMesh.xml
msgid ""
"Determines which type of nodes will be parsed as geometry. See [enum "
"ParsedGeometryType] for possible values."
msgstr ""
+"Détermine quel type de nœuds seront interprétés comme géométrie. Voir [enum "
+"ParsedGeometryType] pour les valeurs possibles."
#: doc/classes/NavigationMesh.xml
msgid ""
@@ -46872,12 +47253,18 @@ msgid ""
"SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant "
"SOURCE_GEOMETRY_GROUPS_EXPLICIT]."
msgstr ""
+"Le nom du groupe pour scanner la géométrie.\n"
+"Seulement utilisé lorsque [member geometry_source_geometry_mode] est "
+"[constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] ou [constant] "
+"SOURCE_GEOMETRY_GROUPS_EXPLICIT]."
#: doc/classes/NavigationMesh.xml
msgid ""
"The maximum number of vertices allowed for polygons generated during the "
"contour to polygon conversion process."
msgstr ""
+"Le nombre maximal de sommets permis pour les polygones générés pendant le "
+"contour du processus de conversion en polygones."
#: doc/classes/NavigationMesh.xml
msgid ""
@@ -46886,6 +47273,10 @@ msgid ""
"[b]Note:[/b] This value will be squared to calculate the number of cells. "
"For example, a value of 20 will set the number of cells to 400."
msgstr ""
+"Toutes les régions ayant une taille inférieure à celle-ci seront fusionnées "
+"avec des régions plus grandes si possible.\n"
+"[b]Note :[/b] Cette valeur sera carrée pour calculer le nombre de cellules. "
+"Par exemple, une valeur de 20 définira le nombre de cellules à 400."
#: doc/classes/NavigationMesh.xml
msgid ""
@@ -46894,12 +47285,18 @@ msgid ""
"cells allowed to form isolated island areas. For example, a value of 8 will "
"set the number of cells to 64."
msgstr ""
+"La taille minimale d'une région pour qu'elle soit créée.\n"
+"[b]Note :[/b] Cette valeur sera fixée pour calculer le nombre minimum de "
+"cellules autorisées à former des zones insulaires isolées. Par exemple, une "
+"valeur de 8 définira le nombre de cellules à 64."
#: doc/classes/NavigationMesh.xml
msgid ""
"Partitioning algorithm for creating the navigation mesh polys. See [enum "
"SamplePartitionType] for possible values."
msgstr ""
+"Algorithme de partitionnement pour la création des polygones de maillage de "
+"navigation. Voir [enum SamplePartitionType] pour les valeurs possibles."
#: doc/classes/NavigationMesh.xml
msgid ""
@@ -46911,12 +47308,16 @@ msgstr ""
msgid ""
"Monotone partitioning. Use this if you want fast navigation mesh generation."
msgstr ""
+"Partage monotone. Utilisez ceci si vous voulez une génération de maillages "
+"de navigation rapide."
#: doc/classes/NavigationMesh.xml
msgid ""
"Layer partitioning. Good choice to use for tiled navigation mesh with medium "
"and small sized tiles."
msgstr ""
+"Le partitionnement du calque. Un bon choix à utiliser pour la maillage de "
+"navigation en carreaux de taille moyenne et petite."
#: doc/classes/NavigationMesh.xml
msgid "Represents the size of the [enum SamplePartitionType] enum."
@@ -46935,6 +47336,9 @@ msgid ""
"Parses [StaticBody] colliders as geometry. The collider should be in any of "
"the layers specified by [member geometry_collision_mask]."
msgstr ""
+"Interprète l'élément de collision [StaticBody] comme géométrie. Cet élément "
+"doit être dans l'un des calques spécifiés par [member "
+"geometry_collision_mask]."
#: doc/classes/NavigationMesh.xml
msgid ""
@@ -46952,18 +47356,24 @@ msgstr "Représente la taille de l’enum [enum ParsedGeometryType]."
msgid ""
"Scans the child nodes of [NavigationMeshInstance] recursively for geometry."
msgstr ""
+"Scanne les nœuds d'enfants de [NavigationMeshInstance] récursivement pour la "
+"géométrie."
#: doc/classes/NavigationMesh.xml
msgid ""
"Scans nodes in a group and their child nodes recursively for geometry. The "
"group is specified by [member geometry_source_group_name]."
msgstr ""
+"Scanne les nœuds dans un groupe et leurs nœuds enfants récursivement pour la "
+"géométrie. Le groupe est spécifié par [member geometry_source_group_name]."
#: doc/classes/NavigationMesh.xml
msgid ""
"Uses nodes in a group for geometry. The group is specified by [member "
"geometry_source_group_name]."
msgstr ""
+"Utilise des nœuds dans un groupe de géométrie. Le groupe est spécifié par "
+"[member geometry_source_group_name]."
#: doc/classes/NavigationMesh.xml
msgid "Represents the size of the [enum SourceGeometryMode] enum."
@@ -46972,6 +47382,7 @@ msgstr "Représente la taille de l'énumération [enum SourceGeometryMode]."
#: doc/classes/NavigationMeshGenerator.xml
msgid "Helper class for creating and clearing navigation meshes."
msgstr ""
+"Classe d'aide pour la création et la suppression des maillages de navigation."
#: doc/classes/NavigationMeshGenerator.xml
msgid ""
@@ -47014,6 +47425,52 @@ msgid ""
"inside, the baking will generate navigation mesh areas that are inside the "
"obstructing source geometry mesh."
msgstr ""
+"Cette classe est responsable de la création et du la suppression des "
+"maillages de navigation 3D utilisés comme [NavigationMesh] ressources à "
+"l'intérieur des [NavigationMeshInstance]. Le [NavigationMeshGenerator] est "
+"très limité voire n'a aucune utilisation pour 2D car le processus de "
+"navigation de pré-calcule de maillages s'attend à des types de nœuds 3D et "
+"la géométrie source en 3D.\n"
+"L'ensemble du pré-calcule de maillages de navigation est préférable dans un "
+"autre fil d'exécution puisque les étapes de voxelisation, de collision et "
+"d'optimisation de maillages impliquées sont des opérations, sont très "
+"couteuses en temps processeur.\n"
+"Le pré-calcule de maillage de navigation se produit en plusieurs étapes et "
+"le résultat dépend de la géométrie source 3D et des propriétés de la "
+"ressource [NavigationMesh]. Dans la première étape, à partir d'un nœud "
+"racine et selon les propriétés [NavigationMesh], tous les nœuds de géométrie "
+"de source 3D valides sont collectés à partir du [SceneTree]. Deuxièmement, "
+"tous les nœuds collectés sont interprétés pour obtenir les données de "
+"géométrie 3D pertinentes et un maillage 3D combiné est construit. En raison "
+"des différents types d'objets à interpréter, des [MeshInstance] normaux aux "
+"[CSGShape] ou divers [CollisionObject], certaines opérations de collecte de "
+"données de géométrie peuvent déclencher des synchronisations du "
+"[VisualServer] et du [PhysicsServer]. La synchronisation du serveur peut "
+"avoir un effet négatif sur le temps de pré-calcule car elle implique souvent "
+"le verrouillage de [Mutex] dans le fil d'exécution. De nombreux objets à "
+"interpréter et de nombreuses synchronisations des serveurs peuvent augmenter "
+"considérablement le temps de pré-calcule. D'un autre côté, seulement "
+"quelques objets, mais très grands et complexes, prendront du temps de "
+"préparation des serveurs ce qui peuvent bloquer le rendu suivant. De règle "
+"générale, la quantité totale d'objets à interpréter, leur taille et leur "
+"complexité individuelles devraient être équilibrées pour éviter les "
+"problèmes de fluidité ou des temps de pré-calcule très longs. Le maillage "
+"combiné est ensuite transmis à l'Object Recast Navigation pour tester la "
+"géométrie source pour le terrain à parcourir adapté aux propriétés des "
+"agents [NavigationMesh] en créant un monde de voxel autour de la zone de "
+"maillage.\n"
+"Le maillage de navigation finalisé est ensuite retourné et enregistré à "
+"l'intérieur du [NavigationMesh] pour être utilisé comme ressource à "
+"l'intérieur des nœuds [NavigationMeshInstance].\n"
+"[b]Note :[/b] L'utilisation de maillages ne définissen pas seulement les "
+"surfaces à parcourir mais peut aussi empêcher le pré-calcul de fonctionner. "
+"La navigation n'a pas de concept de ce qu'est une géométrie \"à "
+"l'intérieur\" quand on traite de la géométrie de source de maillage et c'est "
+"intentionnel. Selon les paramètres de pré-calcule actuels, dès que le "
+"maillage obstructif est assez grande pour s'adapter à une zone de maillage "
+"de navigation à l'intérieur, le pré-calcule générera des zones de maillage "
+"de navigation qui sont à l'intérieur du maillage de géométrie de source "
+"obstructif."
#: doc/classes/NavigationMeshGenerator.xml
msgid ""
@@ -47024,6 +47481,12 @@ msgid ""
"NavigationMesh.geometry_source_geometry_mode] properties on the "
"[NavigationMesh] resource."
msgstr ""
+"Pré-calcule les données de navigation du [code]nav_mesh[/code] donné en "
+"interprétant les nœuds enfants dans le [code]root_node[/code] spécifié ou un "
+"groupe spécifique de nœuds pour la géométrie de source potentielle. Le "
+"comportement d'interprétation peut être contrôlé avec les propriétés [member "
+"NavigationMesh.geometry_parsed_geometry_type] et [member NavigationMesh."
+"geometry_source_geometry_mode] de la ressource [NavigationMesh]."
#: doc/classes/NavigationMeshGenerator.xml
#, fuzzy
@@ -47037,6 +47500,7 @@ msgid "An instance of a [NavigationMesh]."
msgstr "Une instance de [NavigationMesh]."
#: doc/classes/NavigationMeshInstance.xml
+#, fuzzy
msgid ""
"An instance of a [NavigationMesh]. It tells the [Navigation] node what can "
"be navigated and what cannot, based on the [NavigationMesh] resource.\n"
@@ -47050,11 +47514,29 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
msgstr ""
+"Une instance de [NavigationMesh]. Il signale au nœud [Navigation] ce qui "
+"peut être navigué et ce qui ne peut pas, basé sur la ressource "
+"[NavigationMesh].\n"
+"Par défaut ce nœud s'enregistrera à la carte de navigation du [World] par "
+"défaut. Si ce nœud est un enfant d'un nœud [Navigation], il s'inscrira à la "
+"carte de navigation du nœud de navigation.\n"
+"Deux régions peuvent être reliées l'une à l'autre si elles partagent un même "
+"bord. Vous pouvez définir la distance minimale entre deux sommets "
+"nécessaires pour connecter deux bords en utilisant [method NavigationServer."
+"map_set_edge_connection_margin]\n"
+"[b]Note :[/b] Le chevauchement de deux régions n'est pas suffisant pour "
+"relier deux régions. Ils doivent partager un même bord.\n"
+"Le coût d'entrée dans cette région d'une autre région peut être contrôlé "
+"avec la valeur [member enter_cost].\n"
+"[b]Note : [/b] Cette valeur n'est pas ajoutée au coût du chemin lorsque la "
+"position de départ est déjà dans cette région.\n"
+"Le coût des distances de voyage dans cette région peut être contrôlé avec le "
+"multiplicateur [member travel_cost]."
#: doc/classes/NavigationMeshInstance.xml
msgid ""
@@ -47300,6 +47782,7 @@ msgid "A region of the 2D navigation map."
msgstr "Prépare le maillage de navigation."
#: doc/classes/NavigationPolygonInstance.xml
+#, fuzzy
msgid ""
"A region of the navigation map. It tells the [Navigation2DServer] what can "
"be navigated and what cannot, based on its [NavigationPolygon] resource.\n"
@@ -47313,11 +47796,29 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
msgstr ""
+"Une instance de [NavigationMesh]. Il signale au nœud [Navigation] ce qui "
+"peut être navigué et ce qui ne peut pas, basé sur la ressource "
+"[NavigationMesh].\n"
+"Par défaut ce nœud s'enregistrera à la carte de navigation du [World] par "
+"défaut. Si ce nœud est un enfant d'un nœud [Navigation], il s'inscrira à la "
+"carte de navigation du nœud de navigation.\n"
+"Deux régions peuvent être reliées l'une à l'autre si elles partagent un même "
+"bord. Vous pouvez définir la distance minimale entre deux sommets "
+"nécessaires pour connecter deux bords en utilisant [method NavigationServer."
+"map_set_edge_connection_margin]\n"
+"[b]Note :[/b] Le chevauchement de deux régions n'est pas suffisant pour "
+"relier deux régions. Ils doivent partager un même bord.\n"
+"Le coût d'entrée dans cette région d'une autre région peut être contrôlé "
+"avec la valeur [member enter_cost].\n"
+"[b]Note : [/b] Cette valeur n'est pas ajoutée au coût du chemin lorsque la "
+"position de départ est déjà dans cette région.\n"
+"Le coût des distances de voyage dans cette région peut être contrôlé avec le "
+"multiplicateur [member travel_cost]."
#: doc/classes/NavigationPolygonInstance.xml
msgid ""
@@ -47456,6 +47957,54 @@ msgstr ""
msgid "Control activation of this server."
msgstr "Contrôle l'activation de ce serveur."
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr "Retourne l'état actuel de la connexion. Voir [enum ConnexionStatus]."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "Définit la texture de lumière à utiliser pour cette instance."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -47476,6 +48025,18 @@ msgid ""
"the server port in UDP. You can use the [UPNP] class to try to forward the "
"server port automatically when starting the server."
msgstr ""
+"Une implémentation de PacketPeer qui devrait être passée au [member "
+"SceneTree.network_peer] après avoir été initialisé en tant que client ou "
+"serveur. Les événements peuvent ensuite être gérés en se connectant aux "
+"signaux de [SceneTree].\n"
+"L'intêret de ENet est de fournir un calque de communication à travers le "
+"réseau relativement léger, simple et robuste par dessus UDP (User Datagram "
+"Protocol).\n"
+"[b]Note :[/b] ENet utilise seulement UDP, et non TCP. Lors du branchement du "
+"port serveur pour rendre votre serveur accessible sur internet, vous n'avez "
+"besoin que d'envoyer le port serveur en UDP. Vous pouvez utiliser la classe "
+"[UPNP] pour essayer d'envoyer automatiquement le port serveur dès le "
+"démarrage du serveur."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47484,6 +48045,10 @@ msgid ""
"disconnecting them. If this is a client it simply closes the connection to "
"the server."
msgstr ""
+"Ferme la connexion. Ignoré si aucune connexion n'est actuellement établie. "
+"Si c'est un serveur, il essaie de notifier tous les clients avant de les "
+"déconnecter de force. Si c'est un client, il ferme simplement la connexion "
+"au serveur."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47506,6 +48071,25 @@ msgid ""
"code] is specified, the client will also listen to the given port; this is "
"useful for some NAT traversal techniques."
msgstr ""
+"Créer un client qui se connecte au serveur à [code]address[/code] donnée via "
+"le [code]port[/code]. L'adresse donnée doit être soit un nom de domaine "
+"entièrement qualifié (ex.: [code]\"www.example.com\"[/code]) ou une adresse "
+"IP en format IPv4 ou IPv6 (par exemple [code]\"192.168.1.1\"[/code)]. Le "
+"[code]port[/code] est le port que le serveur écoute. Les paramètres "
+"[code]in_bandwidth[/code] et [code]out_bandwidth[/code] peuvent être "
+"utilisés pour limiter la bande passante entrante et sortante, en octets par "
+"seconde. Le défaut de 0 signifie que la bande passante ne sera pas limitée. "
+"Notez que ENet ignorera stratégiquement des paquets d'une connexion entre "
+"pairs pour s'assurer que la bande passante par les pairs n'est pas dépassée. "
+"Les paramètres de bande passante déterminent également la taille de la "
+"fenêtre d'une connexion qui limite la quantité de paquets fiables qui "
+"peuvent être envoyés à tout moment donné. Retourne [constant OK] si un "
+"client a été créé, [constant ERR_ALREADY_IN_USE] si ce "
+"NetworkedMultiplayerENet a déjà une connexion ouverte (dans quel cas vous "
+"devez appeler [method close_connection] d'abord) ou [constant "
+"ERR_CANT_CREATE] si le client ne peut pas être créé. Si [code]client_port[/"
+"code] est spécifié, le client écoutera également le port donné ; ceci est "
+"utile pour certaines techniques NAT transversale."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47524,12 +48108,29 @@ msgid ""
"case you need to call [method close_connection] first) or [constant "
"ERR_CANT_CREATE] if the server could not be created."
msgstr ""
+"Créer un serveur qui écoute les connexions via [code]port[/code]. Le port "
+"doit être un port disponible et inutilisé entre 0 et 65535. Notez que les "
+"ports inférieurs à 1024 sont réservés et peuvent nécessiter des "
+"autorisations élevées en fonction de la plateforme. Pour modifier "
+"l'interface que le serveur écoute, utilisez [method set_bind_ip]. L'IP par "
+"défaut est le joker [code]\"*\"[/code], qui écoute toutes les interfaces "
+"disponibles. [code]max_clients[/code] est le nombre maximum de clients "
+"autorisés en même temps, tout nombre jusqu'à 4095 peut être utilisé, même si "
+"le nombre possible de clients simultanés peut être beaucoup plus faible et "
+"dépend de l'application. Pour plus de détails sur les paramètres de bande "
+"passante, voir [method create_client]. Retourne [constant OK] si un serveur "
+"a été créé, [constant ERR_ALREADY_IN_USE] si ce NetworkedMultiplayerENet a "
+"déjà une connexion ouverte (dans quel cas vous devez appeler [method "
+"close_connection] d'abord) ou [constant ERR_CANT_CREATE] si le serveur ne "
+"peut pas être créé."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"Disconnect the given peer. If \"now\" is set to [code]true[/code], the "
"connection will be closed immediately without flushing queued messages."
msgstr ""
+"Déconnecte le pair donné. Si \"maintenant\" est [code]true[/code], la "
+"connexion sera fermée immédiatement sans envoyer les messages en attente."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47544,6 +48145,8 @@ msgid ""
"Returns the channel of the next packet that will be retrieved via [method "
"PacketPeer.get_packet]."
msgstr ""
+"Retourne le canal du prochain paquet qui sera récupéré via [method "
+"PacketPeer.get_packet]"
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
#: modules/websocket/doc_classes/WebSocketServer.xml
@@ -47562,6 +48165,10 @@ msgid ""
"needs to be in IPv4 or IPv6 address format, for example: "
"[code]\"192.168.1.1\"[/code]."
msgstr ""
+"L'adresse IP utilisée lors de la création d'un serveur. Ceci est défini le "
+"joker [code]\"*\"[/code] par défaut, qui se connecte à toutes les interfaces "
+"disponibles. L'adresse donnée doit être au format IPv4 ou IPv6, par "
+"exemple : [code]\"192.168.1.1\"[/code]."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47569,6 +48176,9 @@ msgid ""
"code]. For servers, you must also setup the [CryptoKey] via [method "
"set_dtls_key]."
msgstr ""
+"Configure le [X509Certificate] à utiliser lorsque [member use_dtls] est "
+"[code]true[/code]. Pour les serveurs, vous devez également configurer le "
+"[CryptoKey] via [method set_dtls_key]."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47576,6 +48186,9 @@ msgid ""
"code]. Remember to also call [method set_dtls_certificate] to setup your "
"[X509Certificate]."
msgstr ""
+"Configure la [CryptoKey] à utiliser lorsque [member use_dtls] est "
+"[code]true[/code]. N'oubliez pas d'appeler [method set_dtls_certificate] "
+"pour configurer votre [X509Certificate]."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47590,6 +48203,17 @@ msgid ""
"other hand, defines a fixed timeout for which any packet must be "
"acknowledged or the peer will be dropped."
msgstr ""
+"Définit les paramètres de limite de temps pour un pair. Les paramètres de "
+"limite de temps contrôlent comment et quand un pair estimera que le traffic "
+"n'est pas assez fiable. Les valeurs de limite de temps sont exprimées en "
+"millisecondes.\n"
+"La [code]timeout_limit[/code] est un facteur qui, multiplié par une valeur "
+"basée sur le temps d'envoi moyen, déterminera la limite de temps pour un "
+"paquet fiable. Lorsque cette limite est atteinte, la limite de temps sera "
+"doublée, et le pair sera déconnecté si cette limite atteint "
+"[code]timeout_min[/code]. Le paramètre [code]timeout_max[/code], d'autre "
+"part, définit une limite de temps fixe pour lequel tout paquet doit estimé "
+"comme fiable, ou alors le pair sera supprimé."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47598,6 +48222,11 @@ msgid ""
"NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE_ORDERED]). This is the "
"only way to use ordering with the RPC system."
msgstr ""
+"Force le tri des paquets lors de l'utilisation de [constant "
+"NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE] (ce qui se comporte de la "
+"même manière [constant NetworkedMultiplayerPeer."
+"TRANSFER_MODE_UNRELIABLE_ORDERED]). C'est le seul moyen d'utiliser le tri "
+"avec un système RPC."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47608,6 +48237,12 @@ msgid ""
"status of a packet in one channel won't stall the delivery of other packets "
"in another channel."
msgstr ""
+"Le nombre de canaux à utiliser par ENet. Les canaux sont utilisés pour "
+"séparer différents types de données. En mode fiable ou ordonné, par exemple, "
+"l'ordre d'envoi des paquets est assuré sur une base par canal. Ceci est fait "
+"pour lutter contre la latence et réduit les restrictions d'ordre sur les "
+"paquets. L'état d'envoi d'un paquet d'un canal a été décalé dans l'envoi "
+"d'autres paquets dans un autre canal."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47624,6 +48259,21 @@ msgid ""
"COMPRESS_NONE]. Nonetheless, mixing engine versions between clients and "
"server is not recommended and not officially supported."
msgstr ""
+"La méthode de compression utilisée pour les paquets réseau. Ceux-ci ont "
+"différents compromis de vitesse de compression par rapport à la bande "
+"passante, vous pouvez avoir besoin quelle méthode fonctionne le mieux pour "
+"votre cas d'utilisation si vous utilisez la compression pour tout.\n"
+"[b]Note :[/b] La conception réseau de la plupart des jeux nécessite l'envoi "
+"de nombreux petits paquets fréquemment (moins de 4 KB chacun). Dans le "
+"doute, il est recommandé de garder l'algorithme de compression par défaut "
+"car il fonctionne le mieux avec ces petits paquets.\n"
+"[b]Note :[/b] [member compression_mode] doit être défini à la même valeur "
+"sur le serveur et sur tous ses clients. Les clients ne se connecteront pas "
+"si le [member compression_mode] d'un client diffère de celui du serveur. "
+"Avant Godot 3.4, la valeur par défaut de [member compression_mode] était "
+"[constant COMPRESS_NONE]. Néanmoins, il n'est pas recommandé, ni "
+"officiellement supporté, d'utiliser différentes versions du moteur entre les "
+"clients et le serveur."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47632,6 +48282,10 @@ msgid ""
"When set to an empty string, the [code]address[/code] parameter passed to "
"[method create_client] is used instead."
msgstr ""
+"Le nom d'hôte utilisé pour la vérification DTLS, à comparer à la valeur « CN "
+"» du certificat fourni par le serveur.\n"
+"Si la chaîne est vide, le paramètre [code]address[/code] passé à [method "
+"create_client] est utilisé à la place."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
#, fuzzy
@@ -47649,6 +48303,11 @@ msgid ""
"is [code]false[/code], clients won't be automatically notified of other "
"peers and won't be able to send them packets through the server."
msgstr ""
+"Activer ou désactiver la fonction serveur qui notifie les clients de la "
+"connexion/déconnection des autres pairs enregistrés, et relaye les messages "
+"entre eux. Lorsque cette option est [code]false[/code], les clients ont "
+"obtenu la notification automatique d'autres pairs et ont obtenu la "
+"possibilité de les envoyer par le serveur."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47660,6 +48319,14 @@ msgid ""
"that channel for sending data. See [member channel_count] for more "
"information about ENet channels."
msgstr ""
+"Définit le canal par défaut à utiliser pour transférer les données. Par "
+"défaut, cette valeur est [code]-1[/code] ce qui signifie que ENet "
+"n'utilisera que 2 canaux : un pour les paquets fiables, et un pour les "
+"paquets non fiables. Le canal [code]0[/code] est réservé et ne peut pas être "
+"utilisé. Définit cette propriété à n'importe quelle valeur entre [code]0[/"
+"code] et [member channel_count] (exclus) forcera ENet à utiliser ce canal "
+"pour envoyer les données. Voir [member channel_count] pour plus "
+"d'informations sur les canaux ENet."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47673,6 +48340,16 @@ msgid ""
"dtls_verify] option, and configure the certificate accordingly via [method "
"set_dtls_certificate]."
msgstr ""
+"Quand activé, le client ou le serveur créé par ce pair utilisera "
+"[PacketPeerDTLS] au lieu des sockets UDP bruts pour communiquer avec le pair "
+"distant. Cela permettra de chiffrer la communication avec DTLS avec une "
+"utilisation plus importante des ressources mais aussi peut-être de la taille "
+"des paquets.\n"
+"[b]Note :[/b] Lors de la création d'un serveur DTLS, assurez-vous de "
+"configurer à la fois la clé et le certificat avec [method set_dtls_key] et "
+"[method set_dtls_certificate]. Pour les clients DTLS, regardez l'option "
+"[member dtls_verify] et configurez le certificat en conséquence avec [method "
+"set_dtls_certificate]."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47680,12 +48357,17 @@ msgid ""
"requiring the fewest CPU resources. This option may also be used to make "
"network debugging using tools like Wireshark easier."
msgstr ""
+"Aucune compression. Cela utilise le plus de bande passante, mais moins de "
+"ressource du CPU. Cette option peut également être utilisée pour faciliter "
+"le débogage du réseau en utilisant des outils comme Wireshark."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"ENet's built-in range encoding. Works well on small packets, but is not the "
"most efficient algorithm on packets larger than 4 KB."
msgstr ""
+"L'encodage intégré d'ENet. Fonctionne bien sur les petits paquets, mais "
+"n'est pas l'algorithme le plus efficace pour les paquets de plus de 4 KB."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47693,6 +48375,9 @@ msgid ""
"resources compared to [constant COMPRESS_ZLIB], at the expense of using more "
"bandwidth."
msgstr ""
+"L'algorithme de compression [url=http://fastlz.org/]FastLZ[/url]. Cette "
+"option utilise moins de ressources CPU par rapport à [constant "
+"COMPRESS_ZLIB] mais utilise plus de bande passante."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
@@ -47702,6 +48387,11 @@ msgid ""
"packets smaller than 4 KB. Therefore, it's recommended to use other "
"compression algorithms in most cases."
msgstr ""
+"L'algorithme de compression [url=https://www.zlib.net/]Zlib[/url]. Cette "
+"option utilise moins de bande passante par rapport à [constant "
+"COMPRESS_FASTLZ] mais utilise plus le CPU. Notez que cet algorithme n'est "
+"pas très efficace pour les paquets de moins de 4 KB. Il est donc souvent "
+"recommandé d'utiliser d'autres algorithmes de compression."
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid "[url=https://facebook.github.io/zstd/]Zstandard[/url] compression."
@@ -47721,6 +48411,11 @@ msgid ""
"detail and isn't meant to be used by non-Godot servers. It may change "
"without notice."
msgstr ""
+"Gère la connexion aux pairs du réseau. Attribue des identifiants uniques à "
+"chaque client connecté au serveur. Voir aussi [MultiplayerAPI].\n"
+"[b]Note :[/b] Le protocole de l'API multijoueur de haut niveau dépend de son "
+"implémentation et n'est pas destiné à être utilisé par des serveurs en "
+"dehors de Godot. Ce protocole peut changer dans une future version."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid "High-level multiplayer"
@@ -47728,7 +48423,7 @@ msgstr "API multijoueur de haut niveau"
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid "WebRTC Signaling Demo"
-msgstr ""
+msgstr "Démo des signaux WebRTC"
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid ""
@@ -47760,6 +48455,13 @@ msgid ""
"peer ID to send to all peers except that one. By default, the target peer is "
"[constant TARGET_PEER_BROADCAST]."
msgstr ""
+"Définit le pair auquel les paquets seront envoyés.\n"
+"L'identifiant [code]id[/code] peut être : [constant TARGET_PEER_BROADCAST] "
+"pour envoyer à tous les pairs connectés, [constant TARGET_PEER_SERVER] pour "
+"envoyer au pair agissant en tant que serveur, un identifiant de pairs valide "
+"pour envoyer à ce pair spécifique, ou un identifiant négatif pour envoyer à "
+"tous les pairs sauf celui-ci. Par défaut, le pair cible est [constant "
+"TARGET_PEER_BROADCAST]."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid ""
@@ -47774,6 +48476,8 @@ msgid ""
"The manner in which to send packets to the [code]target_peer[/code]. See "
"[enum TransferMode]."
msgstr ""
+"La manière d'envoyer des paquets au [code]target_peer[/code]. Voir [enum "
+"TransferMode]."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid "Emitted when a connection attempt fails."
@@ -47802,6 +48506,11 @@ msgid ""
"TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always "
"consider whether the order matters."
msgstr ""
+"Les paquets ne sont pas reconnus, aucune tentative de ré-envoi n'est faite "
+"pour les paquets perdus. Les paquets peuvent arriver dans n'importe quelle "
+"commande. Peut être plus rapide que [constant "
+"TRANSFER_MODE_UNRELIABLE_ORDERED]. À utiliser pour des données non "
+"critiques, et toujours à considérer si l'ordre compte."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid ""
@@ -47811,6 +48520,12 @@ msgid ""
"would be outdated if received late due to resend attempt(s) anyway, for "
"example movement and positional data."
msgstr ""
+"Les paquets ne sont pas reconnus, aucune tentative de ré-envoi n'est faite "
+"pour les paquets perdus. Les paquets sont reçus dans l'ordre où ils ont été "
+"envoyés. Peut être plus rapide que [constant TRANSFER_MODE_RELIABLE]. À "
+"utiliser pour les données non critiques ou qui seraient périmées si elles "
+"étaient reçues tardivement à cause du ré-envoi, par exemple pour les données "
+"de mouvement et de positionnement."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid ""
@@ -47821,6 +48536,14 @@ msgid ""
"order, for example an ability being triggered or a chat message. Consider "
"carefully if the information really is critical, and use sparingly."
msgstr ""
+"Les paquets doivent être reçus et les tentatives de ré-envoi doivent être "
+"faites jusqu'à ce que les paquets soient reconnus. Les paquets doivent être "
+"reçus dans l'ordre où ils ont été envoyés. C'est le mode de transfert le "
+"plus fiable, mais potentiellement le plus lent en cause de la surcharge. À "
+"utiliser pour les données critiques qui doivent être transmises et arriver "
+"en ordre, par exemple un élément activé ou un message de discussion. À "
+"considérez soigneusement si l'information est vraiment critique, et à "
+"utiliser avec parcimonie."
#: doc/classes/NetworkedMultiplayerPeer.xml
msgid "The ongoing connection disconnected."
@@ -47862,30 +48585,40 @@ msgid ""
"Returns the size of the margin identified by the given [enum Margin] "
"constant."
msgstr ""
+"Retourne la taille de la marge identifiée par la constante [enum Margin] "
+"donnée."
#: doc/classes/NinePatchRect.xml
msgid ""
"Sets the size of the margin identified by the given [enum Margin] constant "
"to [code]value[/code] in pixels."
msgstr ""
+"Définit la taille de la marge identifiée par la constante [enum Margin] "
+"donnée à [code]value[/code] en pixels."
#: doc/classes/NinePatchRect.xml
msgid ""
"The stretch mode to use for horizontal stretching/tiling. See [enum "
"NinePatchRect.AxisStretchMode] for possible values."
msgstr ""
+"Le mode d'étirement à utiliser pour l'étirement horizontal. Voir [enum "
+"NinePatchRect.AxisStretchMode] pour les valeurs possibles."
#: doc/classes/NinePatchRect.xml
msgid ""
"The stretch mode to use for vertical stretching/tiling. See [enum "
"NinePatchRect.AxisStretchMode] for possible values."
msgstr ""
+"Le mode d'étirement à utiliser pour l'étirement vertical. Voir [enum "
+"NinePatchRect.AxisStretchMode] pour les valeurs possibles."
#: doc/classes/NinePatchRect.xml
msgid ""
"If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's "
"borders."
msgstr ""
+"Si [code]true[/code], dessine le centre du panneau. Sinon, ne dessine que "
+"les bordures des 9 parties."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47893,6 +48626,10 @@ msgid ""
"bottom corners and side will have a height of 16 pixels. You can set all 4 "
"margin values individually to create panels with non-uniform borders."
msgstr ""
+"La hauteur de la ligne du bas des 9 parties. Une marge de 16 signifie que "
+"les angles du bas des 9 parties et les côtés auront une hauteur de 16 "
+"pixels. Vous pouvez définir les 4 valeurs de marge individuellement pour "
+"créer des panneaux avec des bordures non uniformes."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47900,6 +48637,10 @@ msgid ""
"left corners and side will have a width of 16 pixels. You can set all 4 "
"margin values individually to create panels with non-uniform borders."
msgstr ""
+"La largeur de la colonne gauche des 9 parties. Une marge de 16 signifie que "
+"les angles de gauche des 9 parties et les côtés auront une largeur de 16 "
+"pixels. Vous pouvez définir les 4 valeurs de marge individuellement pour "
+"créer des panneaux avec des bordures non uniformes."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47907,6 +48648,10 @@ msgid ""
"right corners and side will have a width of 16 pixels. You can set all 4 "
"margin values individually to create panels with non-uniform borders."
msgstr ""
+"La largeur de la colonne droite de 9 parties. Une marge de 16 signifie que "
+"les angles de droite des 9 parties et le côté auront une largeur de 16 "
+"pixels. Vous pouvez définir les 4 valeurs de marge individuellement pour "
+"créer des panneaux avec des bordures non uniformes."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47914,6 +48659,10 @@ msgid ""
"corners and side will have a height of 16 pixels. You can set all 4 margin "
"values individually to create panels with non-uniform borders."
msgstr ""
+"La hauteur de la ligne du haut de 9 parties. Une marge de 16 signifie que "
+"les angles du haut des 9 parties et le côté auront une hauteur de 16 pixels. "
+"Vous pouvez définir les 4 valeurs de marge individuellement pour créer des "
+"panneaux avec des bordures non uniformes."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47922,6 +48671,10 @@ msgid ""
"other properties are relative to this one. If the rect is empty, "
"NinePatchRect will use the whole texture."
msgstr ""
+"La région rectangulaire de la texture à utiliser. Si vous travaillez avec un "
+"atlas, utilisez cette propriété pour définir la zone à utiliser. Toutes les "
+"autres propriétés sont par rapport à celle-ci. Si le rectangle est vide, le "
+"NinePatchRect utilisera la texture dans son entièreté."
#: doc/classes/NinePatchRect.xml
msgid "The node's texture resource."
@@ -47936,6 +48689,8 @@ msgid ""
"Stretches the center texture across the NinePatchRect. This may cause the "
"texture to be distorted."
msgstr ""
+"Étire la texture du centre sur tout le NinePatchRect. Cela peut entraîner "
+"une distorsion de cette texture."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47945,6 +48700,11 @@ msgid ""
"[b]Note:[/b] Only supported when using the GLES3 renderer. When using the "
"GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH]."
msgstr ""
+"Répète la texture centrale sur tout le NinePatchRect. Cela ne provoque "
+"aucune distorsion visible. La texture doit être transparente pour que cela "
+"fonctionne sans afficher d'artefacts entre les bords.\n"
+"[b]Note :[/b] Seulement pris en charge avec GLES3. Avec GLES2, cela se "
+"comportera comme [constant AXIS_STRETCH_MODE_STRETCH]."
#: doc/classes/NinePatchRect.xml
msgid ""
@@ -47956,6 +48716,13 @@ msgid ""
"[b]Note:[/b] Only supported when using the GLES3 renderer. When using the "
"GLES2 renderer, this will behave like [constant AXIS_STRETCH_MODE_STRETCH]."
msgstr ""
+"Répète la texture centrale sur tout le NinePatchRect, mais étirera également "
+"la texture pour s'assurer que chaque tuile est visible entièrement. Cela "
+"peut causer une distorsion de la texture, mais moins que [constant "
+"AXIS_STRETCH_MODE_STRETCH]. La texture doit être transparente pour que cela "
+"fonctionne sans afficher d'artefacts entre les bords.\n"
+"[b]Note :[/b] Seulement pris en charge avec GLES3. Avec GLES2, cela se "
+"comportera comme [constant AXIS_STRETCH_MODE_STRETCH]."
#: doc/classes/Node.xml
msgid "Base class for all [i]scene[/i] objects."
@@ -48021,6 +48788,69 @@ msgid ""
"(make sure node names are the same on all peers). Also, take a look at the "
"high-level networking tutorial and corresponding demos."
msgstr ""
+"Les nœuds sont les blocs de construction de Godot. Ils peuvent être assignés "
+"comme enfant d'un autre nœud, ce qui entraîne définit l'arborescence. Un "
+"nœud donné peut contenir n'importe quel nombre de nœuds enfants mais tous "
+"ces enfants doivent avoir des noms différents.\n"
+"Une arborescence de nœuds est appelé une [i]scène[/i]. Les scènes peuvent "
+"être sauvegardées sur le disque et ensuite instanciées dans d'autres scènes. "
+"Cela permet une très grande flexibilité dans l'architecture et le modèle de "
+"données des projets Godot.\n"
+"[b]Arbre de scène :[/b] Le [SceneTree] contient l'arborescence des nœuds. "
+"Lorsqu'un nœud est ajouté à l'arborescence de scène, il reçoit la "
+"notification [constant NOTIFICATION_ENTER_TREE] et sa méthode [method "
+"enter_tree] est appelée. Les nœuds d'enfants sont toujours ajoutés [i]après[/"
+"i] leur nœud parent, c'est-à-dire la méthode [method enter_tree] d'un nœud "
+"parent sera appelée avant celle de son enfant.\n"
+"Une fois que tous les nœuds ont été ajoutés dans l'arborescence de la scène, "
+"ils reçoivent la notification [constante NOTIFICATION_READY] et leurs "
+"méthodes respectives [method _ready] sont appelées. Pour les groupes de "
+"nœuds, la méthode [method _ready] est appelée avec un ordre inversé, en "
+"commençant par les enfants et en allant jusqu'aux nœuds parent.\n"
+"Cela signifie qu'en ajoutant un nœud à l'arborescence de la scène, l'ordre "
+"suivant sera utilisé pour les appels des méthodes: [method enter_tree] du "
+"parent, [method enter_tree] des enfants, [method _ready] des enfants et "
+"enfin [method _ready] du parent (recursivement pour l'arborescence complète "
+"de la scène).\n"
+"[b]Processus :[/b] Les nœuds peuvent surcharger l'état du processus, de "
+"sorte qu'ils reçoivent un appel à chaque trame demandant un traitement (de "
+"faire quelque chose). Le traitement normal (la méthode [method _process], "
+"activée avec [method set_process]) se produit aussi vite que possible et "
+"dépend du nombre de trames par seconde, de sorte que le temps de traitement "
+"[i]delta[/i] (en secondes) est passé en argument. Le traitement physique (la "
+"méthode [method physical_process], activée avec [method "
+"set_physics_process]) est appelée un nombre fixe de fois par seconde (60 "
+"fois par défaut) et est utile pour le code lié au moteur physique.\n"
+"Les nœuds peuvent également traiter les événements d'entrée. À l'heure "
+"actuelle, la fonction [method _input] sera appelée pour chaque entrée que le "
+"programme reçoit. Dans de nombreux cas, cela peut faire trop d'informations "
+"(sauf pour des projets simples), et la fonction [method unhandled_input] "
+"peut être préférée ; elle est appelée lorsque l'événement d'entrée n'a été "
+"traité par aucun élément (généralement, des nœuds d'interface [Control]), "
+"pour s'assurer que le nœud ne reçoit que les événements qui lui sont "
+"destinés.\n"
+"Pour garder la trace de l'arborescence de la scène (surtout lorsque vous "
+"instanciez des scènes dans d'autres scènes), un \"propriétaire\" peut être "
+"défini pour le nœud avec la propriété [member owner]. Cela garde une trace "
+"de quel élément a instancié quel autre élément. Cela est surtout utile "
+"lorsque vous écrivez des éditeurs et des outils.\n"
+"Enfin, quand un nœud est libéré avec [method Object.free] ou [method "
+"queue_free], il va également libérer tous ses enfants.\n"
+"[b]Les groupes : [/b] Les nœuds peuvent être ajoutés à autant de groupes que "
+"vous voulez, vous pouvez créer des groupes comme « ennemis » ou « "
+"récupérables » par exemple, selon votre jeu. Voir [method add_to_group], "
+"[method is_in_group] et [method remove_from_group]. Vous pouvez ensuite "
+"récupérer tous les nœuds d'un groupe, lister les groupes et même appeler des "
+"méthodes sur les groupes via des méthodes de [SceneTree].\n"
+"[b]Faire communiquer les nœud via le réseau :[/b] Après s'être connecté à un "
+"serveur (ou en faire un, voir [NetworkedMultiplayerENet]), il est possible "
+"d'utiliser le système RPC intégré (\"Remote Procedure Call\") pour "
+"communiquer sur le réseau. En appelant [method rpc] avec un nom de méthode, "
+"il sera appelé localement et pour tous les pairs connectés (un pair = un "
+"client et le serveur qui accepte les connexions). Pour identifier quel nœud "
+"reçoit l'appel RPC, Godot utilisera son [NodePath] (s'assurant que les noms "
+"de nœuds sont les mêmes sur tous les pairs). Consultez également le tutoriel "
+"pour les réseaux à haut niveau et les démos correspondantes."
#: doc/classes/Node.xml
msgid "Nodes and Scenes"
@@ -48039,6 +48869,12 @@ msgid ""
"Corresponds to the [constant NOTIFICATION_ENTER_TREE] notification in "
"[method Object._notification]."
msgstr ""
+"Appelé lorsque le nœud entre dans la [SceneTree] (par exemple en étant "
+"instancié, au changement de scène, ou après avoir appelé [method add_child] "
+"dans un script). Si le nœud a des enfants, sa méthode [méthod enter_tree] "
+"sera appelée d'abord, puis ensuite celle de ses enfants.\n"
+"Correspond à la notification [constant NOTIFICATION_ENTER_TREE] dans [method "
+"Object._notification]"
#: doc/classes/Node.xml
msgid ""
@@ -48051,6 +48887,15 @@ msgid ""
"the node has already left the active tree, connect to the [signal "
"tree_exited]."
msgstr ""
+"Appelé lorsque le nœud va quitter la [SceneTree] (par exemple sur la "
+"suppression, au changement de scène, ou après avoir appelé [method "
+"remove_child] dans un script). Si le nœud a des enfants, sa méthode [method "
+"exit_tree] sera appelée en dernier, quand tous ses enfants auront quitté "
+"l'arborescence.\n"
+"Correspond à la notification [constant NOTIFICATION_EXIT_TREE] dans [method "
+"Object._notification] et signal [signal tree_exiting]. Pour être notifié "
+"lorsque le nœud a déjà quitté l'arborescence active, connectez-vous à "
+"[signal tree_exited]."
#: doc/classes/Node.xml
msgid ""
@@ -48060,6 +48905,12 @@ msgid ""
"Call [method update_configuration_warning] when the warning needs to be "
"updated for this node."
msgstr ""
+"La chaîne retournée de cette méthode est affichée comme un avertissement "
+"dans la barre d'outil Scène si le script qui la modifie est un script "
+"[code]tool[/code].\n"
+"Retourner une chaîne vide ne produit aucun avertissement.\n"
+"Appelez [method update_configuration_warning] lorsque l'avertissement doit "
+"être mis à jour pour ce nœud."
#: doc/classes/Node.xml
msgid ""
@@ -48158,6 +49009,21 @@ msgid ""
"call with [method request_ready], which may be called anywhere before adding "
"the node again."
msgstr ""
+"Appelé lorsque le nœud est « prêt », c'est-à-dire lorsque le nœud et ses "
+"enfants sont entrés dans l'arborescence de la scène. Si le nœud a des "
+"enfants, leur méthode [method _ready] sera appelée en premier, et le nœud "
+"parent recevra la notification après.\n"
+"Correspond à la notification [constant NOTIFICATION_READY] dans [method "
+"Object._notification]. Voir aussi le mot-clé [code]onready[/code] pour les "
+"variables.\n"
+"Habituellement utilisé pour l'initialisation. Pour encore avant cela, "
+"[method Object._init] peut être utilisé. Voir aussi [méthod enter_tree].\n"
+"[b]Note :[/b] [method _ready] ne peut être appelée qu'une seule fois pour "
+"chaque nœud. Après avoir retiré un nœud de l'arborescence de scène et "
+"l'ajouter à nouveau, [code]_ready[/code] ne sera pas appelé une deuxième "
+"fois. Cela peut être changé en demandant un autre appel avec [method "
+"request_ready], qui peut être appelé n'importe où avant d'ajouter le nœud à "
+"nouveau."
#: doc/classes/Node.xml
msgid ""
@@ -48247,6 +49113,30 @@ msgid ""
"will not be visible in the scene tree, though it will be visible in the "
"2D/3D view."
msgstr ""
+"Ajoute un nœud enfant. Les nœuds peuvent avoir autant d'enfants que voulu, "
+"mais chaque enfant doit avoir un nom unique. Les nœuds d'enfants sont "
+"automatiquement supprimés lorsque le nœud parent est supprimé, de sorte "
+"qu'une scène entière peut être supprimée en supprimant juste son nœud le "
+"plus haut.\n"
+"Si [code]legible_unique_name[/code] est [code]true[/code], le nœud d'enfant "
+"aura un nom clairement lisible basé sur le nom du nœud étant analysé au lieu "
+"de son type.\n"
+"[b]Note :[/b] Si le nœud enfant a déjà un parent, la fonction échouera. "
+"Utilisez [method remove_child] d'abord pour retirer le nœud de son parent "
+"actuel. Par exemple :\n"
+"[codeblock]\n"
+"if child_node.get_parent():\n"
+" child_node.get_parent().remove_child(child_node)\n"
+"add_child(child_node)\n"
+"[/codeblock]\n"
+"[b]Note :[/b] Si vous voulez qu'un enfant soit persiste dans un "
+"[PackedScene], vous devez définir [member owner] après avoir appelé [method "
+"add_child]. Ceci est généralement pertinent pour [url=$DOCS_URL/tutorials/"
+"plugins/running_code_in_the_editor.html]scripts d'outil[/url] et "
+"[url=$DOCS_URL/tutorials/plugins/editor/index.html]greffons d'éditeur[/url]. "
+"Si [method add_child] est appelé sans définir [member owner], le nouveau "
+"[Node] ajouté ne sera pas visible dans l'arborescence de la scène, bien "
+"qu'il sera visible dans la vue 2D/3D."
#: doc/classes/Node.xml
msgid ""
@@ -48256,6 +49146,10 @@ msgid ""
"will have a human-readable name based on the name of the node being "
"instanced instead of its type."
msgstr ""
+"Ajoute [code]child_nœud[/code] en tant qu'enfant. L'enfant est placé sous le "
+"[code]nœud[/code] donné dans la liste des enfants.\n"
+"Si [code]legible_unique_name[/code] est [code]true[/code], le nœud d'enfant "
+"aura un nom lisible humainement basé sur le nom du nœud plutôt que son type."
#: doc/classes/Node.xml
msgid ""
@@ -48278,6 +49172,10 @@ msgid ""
"scene tree is not paused, and [code]false[/code] if the node is not in the "
"tree."
msgstr ""
+"Retourne [code]true[/code] si le nœud peut traiter pendant que "
+"l'arborescence de scène est interrompue (voir [member pause_mode)]. Retourne "
+"toujours [code]true[/code] si l'arborescence de scène n'est pas interrompue, "
+"et [code]false[/code] si le nœud n'est pas dans l'arborescence."
#: doc/classes/Node.xml
msgid ""
@@ -48287,6 +49185,10 @@ msgid ""
"get_tree().create_tween().bind_node(self)\n"
"[/codeblock]"
msgstr ""
+"Crée un nouveau [SceneTreeTween] et le lie à ce nœud. Cela équivaut à :\n"
+"[codeblock]\n"
+"get_tree().create_tween().bind_node(self)\n"
+"[/codeblock]"
#: doc/classes/Node.xml
msgid ""
@@ -48297,6 +49199,13 @@ msgid ""
"constructor arguments (i.e. needs to supply arguments to [method Object."
"_init] method). In that case, the node will be duplicated without a script."
msgstr ""
+"Duplique le nœud, retournant un nouveau nœud.\n"
+"Vous pouvez affiner le comportement en utilisant des drapeaux dans "
+"[code]flags[/code] (voir [enum DuplicateFlags)].\n"
+"[b]Note :[/b] Ça ne fonctionnera pas correctement si le nœud contient un "
+"script avec des arguments de constructeur (c'est-à-dire qu'on doit fournir "
+"des arguments à la méthode [method Object._init]). Dans ce cas, le nœud sera "
+"dupliqué sans script."
#: doc/classes/Node.xml
msgid ""
@@ -48315,6 +49224,23 @@ msgid ""
"consider using [method get_node] instead. To avoid using [method find_node] "
"too often, consider caching the node reference into a variable."
msgstr ""
+"Trouve un descendant de ce nœud dont le nom correspond à [code]mask[/code] "
+"suivant le même fonctionnement que pour [method String.match] (c'est-à-dire "
+"sensible à la casse, que [code]\"*\"[/code] correspond à un zéro au un seul "
+"caractère, et que [code]\"?\"[/code] correspond à n'importe quel unique "
+"caractère sauf [code]\".\"[/code]). Retourne [code]null[/code] si aucun "
+"[Node] correspondant n'est trouvée.\n"
+"[b]Note :[/b] La correspondance ne se fait pas sur le chemin complet mais "
+"juste les noms des nœuds.\n"
+"Si [code]owned[/code] est [code]true[/code], cette méthode ne trouve que des "
+"nœuds dont le propriétaire est ce nœud. Ceci est particulièrement important "
+"pour les scènes instanciée par un script, parce que ces scènes n'ont pas de "
+"propriétaire.\n"
+"[b]Note :[/b] Comme cette méthode liste tous les descendants d'un nœud, "
+"c'est le moyen le plus lent d'obtenir une référence à un autre nœud. Dans la "
+"mesure du possible, essayez plutôt d'utiliser [method get_node]. Pour éviter "
+"d'utiliser [method find_node] trop souvent, essayez de mettre en chache la "
+"référence de ce nœud dans une variable."
#: doc/classes/Node.xml
msgid ""
@@ -48329,6 +49255,23 @@ msgid ""
"[method get_node] instead. To avoid using [method find_parent] too often, "
"consider caching the node reference into a variable."
msgstr ""
+"Trouve un parent de ce nœud dont le nom correspond à [code]mask[/code] "
+"suivant le même fonctionnement que pour [method String.match] (c'est-à-dire "
+"sensible à la casse, que [code]\"*\"[/code] correspond à un zéro au un seul "
+"caractère, et que [code]\"?\"[/code] correspond à n'importe quel unique "
+"caractère sauf [code]\".\"[/code]). Retourne [code]null[/code] si aucun "
+"[Node] correspondant n'est trouvée.\n"
+"[b]Note :[/b] La correspondance ne se fait pas sur le chemin complet mais "
+"juste les noms des nœuds.\n"
+"Si [code]owned[/code] est [code]true[/code], cette méthode ne trouve que des "
+"nœuds dont le propriétaire est ce nœud. Ceci est particulièrement important "
+"pour les scènes instanciée par un script, parce que ces scènes n'ont pas de "
+"propriétaire.\n"
+"[b]Note :[/b] Comme cette méthode liste tous les parents d'un nœud, c'est le "
+"moyen le plus lent d'obtenir une référence à un autre nœud. Dans la mesure "
+"du possible, essayez plutôt d'utiliser [method get_node]. Pour éviter "
+"d'utiliser [method find_node] trop souvent, essayez de mettre en chache la "
+"référence de ce nœud dans une variable."
#: doc/classes/Node.xml
msgid ""
@@ -48336,6 +49279,9 @@ msgid ""
"method is often used for iterating all children of a node.\n"
"To access a child node via its name, use [method get_node]."
msgstr ""
+"Retourne un nœud enfant par son index (voir [method get_child_count)]. Cette "
+"méthode est souvent utilisée pour itérer tous les enfants d'un nœud.\n"
+"Pour accéder à un nœud enfant par son nom, utilisez [method get_node]."
#: doc/classes/Node.xml
msgid "Returns the number of child nodes."
@@ -48363,17 +49309,38 @@ msgid ""
" non_internal_groups.push_back(group)\n"
"[/codeblock]"
msgstr ""
+"Retourne un tableau énumérant les groupes dont ce nœud est membre.\n"
+"[b]Note :[/b] Pour des raisons de performance, l'ordre des groupes de nœuds "
+"n'est [i]pas[/i] garanti. cet ordre des groupes de nœuds ne devrait pas être "
+"utilisé car il peut varier entre les différents projets.\n"
+"[b]Note :[/b] Le moteur utilise des noms de groupe en l'interne (tous "
+"commençent par \"_\"). Pour éviter les conflits avec des groupes internes, "
+"n'ajoutez pas de groupes personnalisés dont le nom commence par \"_\". Pour "
+"exclure les groupes internes en boucle sur [method get_groups], utiliser le "
+"code suivant:\n"
+"[codeblock]\n"
+"# Enregistre tous les nœuds des groupes non internes au moteur (dans un "
+"tableau de String).\n"
+"var non_internal_groups = []\n"
+"for group in get_groups():\n"
+" if not group.begins_with(\"_\"):\n"
+" non_internal_groups.push_back(group)\n"
+"[/codeblock]"
#: doc/classes/Node.xml
msgid ""
"Returns the node's index, i.e. its position among the siblings of its parent."
msgstr ""
+"Retourne l'indice du nœud, c'est-à-dire sa position parmi les enfants de son "
+"parent."
#: doc/classes/Node.xml
msgid ""
"Returns the peer ID of the network master for this node. See [method "
"set_network_master]."
msgstr ""
+"Retourne l'identifiant du pair du maître du réseau pour ce nœud. Voir "
+"[method set_network_master]."
#: doc/classes/Node.xml
msgid ""
@@ -48452,12 +49419,33 @@ msgid ""
"[[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]\n"
"[/codeblock]"
msgstr ""
+"Récupère un nœud et une de ses ressources comme spécifié par le sous-nom de "
+"son [NodePath] (ex.: [code]Area2D/CollisionShape2D:shape[/code)]. Si "
+"plusieurs ressources imbriquées sont spécifiées dans le [NodePath], seul le "
+"dernier sera récupéré.\n"
+"La valeur de retour est un tableau de 3 éléments : le premier élément est le "
+"[Node] (ou [code]null[/code] s'il n'est pas trouvé), le deuxième élément est "
+"la [Resource] (ou [code]null[/code] si elle n'est pas trouvée), et le "
+"troisième élément est le reste du [NodePath], le cas échéant.\n"
+"Par exemple, en supposant que [code]Area2D/CollisionShape2D[/code] est un "
+"nœud valide et que sa propriété [code]shape[/code] a été assignée à une "
+"ressource [RectangleShape2D], on pourrait avoir ce type de sortie:\n"
+"[codeblock]\n"
+"print(get_node_and_resource(\"Area2D/CollisionShape2D\")) # "
+"[[CollisionShape2D:1161], Null, ]\n"
+"print(get_node_and_resource(\"Area2D/CollisionShape2D:shape\")) # "
+"[[CollisionShape2D:1161], [RectangleShape2D:1156], ]\n"
+"print(get_node_and_resource(\"Area2D/CollisionShape2D:shape:extents\")) # "
+"[[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]\n"
+"[/codeblock]"
#: doc/classes/Node.xml
msgid ""
"Similar to [method get_node], but does not log an error if [code]path[/code] "
"does not point to a valid [Node]."
msgstr ""
+"Semblable à [method get_node], mais n'affiche pas d'erreur si [code]path[/"
+"code] ne pointe pas vers une valeur valide [Node]."
#: doc/classes/Node.xml
msgid ""
@@ -48472,12 +49460,18 @@ msgid ""
"Returns the absolute path of the current node. This only works if the "
"current node is inside the scene tree (see [method is_inside_tree])."
msgstr ""
+"Retourne le chemin absolu du nœud actuel. Cela ne fonctionne que si le nœud "
+"actuel est à l'intérieur de l'arborescence de la scène (voir [method "
+"is_inside_tree)]."
#: doc/classes/Node.xml
msgid ""
"Returns the relative [NodePath] from this node to the specified [code]node[/"
"code]. Both nodes must be in the same scene or the function will fail."
msgstr ""
+"Retourne le chemin [NodePath] relatif de ce nœud par rapport au nœud "
+"[code]nœud[/code] spécifié. Les deux nœuds doivent être dans la même scène "
+"sinon la fonction échouera."
#: doc/classes/Node.xml
msgid ""
@@ -48486,18 +49480,26 @@ msgid ""
"processing unless the frames per second is changed via [member Engine."
"iterations_per_second]."
msgstr ""
+"Retourne le temps écoulé (en secondes) depuis la dernière trame physique "
+"(voir [method _physics_process]). C'est toujours une valeur constante dans "
+"le traitement de la physique à moins que les trames par seconde ne soient "
+"changés via [member Engine.iterations_per_second]"
#: doc/classes/Node.xml
msgid ""
"Returns the node's order in the scene tree branch. For example, if called on "
"the first child node the position is [code]0[/code]."
msgstr ""
+"Retourne l'ordre du nœud dans la branche de la scène. Par exemple, si on "
+"l'appelle sur le premier nœud enfant, la position est [code]0[/code]."
#: doc/classes/Node.xml
msgid ""
"Returns the time elapsed (in seconds) since the last process callback. This "
"value may vary from frame to frame."
msgstr ""
+"Retourne le temps écoulé (en secondes) depuis le dernier rappel de process. "
+"Cette valeur peut varier d'une trame à l'autre."
#: doc/classes/Node.xml
msgid ""
@@ -48528,12 +49530,19 @@ msgid ""
"shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive "
"math types) are not considered resources."
msgstr ""
+"Retourne [code]true[/code] si le [NodePath] désigne un nœud valide et son "
+"sous-nom désigne une ressource valide, par exemple [code]Area2D/"
+"CollisionShape2D:shape[/code]. Les propriétés avec un type qui n'est pas une "
+"[Resource] (par exemple les nœuds ou les types mathématiques primitifs) ne "
+"sont pas considérées comme des ressources."
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if the given node is a direct or indirect child of "
"the current node."
msgstr ""
+"Retourne [code]true[/code] si le nœud donné est un enfant direct ou indirect "
+"du nœud actuel."
#: doc/classes/Node.xml
msgid ""
@@ -48554,6 +49563,8 @@ msgid ""
"Returns [code]true[/code] if this node is in the specified group. See notes "
"in the description, and the group methods in [SceneTree]."
msgstr ""
+"Retourne [code]true[/code] si ce nœud est dans le groupe spécifié. Voir les "
+"notes dans la description, et les méthodes de groupe dans [SceneTree]."
#: doc/classes/Node.xml
msgid ""
@@ -48565,6 +49576,7 @@ msgstr ""
msgid ""
"Returns [code]true[/code] if the local system is the master of this node."
msgstr ""
+"Retourne [code]true[/code] si le système local est le maître de ce nœud."
#: doc/classes/Node.xml
msgid ""
@@ -48574,6 +49586,11 @@ msgid ""
"[b]and[/b] physics interpolation is enabled within the [SceneTree]. This can "
"be tested using [method is_physics_interpolated_and_enabled]."
msgstr ""
+"Retourne [code]true[/code] si le drapeau interpolé de la physique est défini "
+"pour ce nœud (voir [member physics_interpolation_mode)].\n"
+"[b]Note :[/b] L'interpolation ne sera active que si le drapeau est défini "
+"[b]et[/b] que l'interpolation physique est activée dans [SceneTree]. Ceci "
+"peut être testé en utilisant [method is_physics_interpolated_and_enabled]."
#: doc/classes/Node.xml
msgid ""
@@ -48584,36 +49601,52 @@ msgid ""
"See [member SceneTree.physics_interpolation] and [member ProjectSettings."
"physics/common/physics_interpolation]."
msgstr ""
+"Retourne [code]true[/code] si l'interpolation physique est activée (voir "
+"[member physics_interpolation_mode]) [b]et[/b] activée dans [SceneTree].\n"
+"Il s'agit d'une version pratique de [method is_physics_interpolated] qui "
+"vérifie également si l'interpolation physique est activée globalement.\n"
+"Voir [member SceneTree.physics_interpolation] et [member ProjectSettings."
+"physics/common/physics_interpolation]"
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if physics processing is enabled (see [method "
"set_physics_process])."
msgstr ""
+"Retourne [code]true[/code] si le traitement physique est activé (voir "
+"[method set_physics_process)]."
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if internal physics processing is enabled (see "
"[method set_physics_process_internal])."
msgstr ""
+"Retourne [code]true[/code] si le traitement physique interne est activé "
+"(voir [method set_physics_process_internal)]."
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if processing is enabled (see [method "
"set_process])."
msgstr ""
+"Retourne [code]true[/code] si le traitement est activé (voir [method "
+"set_process)]."
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if the node is processing input (see [method "
"set_process_input])."
msgstr ""
+"Retourne [code]true[/code] si le nœud gère l'entrée (voir [method "
+"set_process_input)]."
#: doc/classes/Node.xml
msgid ""
"Returns [code]true[/code] if internal processing is enabled (see [method "
"set_process_internal])."
msgstr ""
+"Retourne [code]true[/code] si le traitement interne est activé (voir [method "
+"set_process_internal)]."
#: doc/classes/Node.xml
msgid ""
@@ -48628,6 +49661,8 @@ msgid ""
"Returns [code]true[/code] if the node is processing unhandled key input (see "
"[method set_process_unhandled_key_input])."
msgstr ""
+"Retourne [code]true[/code] si le nœud gère l'entrée de touche non traitée "
+"(voir [method set_process_unhandled_key_input)]."
#: doc/classes/Node.xml
msgid ""
@@ -48635,12 +49670,17 @@ msgid ""
"Since calls, signals, etc are performed by tree order, changing the order of "
"children nodes may be useful."
msgstr ""
+"Déplace un nœud enfant à une position différente (ordre) parmi les autres "
+"enfants. Comme les appels, les signaux, etc. sont effectués par l'ordre des "
+"arborescences, changer l'ordre des nœuds d'enfants peut être utile."
#: doc/classes/Node.xml
msgid ""
"Prints all stray nodes (nodes outside the [SceneTree]). Used for debugging. "
"Works only in debug builds."
msgstr ""
+"Imprime tous les nœuds égarés (sauf le [SceneTree)]. Utilisé pour le "
+"débogage. Fonctionne seulement dans les versions de débogage."
#: doc/classes/Node.xml
msgid ""
@@ -48657,6 +49697,18 @@ msgid ""
"TheGame/SplashScreen/Camera2D\n"
"[/codeblock]"
msgstr ""
+"Imprime l'arborescence dans la console. Utilisé principalement à des fins de "
+"débogage. Cette version affiche le chemin par rapport au nœud actuel, ce qui "
+"est utile pour le copier/coller dans la fonction [method get_node].\n"
+"[ b]Exemple de sortie:[/b]\n"
+"[codeblock]\n"
+"TheGame\n"
+"TheGame/Menu\n"
+"TheGame/Menu/Label\n"
+"TheGame/Menu/Camera2D\n"
+"TheGame/SplashScreen\n"
+"TheGame/SplashScreen/Camera2D\n"
+"[/codeblock]"
#: doc/classes/Node.xml
msgid ""
@@ -48673,6 +49725,19 @@ msgid ""
" â”–â•´Camera2D\n"
"[/codeblock]"
msgstr ""
+"Comme [method print_tree], cela imprime l'arborescence dans la console. "
+"Cette version affiche une représentation plus graphique semblable à ce qui "
+"est affiché dans l'inspecteur de scène. C'est utile pour inspecter les "
+"grands arborescences.\n"
+"[ b]Exemple de sortie:[/b]\n"
+"[codeblock]\n"
+" â”–â•´TheGame\n"
+" â” â•´Menu\n"
+" ┃ ┠╴Label\n"
+" ┃ ┖╴Camera2D\n"
+" â”–â•´SplashScreen\n"
+" â”–â•´Camera2D\n"
+"[/codeblock]"
#: doc/classes/Node.xml
msgid ""
@@ -48683,12 +49748,20 @@ msgid ""
"[code]parent_first[/code] is [code]false[/code], the children will be called "
"first."
msgstr ""
+"Appelle la méthode donnée (si présente) avec les arguments spécifiés dans "
+"[code]args[/code] sur ce nœud et récursivement sur tous ses enfants. Si "
+"l'argument [code]parent_first[/code] est [code]true[/code], la méthode sera "
+"appelée d'abord sur le nœud courant, puis sur tous ses enfants. Si "
+"[code]parent_first[/code] est [code]false[/code], les enfants seront appelés "
+"en premier."
#: doc/classes/Node.xml
msgid ""
"Notifies the current node and all its children recursively by calling "
"[method Object.notification] on all of them."
msgstr ""
+"Notifie le nœud actuel et tous ses enfants de façon récursive en les "
+"appelant [method Object.notification] sur tous."
#: doc/classes/Node.xml
msgid ""
@@ -48703,6 +49776,17 @@ msgid ""
"[method @GDScript.is_instance_valid] before attempting to call its methods "
"or access its properties."
msgstr ""
+"Place le nœud dans une file d'attente pour la suppression à la fin de la "
+"trame actuel. Lorsque supprimé, tous ses nœuds d'enfants seront supprimés "
+"aussi. Cette méthode s'assure qu'il est sûr de supprimer le nœud, "
+"contrairement [method Object.free]. Utilisez [method Object."
+"is_queued_for_deletion] pour vérifier si un nœud sera supprimé à la fin de "
+"la trame.\n"
+"[b]Important:[/b] Si vous avez une variable pointant vers un nœud, il ne "
+"sera [i]pas[/i] attribué à [code]null[/code] une fois le nœud libéré. Au "
+"lieu de cela, il va pointer vers [i]l'instance précédemment libérée[/i] et "
+"vous devez le valider avec [method @GDScript.is_instance_valid] avant de "
+"risquer d'appeler des méthodes dessus ou d'accéder à ses propriétés."
#: doc/classes/Node.xml
msgid ""
@@ -48713,6 +49797,12 @@ msgid ""
"of it. After using [code]raise[/code], a Control will be drawn on top of its "
"siblings."
msgstr ""
+"Déplace ce nœud vers le bas de la hiérarchie des enfants. Cela est souvent "
+"utile dans les nœuds d'interface ([Control]), parce que leur ordre de dessin "
+"dépend de leur ordre dans l'arborescence. Le Node en haut est dessiné "
+"d'abord, puis les nœuds en dessous dans la hiérarchie qui sont "
+"successivement dessinés. Après avoir utilisé [code]raise[/code], un contrôle "
+"sera affiché par dessus les autres enfants."
#: doc/classes/Node.xml
msgid ""
@@ -48720,6 +49810,9 @@ msgid ""
"it exists). All event subscriptions that pass by the removed node will be "
"unsubscribed."
msgstr ""
+"Retire un nœud et fixe tous ses enfants comme enfants du nœud parent (s'il "
+"existe). Tous les souscriptions d'événement qui passent par le nœud retiré "
+"seront aussi retirées."
#: doc/classes/Node.xml
msgid ""
@@ -48728,12 +49821,19 @@ msgid ""
"(or its descendants) to be [code]null[/code], if that [member owner] is no "
"longer a parent or ancestor."
msgstr ""
+"Retire un nœud d'enfant. Le nœud n'est PAS supprimé et doit être supprimé "
+"manuellement.\n"
+"[b]Note :[/b] Cette fonction peut définir le [member owner] du nœud enlevé "
+"(ou ses descendants) comme [code]null[/code], si ce [member owner] n'est "
+"plus un parent."
#: doc/classes/Node.xml
msgid ""
"Removes a node from a group. See notes in the description, and the group "
"methods in [SceneTree]."
msgstr ""
+"Retire un nœud d'un groupe. Voir les notes dans la description, et les "
+"méthodes de groupe dans [SceneTree]."
#: doc/classes/Node.xml
msgid ""
@@ -48745,6 +49845,13 @@ msgid ""
"need to keep it in a variable for later use or free it using [method Object."
"free]."
msgstr ""
+"Remplace un nœud dans une scène par celui donné. Les souscriptions qui "
+"passent par ce nœud seront perdus.\n"
+"[b]Note :[/b] Le nœud donné deviendra le nouveau parent de tous les nœuds "
+"d'enfants que le nœud remplacé avait.\n"
+"[b]Note :[/b] Le nœud remplacé n'est pas automatiquement libéré, donc vous "
+"devez le garder dans une variable pour une utilisation ultérieure ou le "
+"libérer en utilisant [method Object.free]"
#: doc/classes/Node.xml
msgid ""
@@ -48756,6 +49863,13 @@ msgid ""
"which case, [code]_ready[/code] will be called in the same order as it would "
"normally)."
msgstr ""
+"Demande que [code]_ready[/code] soit de nouveau appelé. Notez que la méthode "
+"va s'appeler immédiatement, mais qu'elle est prévue lorsque le nœud est "
+"ajouté à l'arborescence de scène à nouveau (voir [method _ready)]. "
+"[code]_ready[/code] est appelé seulement pour le nœud qui l'a demandé, ce "
+"qui signifie que vous devez le demander pour chaque enfant si vous voulez "
+"qu'ils appellent [code]_ready[/code] aussi (dans quel cas, [code]_ready[/"
+"code] sera appelé dans le même ordre que normalement)."
#: doc/classes/Node.xml
msgid ""
@@ -48771,6 +49885,17 @@ msgid ""
"[b]Note:[/b] This function should be called [b]after[/b] moving the node, "
"rather than before."
msgstr ""
+"Lorsque l'interpolation de la physique est active, déplacer un nœud vers une "
+"transformation radicalement différente (comme le placement dans un niveau) "
+"peut entraîner un glissement visible car l'objet est rendu lors de son "
+"déplacement lors de la trame physique.\n"
+"Ce glitch peut être évité en appelant [code]reset_physics_interpolation[/"
+"code], qui annule temporairement l'interpolation jusqu'à ce que la trame "
+"physique soit complète.\n"
+"[constant NOTIFICATION_RESET_PHYSICS_INTERPOLATION] sera reçu par le nœud et "
+"tous les enfants de façon récursive.\n"
+"[b]Note :[/b] Cette fonction doit être appelée [b]après[/b] le déplacement "
+"du nœud, plutôt qu'avant."
#: doc/classes/Node.xml
msgid ""
@@ -48788,6 +49913,20 @@ msgid ""
"like [code]server_disconnected[/code] or by checking [code]SceneTree."
"network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]."
msgstr ""
+"Envoie une requête d'appel de procédure à distance pour la [code]method[/"
+"code] donnée aux pairs sur le réseau (et localement), en option en envoyant "
+"tous les arguments supplémentaires comme arguments à la méthode appelée par "
+"le RPC. La requête d'appel ne sera reçue que par des nœuds ayant le même "
+"[NodePath], y compris le même nom de nœud. Le comportement dépend de la "
+"configuration RPC pour la méthode donnée, voir [method rpc_config]. Les "
+"méthodes ne sont pas exposées aux RPC par défaut. Voir aussi [method rset] "
+"et [method rset_config] pour les propriétés. Retourne [code]null[/code].\n"
+"[b]Note :[/b] Vous pouvez seulement utiliser RPC en toute sécurité sur les "
+"clients après avoir reçu le signal [code]connected_to_server[/code] du "
+"[SceneTree]. Vous devez également suivre l'état de connexion, soit par les "
+"signaux [SceneTree] comme [code]server_disconnected[/code] ou en vérifiant "
+"[code]SceneTree.network_peer.get_connection_status() == "
+"CONNECTION_CONNECTED[/code]."
#: doc/classes/Node.xml
msgid ""
@@ -48799,6 +49938,13 @@ msgid ""
"By default, methods are not exposed to networking (and RPCs). See also "
"[method rset] and [method rset_config] for properties."
msgstr ""
+"Change le mode RPC pour la [code]method[/code] donné pour le [code]mode[/"
+"code] spécifié. Voir [enum MultiplayerAPI.RPCMode]. Une alternative est "
+"d'annoter les méthodes et les propriétés avec les mots-clés correspondants "
+"([code]remote[/code], [code]master[/code], [code]puppet[/code], "
+"[code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code)]. "
+"Par défaut, les méthodes ne sont pas exposées au réseaut (et aux RPC). Voir "
+"aussi [method rset] et [method rset_config] pour les propriétés."
#: doc/classes/Node.xml
msgid ""
@@ -48806,6 +49952,9 @@ msgid ""
"(see [method NetworkedMultiplayerPeer.set_target_peer]). Returns [code]null[/"
"code]."
msgstr ""
+"Envoie un [method rpc] à un pair spécifique identifié par [code]peer_id[/"
+"code] (voir [method NetworkedMultiplayerPeer.set_target_peer]). Retourne "
+"[code]null[/code]."
#: doc/classes/Node.xml
msgid ""
@@ -48820,6 +49969,9 @@ msgid ""
"using an unreliable protocol (see [method NetworkedMultiplayerPeer."
"set_target_peer]). Returns [code]null[/code]."
msgstr ""
+"Envoie un [method rpc] à un pair spécifique identifié par [code]peer_id[/"
+"code] en utilisant un protocole non fiable (voir [method "
+"NetworkedMultiplayerPeer.set_target_peer]). Retourne [code]null[/code]."
#: doc/classes/Node.xml
msgid ""
@@ -48828,6 +49980,10 @@ msgid ""
"rset_config]. See also [method rpc] for RPCs for methods, most information "
"applies to this method as well."
msgstr ""
+"Change une propriété distante sur d'autres pairs (et localement). Le "
+"comportement dépend de la configuration du RPC pour la propriété donnée, "
+"voir [method rset_config]. Voir aussi [method rpc] pour les RPC sur les "
+"méthodes, la plupart des informations s'appliquent aussi à cette méthode."
#: doc/classes/Node.xml
msgid ""
@@ -48839,6 +49995,13 @@ msgid ""
"By default, properties are not exposed to networking (and RPCs). See also "
"[method rpc] and [method rpc_config] for methods."
msgstr ""
+"Change le mode RPC pour la [code]property[/code] donnée au [code]mode[/code] "
+"spécifié. Voir [enum MultiplayerAPI.RPCMode]. Une alternative est "
+"l'annotation des méthodes et des propriétés avec les mots-clés "
+"correspondants ([code]remote[/code], [code]master[/code], [code]puppet[/"
+"code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/"
+"code)]. Par défaut, les propriétés ne sont pas exposées au réseau (et au "
+"RPC). Voir aussi [method rpc] et [method rpc_config] pour les méthodes."
#: doc/classes/Node.xml
msgid ""
@@ -50503,8 +51666,14 @@ msgid "See [enum ShadowDetail]."
msgstr "Voir [enum ShadowDetail]."
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
-msgstr "Voir [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
+msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
@@ -50515,7 +51684,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -69876,16 +71046,26 @@ msgid "The size of one pixel's width on the sprite to scale it in 3D."
msgstr "La taille d'un des pixels de la sprite pour définir sa taille en 3D."
#: doc/classes/SpriteBase3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
"This is because opaque objects are not sorted, while transparent objects are "
"sorted from back to front (subject to priority)."
msgstr ""
+"Définit la priorité de rendu pour le texte. Des objets plus prioritaires "
+"seront affichés par-dessus des objets moins inférieurs.\n"
+"[b]Note: [/b] Cela ne s'applique que si [member alpha_cut] est défini à "
+"[constant ALPHA_CUT_DISABLED] (c'est la valeur par défaut).\n"
+"[b]Note :[/b] Cela ne s'applique qu'au tri des objets transparents. Cela "
+"n'affectera pas la façon dont les objets transparents sont triés par rapport "
+"aux objets opaques. C'est parce que les objets opaques ne sont pas triés, "
+"alors que les objets transparents sont triés de l'arrière à l'avant (et "
+"suivant leur priorité)."
#: doc/classes/SpriteBase3D.xml
#, fuzzy
@@ -73232,9 +74412,10 @@ msgid "Sets the text for a specific line."
msgstr "Définit le texte pour la ligne spécifiée."
#: doc/classes/TextEdit.xml
+#, fuzzy
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
"Ajoute un marque-page pour la ligne [code]line[/code] si [code]bookmark[/"
@@ -77233,14 +78414,19 @@ msgid ""
msgstr ""
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
+"Retourne le TreeItem précédent dans l'arbre ou un objet nul s'il n'y en a "
+"pas."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -77255,16 +78441,19 @@ msgid "Returns the parent TreeItem or a null object if there is none."
msgstr "Renvoie le TreeItem parent ou un objet nul s’il n’y en a pas."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
"Retourne le TreeItem précédent dans l'arbre ou un objet nul s'il n'y en a "
"pas."
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -84934,9 +86123,12 @@ msgstr ""
"Définit la matrice de transformation globale de la fenêtre d'affichage."
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "Si [code]true[/code], l'interpolation fait une boucle."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -85028,6 +86220,15 @@ msgstr "Convertit le format de l’image. Voir les constantes [enum Format]."
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/gl.po b/doc/translations/gl.po
index 17fb042ad7..207a818761 100644
--- a/doc/translations/gl.po
+++ b/doc/translations/gl.po
@@ -848,7 +848,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7685,8 +7692,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11754,7 +11761,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20165,7 +20177,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23551,7 +23563,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25382,7 +25394,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32478,7 +32490,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32494,7 +32506,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32524,7 +32536,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36624,7 +36636,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36885,7 +36897,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36999,6 +37011,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39696,7 +39754,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39708,7 +39772,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57462,7 +57527,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60353,8 +60418,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63977,13 +64042,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63995,13 +64061,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70887,7 +70954,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70972,6 +71043,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/hi.po b/doc/translations/hi.po
index 98778940cf..2df4b9bbe4 100644
--- a/doc/translations/hi.po
+++ b/doc/translations/hi.po
@@ -847,7 +847,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7684,8 +7691,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11753,7 +11760,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20164,7 +20176,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23550,7 +23562,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25381,7 +25393,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32477,7 +32489,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32493,7 +32505,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32523,7 +32535,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36623,7 +36635,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36884,7 +36896,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36998,6 +37010,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39695,7 +39753,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39707,7 +39771,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57461,7 +57526,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60352,8 +60417,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63976,13 +64041,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63994,13 +64060,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70886,7 +70953,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70971,6 +71042,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/hu.po b/doc/translations/hu.po
index 325d7d0f52..221206451a 100644
--- a/doc/translations/hu.po
+++ b/doc/translations/hu.po
@@ -866,7 +866,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7703,8 +7710,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11772,7 +11779,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20183,7 +20195,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23569,7 +23581,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25400,7 +25412,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32496,7 +32508,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32512,7 +32524,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32542,7 +32554,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36642,7 +36654,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36903,7 +36915,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37017,6 +37029,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39714,7 +39772,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39726,7 +39790,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57480,7 +57545,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60371,8 +60436,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63995,13 +64060,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64013,13 +64079,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70905,7 +70972,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70990,6 +71061,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/id.po b/doc/translations/id.po
index eb95a98f22..39310a6160 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -1199,10 +1199,22 @@ msgstr ""
"atau peringatan dicetak."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Seperti [metode cetak], tetapi hanya mencetak saat digunakan dalam mode "
-"debug."
+"Mencetak trek tumpukan di lokasi kode, hanya berfungsi saat dijalankan "
+"dengan debugger dihidupkan.\n"
+"Output di konsol akan terlihat seperti ini:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 dalam fungsi '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
#, fuzzy
@@ -8097,8 +8109,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12166,7 +12178,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20579,7 +20596,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23969,7 +23986,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25806,7 +25823,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32903,7 +32920,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32919,7 +32936,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32949,7 +32966,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37070,7 +37087,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37331,7 +37348,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37447,6 +37464,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40144,7 +40207,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40156,7 +40225,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57931,7 +58001,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60828,8 +60898,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64453,13 +64523,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64471,13 +64542,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71368,7 +71440,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71453,6 +71529,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/is.po b/doc/translations/is.po
index c68a096dfa..e3080abf39 100644
--- a/doc/translations/is.po
+++ b/doc/translations/is.po
@@ -847,7 +847,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7684,8 +7691,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11753,7 +11760,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20164,7 +20176,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23550,7 +23562,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25381,7 +25393,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32477,7 +32489,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32493,7 +32505,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32523,7 +32535,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36623,7 +36635,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36884,7 +36896,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36998,6 +37010,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39695,7 +39753,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39707,7 +39771,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57461,7 +57526,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60352,8 +60417,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63976,13 +64041,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63994,13 +64060,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70886,7 +70953,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70971,6 +71042,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/it.po b/doc/translations/it.po
index fd78bc8f1c..3acfabc091 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -25,12 +25,13 @@
# Andrea Leganza <neogene@gmail.com>, 2021.
# Federico Caprini <caprinifede@gmail.com>, 2022.
# Alessandro Casalino <alessandro.casalino93@gmail.com>, 2022.
+# AndreWharn <andrewharnofficial@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-04-25 15:12+0000\n"
-"Last-Translator: Micila Micillotto <micillotto@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:56+0000\n"
+"Last-Translator: AndreWharn <andrewharnofficial@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/it/>\n"
"Language: it\n"
@@ -38,7 +39,7 @@ msgstr ""
"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.12.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: doc/tools/make_rst.py
msgid "Description"
@@ -101,18 +102,16 @@ msgid "Default"
msgstr "Predefinito"
#: doc/tools/make_rst.py
-#, fuzzy
msgid "Setter"
-msgstr "Impostatore"
+msgstr "Setter"
#: doc/tools/make_rst.py
msgid "value"
msgstr "valore"
#: doc/tools/make_rst.py
-#, fuzzy
msgid "Getter"
-msgstr "Acchiappatore"
+msgstr "Getter"
#: doc/tools/make_rst.py
msgid ""
@@ -137,9 +136,8 @@ msgstr ""
"qui."
#: doc/tools/make_rst.py
-#, fuzzy
msgid "This method is used to construct a type."
-msgstr "Questo metodo viene utilizzato per creare un tipo di variabile."
+msgstr "Questo metodo viene utilizzato per creare un tipo."
#: doc/tools/make_rst.py
msgid ""
@@ -1372,10 +1370,22 @@ msgstr ""
"messaggi di debug ed errore che vengono mostrati con la stack trace."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Come [method print], ma stampa solo quando viene utilizzato in modalità "
-"debug."
+"Stampa un stack trace nella posizione del codice, funziona solo quando il "
+"debugger è attivato.\n"
+"L'output nella console apparirà come:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8702,8 +8712,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12783,7 +12793,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -21303,7 +21318,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24703,7 +24718,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -26543,7 +26558,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33683,7 +33698,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33699,7 +33714,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33732,7 +33747,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37884,7 +37899,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -38148,7 +38163,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -38267,6 +38282,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40972,7 +41033,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40984,7 +41051,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58807,7 +58875,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61723,8 +61791,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -65387,13 +65455,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -65405,13 +65474,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -72367,11 +72437,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
-"Se [code] vero [/code], i nodi figli sono ordinati, altrimenti l'ordinamento "
-"è disabilitato."
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -72455,6 +72526,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index 324df4d9ae..fe76c741d0 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -1333,8 +1333,22 @@ msgstr ""
"ãŸã¨ãã«ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "[method print] ã¨åŒæ§˜ã§ã™ãŒã€ã—ã‹ã—デãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰æ™‚ã«ã®ã¿è¡¨ç¤ºã—ã¾ã™ã€‚"
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
+"コードä½ç½®ã®ã‚¹ã‚¿ãƒƒã‚¯ãƒˆãƒ©ãƒƒã‚¯ã‚’表示ã—ã¾ã™ã€‚デãƒãƒƒã‚¬ã‚’有効ã«ã—ã¦å®Ÿè¡Œã—ãŸæ™‚ã«ã®"
+"ã¿å‹•作ã—ã¾ã™ã€‚\n"
+"コンソール内ã§ã®å‡ºåŠ›ã¯ã“ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -9918,8 +9932,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -14717,7 +14731,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -23302,7 +23321,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -26725,7 +26744,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -28567,7 +28586,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -35779,7 +35798,7 @@ msgstr "円柱ã®é«˜ã•。"
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -35795,7 +35814,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -35831,7 +35850,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -40028,7 +40047,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -40295,7 +40314,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -40416,6 +40435,53 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "指定ã•れãŸåå‰ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒŽãƒ¼ãƒ‰ã‚’è¿”ã—ã¾ã™ã€‚"
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -43124,7 +43190,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -43136,7 +43208,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -61336,7 +61409,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -64289,8 +64362,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -67983,13 +68056,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -68001,13 +68075,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -75036,9 +75111,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "[code]true[/code]ã®å ´åˆã€é ‚点色をアルベド色ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚"
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -75122,6 +75200,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index 2f6879593c..ac9274cee6 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -1004,7 +1004,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7859,8 +7866,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11931,7 +11938,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20452,7 +20464,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23844,7 +23856,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25682,7 +25694,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32792,7 +32804,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32808,7 +32820,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32838,7 +32850,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36972,7 +36984,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37235,7 +37247,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37353,6 +37365,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40176,7 +40234,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40188,7 +40252,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57973,7 +58038,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60874,8 +60939,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64507,13 +64572,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64525,13 +64591,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71452,7 +71519,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71537,6 +71608,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/lt.po b/doc/translations/lt.po
index 2468d389d3..79790f5e70 100644
--- a/doc/translations/lt.po
+++ b/doc/translations/lt.po
@@ -857,7 +857,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7694,8 +7701,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11763,7 +11770,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20174,7 +20186,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23560,7 +23572,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25391,7 +25403,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32487,7 +32499,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32503,7 +32515,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32533,7 +32545,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36633,7 +36645,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36894,7 +36906,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37008,6 +37020,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39705,7 +39763,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39717,7 +39781,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57471,7 +57536,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60362,8 +60427,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63986,13 +64051,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64004,13 +64070,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70896,7 +70963,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70981,6 +71052,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/lv.po b/doc/translations/lv.po
index 9faf7fd017..1f63bf69bb 100644
--- a/doc/translations/lv.po
+++ b/doc/translations/lv.po
@@ -862,7 +862,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7699,8 +7706,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11768,7 +11775,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20179,7 +20191,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23568,7 +23580,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25399,7 +25411,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32495,7 +32507,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32511,7 +32523,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32541,7 +32553,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36641,7 +36653,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36902,7 +36914,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37016,6 +37028,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39713,7 +39771,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39725,7 +39789,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57479,7 +57544,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60370,8 +60435,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63994,13 +64059,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64012,13 +64078,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70904,7 +70971,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70989,6 +71060,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/mr.po b/doc/translations/mr.po
index c989fcc549..32832a4d8f 100644
--- a/doc/translations/mr.po
+++ b/doc/translations/mr.po
@@ -845,7 +845,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7682,8 +7689,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11751,7 +11758,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20162,7 +20174,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23548,7 +23560,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25379,7 +25391,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32475,7 +32487,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32491,7 +32503,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32521,7 +32533,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36621,7 +36633,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36882,7 +36894,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36996,6 +37008,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39693,7 +39751,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39705,7 +39769,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57459,7 +57524,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60350,8 +60415,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63974,13 +64039,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63992,13 +64058,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70884,7 +70951,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70969,6 +71040,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/nb.po b/doc/translations/nb.po
index 8017f4006b..42dca83c45 100644
--- a/doc/translations/nb.po
+++ b/doc/translations/nb.po
@@ -857,7 +857,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7694,8 +7701,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11763,7 +11770,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20174,7 +20186,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23560,7 +23572,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25391,7 +25403,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32487,7 +32499,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32503,7 +32515,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32533,7 +32545,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36633,7 +36645,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36894,7 +36906,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37008,6 +37020,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39705,7 +39763,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39717,7 +39781,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57471,7 +57536,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60362,8 +60427,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63986,13 +64051,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64004,13 +64070,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70896,7 +70963,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70981,6 +71052,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ne.po b/doc/translations/ne.po
index 9a17a51fb6..0ba02ba939 100644
--- a/doc/translations/ne.po
+++ b/doc/translations/ne.po
@@ -845,7 +845,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7682,8 +7689,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11751,7 +11758,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20162,7 +20174,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23548,7 +23560,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25379,7 +25391,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32475,7 +32487,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32491,7 +32503,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32521,7 +32533,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36621,7 +36633,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36882,7 +36894,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36996,6 +37008,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39693,7 +39751,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39705,7 +39769,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57459,7 +57524,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60350,8 +60415,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63974,13 +64039,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63992,13 +64058,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70884,7 +70951,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70969,6 +71040,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index d36175b6c2..3053cadb2b 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -906,7 +906,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7751,8 +7758,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11820,7 +11827,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20231,7 +20243,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23620,7 +23632,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25451,7 +25463,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32547,7 +32559,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32563,7 +32575,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32593,7 +32605,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36693,7 +36705,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36954,7 +36966,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37068,6 +37080,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39765,7 +39823,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39777,7 +39841,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57532,7 +57597,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60423,8 +60488,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64047,13 +64112,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64065,13 +64131,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70957,7 +71024,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71042,6 +71113,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index 343dfb0050..729b6a654c 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -1279,8 +1279,22 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "Jak [method print], ale wypisuje tylko w trybie debugowania."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
+"Wypisuje zrzut stosu w miejscu kodu, działa tylko przy uruchamianiu z "
+"włączonym debuggerem.\n"
+"Wynik w konsoli wyglądać może tak:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8189,8 +8203,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12262,7 +12276,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20703,7 +20722,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24102,7 +24121,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25939,7 +25958,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33076,7 +33095,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33092,7 +33111,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33125,7 +33144,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37281,7 +37300,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37545,7 +37564,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37664,6 +37683,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40361,7 +40426,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40373,7 +40444,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58195,7 +58267,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61097,8 +61169,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64744,13 +64816,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64762,13 +64835,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71696,11 +71770,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
-"Jeśli [code]true[/code], potomne węzły są sortowane. W innym przypadku jest "
-"wyłączone."
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -71784,6 +71859,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/pt.po b/doc/translations/pt.po
index fdb01b1579..c99a8e1cd6 100644
--- a/doc/translations/pt.po
+++ b/doc/translations/pt.po
@@ -1340,9 +1340,22 @@ msgstr ""
"rastreamento de pilha quando um erro ou aviso é impresso ."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Igual [method print], mas só imprime quando usado em modo de depuração."
+"Imprime a pilha de chamadas no local do código, só funciona com o depurador "
+"ativado.\n"
+"Saída no console vai parecer assim:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8506,8 +8519,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12580,7 +12593,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -21038,7 +21056,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24434,7 +24452,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -26271,7 +26289,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33383,7 +33401,7 @@ msgstr "A altura do cilindro."
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33399,7 +33417,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33430,7 +33448,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37559,7 +37577,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37824,7 +37842,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37942,6 +37960,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40639,7 +40703,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40651,7 +40721,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58499,7 +58570,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61396,8 +61467,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -65035,13 +65106,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -65053,13 +65125,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71954,7 +72027,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -72039,6 +72116,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index 50d4359c46..74758850c7 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -1368,9 +1368,22 @@ msgstr ""
"rastreamento de pilha quando um erro ou aviso é impresso ."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"Igual [method print], mas só imprime quando usado em modo de depuração."
+"Imprime a pilha de chamadas no local do código, só funciona com o depurador "
+"habilitado.\n"
+"Saída no console vai parecer assim:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8742,8 +8755,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12820,7 +12833,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -21332,7 +21350,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24735,7 +24753,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -26574,7 +26592,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33720,7 +33738,7 @@ msgstr "A altura do cilindro."
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33736,7 +33754,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33769,7 +33787,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37925,7 +37943,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -38191,7 +38209,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -38310,6 +38328,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -41007,7 +41071,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -41019,7 +41089,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58868,7 +58939,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61780,8 +61851,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -65433,13 +65504,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -65451,13 +65523,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -72389,11 +72462,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
-"Se [code]true[/code], os nós filhos são organizados, do contrário, a "
-"organização é desabilitada."
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -72477,6 +72551,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index 8c7112f102..332dbd0801 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -873,7 +873,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7714,8 +7721,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11783,7 +11790,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20194,7 +20206,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23583,7 +23595,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25414,7 +25426,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32510,7 +32522,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32526,7 +32538,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32556,7 +32568,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36656,7 +36668,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36917,7 +36929,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37032,6 +37044,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39729,7 +39787,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39741,7 +39805,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57495,7 +57560,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60386,8 +60451,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64010,13 +64075,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64028,13 +64094,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70920,7 +70987,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71005,6 +71076,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index 1596ca8553..985198198a 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -1402,8 +1402,21 @@ msgstr ""
"траÑÑировка Ñтека при печати ошибки или предупреждениÑ."
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "Как [method print], но печатает только в режиме отладки."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
+"Печатает трек Ñтека вызовов, работает только еÑли включён отладчик.\n"
+"Вывод в конÑоли будет выглÑдеть примерно так:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -9352,8 +9365,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -13447,7 +13460,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -22008,7 +22026,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -25419,7 +25437,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -27259,7 +27277,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -34416,7 +34434,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -34432,7 +34450,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -34465,7 +34483,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -38625,7 +38643,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -38890,7 +38908,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -39022,6 +39040,53 @@ msgstr ""
msgid "Control activation of this server."
msgstr "Управление активацией данного Ñервера."
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "Возвращает длину вектора."
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
#, fuzzy
msgid ""
@@ -41794,7 +41859,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -41806,7 +41877,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -59734,7 +59806,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -62675,8 +62747,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -66352,15 +66424,16 @@ msgstr ""
#: doc/classes/TreeItem.xml
#, fuzzy
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
"Возвращает поÑледний Ñлемент маÑÑива, или[code]null[/code] еÑли маÑÑив "
"пуÑтой."
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -66373,15 +66446,16 @@ msgstr ""
#: doc/classes/TreeItem.xml
#, fuzzy
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
"Возвращает первый Ñлемент в маÑÑиве, или [code]null[/code] еÑли маÑÑив "
"пуÑтой."
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -73453,9 +73527,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "ЕÑли [code]true[/code], текÑтура будет центрирована."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -73539,6 +73616,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/sk.po b/doc/translations/sk.po
index 38e701eef9..ddcdeb10f1 100644
--- a/doc/translations/sk.po
+++ b/doc/translations/sk.po
@@ -848,7 +848,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7685,8 +7692,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11754,7 +11761,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20165,7 +20177,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23554,7 +23566,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25385,7 +25397,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32481,7 +32493,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32497,7 +32509,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32527,7 +32539,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36627,7 +36639,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36888,7 +36900,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37002,6 +37014,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39699,7 +39757,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39711,7 +39775,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57465,7 +57530,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60356,8 +60421,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63980,13 +64045,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63998,13 +64064,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70890,7 +70957,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70975,6 +71046,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index 3984d209f4..6a336f195b 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -859,7 +859,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7696,8 +7703,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11765,7 +11772,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20176,7 +20188,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23565,7 +23577,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25396,7 +25408,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32492,7 +32504,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32508,7 +32520,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32538,7 +32550,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36638,7 +36650,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36899,7 +36911,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37013,6 +37025,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39710,7 +39768,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39722,7 +39786,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57476,7 +57541,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60367,8 +60432,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63991,13 +64056,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64009,13 +64075,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70901,7 +70968,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70986,6 +71057,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/sv.po b/doc/translations/sv.po
index 9be24493d7..b582952401 100644
--- a/doc/translations/sv.po
+++ b/doc/translations/sv.po
@@ -6,12 +6,13 @@
# Christoffer Sundbom <christoffer_karlsson@live.se>, 2021.
# Kent Jofur <kent.jofur@gmail.com>, 2021.
# Alex25820 <alexs25820@gmail.com>, 2021.
+# Björn Åkesson <bjorn.akesson@gmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2021-12-19 17:31+0000\n"
-"Last-Translator: Alex25820 <alexs25820@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:56+0000\n"
+"Last-Translator: Björn Åkesson <bjorn.akesson@gmail.com>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/sv/>\n"
"Language: sv\n"
@@ -19,7 +20,7 @@ msgstr ""
"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.10\n"
+"X-Generator: Weblate 4.14-dev\n"
#: doc/tools/make_rst.py
msgid "Description"
@@ -92,7 +93,7 @@ msgstr ""
#: doc/tools/make_rst.py
msgid "Getter"
-msgstr ""
+msgstr "Getter"
#: doc/tools/make_rst.py
msgid ""
@@ -848,7 +849,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7685,8 +7693,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11754,7 +11762,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20165,7 +20178,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23551,7 +23564,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25382,7 +25395,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32478,7 +32491,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32494,7 +32507,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32524,7 +32537,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36624,7 +36637,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36885,7 +36898,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -36999,6 +37012,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -37553,7 +37612,7 @@ msgstr ""
#: doc/classes/Node.xml
msgid "Nodes and Scenes"
-msgstr ""
+msgstr "Noder och scener"
#: doc/classes/Node.xml
msgid "All Demos"
@@ -39696,7 +39755,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39708,7 +39773,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57462,7 +57528,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60353,8 +60419,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -63977,13 +64043,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -63995,13 +64062,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -70887,7 +70955,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -70972,6 +71044,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/th.po b/doc/translations/th.po
index dabf3c09f3..3b8c2afd36 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -933,7 +933,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7790,8 +7797,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11860,7 +11867,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20275,7 +20287,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23665,7 +23677,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25500,7 +25512,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32650,7 +32662,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32666,7 +32678,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32696,7 +32708,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36813,7 +36825,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37074,7 +37086,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37191,6 +37203,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39938,7 +39996,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39950,7 +40014,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57724,7 +57789,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60621,8 +60686,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64246,13 +64311,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64264,13 +64330,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71172,7 +71239,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71257,6 +71328,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/tl.po b/doc/translations/tl.po
index b100d0e612..6fe51a2de6 100644
--- a/doc/translations/tl.po
+++ b/doc/translations/tl.po
@@ -924,7 +924,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7761,8 +7768,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11834,7 +11841,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20248,7 +20260,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23640,7 +23652,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25471,7 +25483,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32573,7 +32585,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32589,7 +32601,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32622,7 +32634,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36737,7 +36749,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -36998,7 +37010,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37112,6 +37124,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39809,7 +39867,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39821,7 +39885,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57578,7 +57643,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60469,8 +60534,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64102,13 +64167,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64120,13 +64186,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71015,7 +71082,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71100,6 +71171,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index dc9d2524b7..ffa15621df 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -20,12 +20,13 @@
# Ramazan Aslan <legendraslan@gmail.com>, 2022.
# paledega <paledega@yandex.ru>, 2022.
# Yekez <yasintonge@gmail.com>, 2022.
+# Deleted User <noreply+46858@weblate.org>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-07-03 00:45+0000\n"
-"Last-Translator: Yekez <yasintonge@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:56+0000\n"
+"Last-Translator: Deleted User <noreply+46858@weblate.org>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot-class-reference/tr/>\n"
"Language: tr\n"
@@ -33,7 +34,7 @@ msgstr ""
"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.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: doc/tools/make_rst.py
msgid "Description"
@@ -96,7 +97,6 @@ msgid "Default"
msgstr "Varsayılan"
#: doc/tools/make_rst.py
-#, fuzzy
msgid "Setter"
msgstr "Ayarlayıcı"
@@ -105,7 +105,6 @@ msgid "value"
msgstr "deÄŸer"
#: doc/tools/make_rst.py
-#, fuzzy
msgid "Getter"
msgstr "Alıcı"
@@ -1315,10 +1314,22 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
-"[method print] yöntemi gibidir fakat yanlız hata ayıklama (debug) modunda "
-"kullanılır."
+"Kod içindeki istiflenme konumunu yazdırır ve yanlızca hata ayıklayıcı "
+"(debugger) açıkken çalışır.\n"
+"Konsoldaki çıktı aşağıdaki gibi bir şey olacaktır.\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8471,8 +8482,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12543,7 +12554,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20978,7 +20994,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24374,7 +24390,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -26215,7 +26231,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -33330,7 +33346,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33346,7 +33362,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33378,7 +33394,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37520,7 +37536,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37784,7 +37800,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37903,6 +37919,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40600,7 +40662,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40612,7 +40680,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58417,7 +58486,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -61318,8 +61387,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64955,13 +65024,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64973,13 +65043,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71895,10 +71966,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
-"Eğer [code]true[/code] ise düğümler sıraya sokulur, yoksa sıraya sokulmaz."
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -71982,6 +72055,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index afedf189b4..b1272c6b3e 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -991,7 +991,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7843,8 +7850,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11916,7 +11923,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20344,7 +20356,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23733,7 +23745,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25570,7 +25582,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32680,7 +32692,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32696,7 +32708,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32726,7 +32738,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36863,7 +36875,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37126,7 +37138,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37244,6 +37256,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39941,7 +39999,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39953,7 +40017,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57742,7 +57807,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60644,8 +60709,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64279,13 +64344,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64297,13 +64363,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71215,7 +71282,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71300,6 +71371,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/vi.po b/doc/translations/vi.po
index ab16aa1782..60ab8769ab 100644
--- a/doc/translations/vi.po
+++ b/doc/translations/vi.po
@@ -1202,8 +1202,15 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "Giống [method print], nhưng chỉ in khi sử dụng trong chế độ gỡ lỗi."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -8138,8 +8145,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12211,7 +12218,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20643,7 +20655,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -24035,7 +24047,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25872,7 +25884,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32980,7 +32992,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32996,7 +33008,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -33027,7 +33039,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -37165,7 +37177,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37429,7 +37441,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37548,6 +37560,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -40245,7 +40303,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -40257,7 +40321,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -58065,7 +58130,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60966,8 +61031,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64603,13 +64668,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64621,13 +64687,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71550,9 +71617,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-#, fuzzy
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "Nếu [code]true[/code], há»a tiết sẽ được căn ở trung tâm."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -71636,6 +71706,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/doc/translations/zh_CN.po b/doc/translations/zh_CN.po
index d2179a01f2..76ea804df5 100644
--- a/doc/translations/zh_CN.po
+++ b/doc/translations/zh_CN.po
@@ -62,7 +62,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine class reference\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2022-07-17 07:14+0000\n"
+"PO-Revision-Date: 2022-07-26 01:54+0000\n"
"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot-class-reference/zh_Hans/>\n"
@@ -645,7 +645,7 @@ msgstr ""
"a = floor(2.99) # a = 2.0\n"
"a = floor(-2.99) # a = -3.0\n"
"[/codeblock]\n"
-"请å‚阅 [method ceil]ã€[method round]ã€[method stepify] å’Œ [int]。\n"
+"å¦è¯·å‚阅 [method ceil]ã€[method round]ã€[method stepify] å’Œ [int]。\n"
"[b]注æ„:[/b]è¯¥æ–¹æ³•è¿”å›žä¸€ä¸ªæµ®ç‚¹æ•°ã€‚å¦‚æžœä½ éœ€è¦æ•´æ•°ï¼Œè€Œ [code]s[/code] 是éžè´Ÿ"
"数,你å¯ä»¥ç›´æŽ¥ä½¿ç”¨ [code]int(s)[/code]。"
@@ -1322,8 +1322,21 @@ msgstr ""
"在打å°é”™è¯¯æˆ–警告时还会显示堆栈跟踪。"
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
-msgstr "与 [method print] 类似,但仅在调试模å¼ä¸‹ä½¿ç”¨æ—¶æ‰æ‰“å°ã€‚"
+#, fuzzy
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
+msgstr ""
+"在代ç ä½ç½®æ‰“å°å †æ ˆè½¨è¿¹ï¼Œä»…在打开调试器的情况下è¿è¡Œã€‚\n"
+"控制å°ä¸­çš„输出如下所示:\n"
+"[codeblock]\n"
+"Frame 0 - res://test.gd:16 in function '_process'\n"
+"[/codeblock]"
#: modules/gdscript/doc_classes/@GDScript.xml
msgid ""
@@ -9568,10 +9581,11 @@ msgstr ""
"åˆ¶å™¨ä¹Ÿå°†ä¿æŒç›¸åŒçš„ ID。"
#: doc/classes/ARVRController.xml
+#, fuzzy
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -12380,6 +12394,10 @@ msgid ""
"name can't be resolved at runtime, it will fall back to [code]\"Master\"[/"
"code]."
msgstr ""
+"这个音频在哪个总线上播放。\n"
+"[b]注æ„:[/b]设置这个属性时,请记ä½å®ƒå¹¶ä¸ä¼šå¯¹ç»™å®šçš„å称是å¦ä¸ŽçŽ°æœ‰æ€»çº¿åŒ¹é…进行"
+"校验。这是因为音频总线布局å¯ä»¥åœ¨è®¾ç½®è¿™ä¸ªå±žæ€§åŽå†åŠ è½½ã€‚å¦‚æžœè¿™ä¸ªç»™å®šçš„å称在è¿"
+"行时无法解æžï¼Œå°±ä¼šå›žé€€åˆ° [code]\"Master\"[/code]。"
#: doc/classes/AudioStreamPlayer.xml
msgid ""
@@ -12580,6 +12598,10 @@ msgid ""
"name can't be resolved at runtime, it will fall back to [code]\"Master\"[/"
"code]."
msgstr ""
+"播放音频的总线。\n"
+"[b]注æ„:[/b]设置这个属性时,请记ä½å®ƒå¹¶ä¸ä¼šå¯¹ç»™å®šçš„å称是å¦ä¸ŽçŽ°æœ‰æ€»çº¿åŒ¹é…进行"
+"校验。这是因为音频总线布局å¯ä»¥åœ¨è®¾ç½®è¿™ä¸ªå±žæ€§åŽå†åŠ è½½ã€‚å¦‚æžœè¿™ä¸ªç»™å®šçš„å称在è¿"
+"行时无法解æžï¼Œå°±ä¼šå›žé€€åˆ° [code]\"Master\"[/code]。"
#: doc/classes/AudioStreamPlayer3D.xml
msgid ""
@@ -14560,9 +14582,13 @@ msgstr "æè¿°æ­¤ç›¸æœºæ¸²æŸ“哪些 3D 渲染层的剔除掩ç ã€‚"
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
-"如果为 [code]true[/code],则说明祖级的 [Viewport] 当剿­£åœ¨ä½¿ç”¨è¿™ä¸ªæ‘„åƒå¤´ã€‚"
#: doc/classes/Camera.xml
msgid ""
@@ -25230,10 +25256,11 @@ msgstr ""
"文件管ç†å™¨çš„[b]Export[/b]按钮或[method save_to_file]方法获得。"
#: doc/classes/EditorFeatureProfile.xml
+#, fuzzy
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
"将编辑器的功能é…ç½®ä¿å­˜åˆ°JSONæ ¼å¼çš„æ–‡ä»¶ä¸­ã€‚ç„¶åŽå¯ä»¥ä½¿ç”¨ç‰¹å¾é…置文件管ç†å™¨çš„[b]"
"导入[/b]按钮或[method load_from_file]按钮导入它。"
@@ -29651,9 +29678,10 @@ msgid "The default exposure used for tonemapping."
msgstr "用于色调映射的默认æ›å…‰ã€‚"
#: doc/classes/Environment.xml
+#, fuzzy
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
"è¦ä½¿ç”¨çš„色调映射模å¼ã€‚色调映射是“转æ¢â€HDR 值以适åˆåœ¨ LDR 显示器上呈现的过程。"
@@ -31930,9 +31958,10 @@ msgstr ""
"[b]注æ„:[/b]直线是使用方å‘å‘é‡è€Œä¸æ˜¯ç»ˆç‚¹æŒ‡å®šçš„。"
#: doc/classes/Geometry.xml
+#, fuzzy
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -35784,7 +35813,6 @@ msgid ""
msgstr "å…许的最大é‡å®šå‘数。用于防止无é™é‡å®šå‘循环。"
#: doc/classes/HTTPRequest.xml
-#, fuzzy
msgid ""
"If set to a value greater than [code]0.0[/code] before the request starts, "
"the HTTP request will time out after [code]timeout[/code] seconds have "
@@ -35795,11 +35823,11 @@ msgid ""
"leave this to [code]0.0[/code] to prevent the download from failing if it "
"takes too much time."
msgstr ""
-"如果设为大于 [code]0.0[/code] 的值,在ç»è¿‡ [code]timeout[/code] ç§’ä»æœª[i]完æˆ"
-"[/i]请求时,该 HTTP 请求就会超时。对于 REST API 等较å°çš„ HTTP 请求,将 "
-"[member timeout] 设为大于 [code]0.0[/code] 的值å¯ä»¥å®šæ—¶é˜²æ­¢åº”用程åºåœ¨å¤±è´¥æ—¶é™·"
-"入长时间的无å“应状æ€ã€‚ä¸‹è½½æ–‡ä»¶æ—¶è¯·ä¿æŒ [code]0.0[/code],防止在需è¦èŠ±è´¹è¾ƒé•¿æ—¶"
-"间下载时导致下载失败。"
+"如果在请求开始å‰è®¾ä¸ºå¤§äºŽ [code]0.0[/code] 的值,在ç»è¿‡ [code]timeout[/code] "
+"ç§’ä»æœª[i]完æˆ[/i]请求时,该 HTTP 请求就会超时。对于 REST API 等较å°çš„ HTTP 请"
+"求,将 [member timeout] 设为 [code]10.0[/code] 到 [code]30.0[/code] 之间的值"
+"å¯ä»¥å®šæ—¶é˜²æ­¢åº”用程åºåœ¨å¤±è´¥æ—¶é™·å…¥é•¿æ—¶é—´çš„æ— å“应状æ€ã€‚ä¸‹è½½æ–‡ä»¶æ—¶è¯·ä¿æŒ "
+"[code]0.0[/code],防止在需è¦èŠ±è´¹è¾ƒé•¿æ—¶é—´ä¸‹è½½æ—¶å¯¼è‡´ä¸‹è½½å¤±è´¥ã€‚"
#: doc/classes/HTTPRequest.xml
msgid "If [code]true[/code], multithreading is used to improve performance."
@@ -37641,7 +37669,6 @@ msgid "Controls the mouse mode. See [enum MouseMode] for more information."
msgstr "控制鼠标模å¼ã€‚详情请å‚阅 [enum MouseMode]。"
#: doc/classes/Input.xml
-#, fuzzy
msgid ""
"If [code]true[/code], similar input events sent by the operating system are "
"accumulated. When input accumulation is enabled, all input events generated "
@@ -37663,8 +37690,8 @@ msgstr ""
"输入累积在默认情况下是å¯ç”¨çš„。它å¯ä»¥è¢«ç¦ç”¨ï¼Œå°†ä»¥å¢žåŠ CPU使用率为代价,获得ç¨å¾®"
"æ›´ç²¾ç¡®åŠæ›´çµæ•的输入。在需è¦è‡ªç”±ç»˜åˆ¶çº¿æ¡çš„åº”ç”¨ä¸­ï¼Œä¸€èˆ¬åº”ç”¨åœ¨ç”¨æˆ·ç»˜åˆ¶çº¿æ¡æ—¶ç¦"
"用输入累加,以获得紧跟实际输入的结果。\n"
-"[b]注æ„:[/b]默认[i]ç¦ç”¨[/i]输入累积是出于å‘åŽå…¼å®¹çš„缘故。然而我们推è那些ä¸"
-"需è¦éžå¸¸æ´»è·ƒè¾“入的游æˆå°†å…¶å¯ç”¨ï¼Œèƒ½å¤Ÿé™ä½Ž CPU å ç”¨ã€‚"
+"[b]注æ„:[/b]输入累积是默认[i]å¯ç”¨[/i]的。推è那些ä¸éœ€è¦éžå¸¸æ´»è·ƒè¾“入的游æˆä¿"
+"æŒå¯ç”¨ï¼Œèƒ½å¤Ÿé™ä½Ž CPU å ç”¨ã€‚"
#: doc/classes/Input.xml
msgid "Emitted when a joypad device has been connected or disconnected."
@@ -38390,7 +38417,6 @@ msgid "Input event type for mouse motion events."
msgstr "鼠标移动事件的输入事件类型。"
#: doc/classes/InputEventMouseMotion.xml
-#, fuzzy
msgid ""
"Contains mouse and pen motion information. Supports relative, absolute "
"positions and speed. See [method Node._input].\n"
@@ -38407,9 +38433,11 @@ msgid ""
"avoid visible gaps in lines if the user is moving the mouse quickly."
msgstr ""
"包å«é¼ æ ‡å’Œç¬”çš„è¿åŠ¨ä¿¡æ¯ã€‚支æŒç›¸å¯¹ã€ç»å¯¹ä½ç½®å’Œé€Ÿåº¦ã€‚è§ [method Node._input]。\n"
-"[b]注æ„:[/b]默认情况下,这个事件能够æ¯å¸§å‘出多次,æä¾›æ›´ç²¾ç¡®çš„输入报告,但代"
-"价是更高的 CPU å ç”¨ã€‚ä½ å¯ä»¥å°† [member Input.use_accumulated_input] 设为 "
-"[code]true[/code],将æ¯å¸§ä¸­çš„多个事件åˆå¹¶ä¸ºå•个事件进行å‘é€ã€‚\n"
+"[b]注æ„:[/b]è¿™ä¸ªäº‹ä»¶çš„è¡Œä¸ºå— [member Input.use_accumulated_input] å–值的影"
+"å“。设为 [code]true[/code] 时(默认),从æ“作系统获å–到的鼠标/笔的移动事件会"
+"被åˆå¹¶ï¼Œæ¯ä¸ªæ¸²æŸ“帧最多åªä¼šå‘出一个累积事件。设为 [code]false[/code] 时,收到"
+"几个事件就会å‘å‡ºå‡ ä¸ªäº‹ä»¶ï¼Œå³æ¯ä¸ªæ¸²æŸ“帧å¯èƒ½å‘出多次,能够精确地汇报输入,但代"
+"价是å ç”¨ CPU。\n"
"[b]注æ„:[/b]如果你使用 InputEventMouseMotion æ¥ç”»çº¿ï¼Œè¯·è€ƒè™‘åŒæ—¶å®žçް"
"[url=https://zh.wikipedia.org/zh-cn/"
"%E5%B8%83%E9%9B%B7%E6%A3%AE%E6%BC%A2%E5%A7%86%E7%9B%B4%E7%B7%9A%E6%BC%94%E7%AE%97%E6%B3%95]"
@@ -38420,13 +38448,12 @@ msgid "Mouse and input coordinates"
msgstr "é¼ æ ‡å’Œè¾“å…¥åæ ‡"
#: doc/classes/InputEventMouseMotion.xml
-#, fuzzy
msgid ""
"Returns [code]true[/code] when using the eraser end of a stylus pen.\n"
"[b]Note:[/b] This property is implemented on Linux, macOS and Windows."
msgstr ""
-"返回键盘布局的数é‡ã€‚\n"
-"[b]注æ„:[/b]本方法在Linuxã€macOSå’ŒWindows上实现。"
+"使用手写笔的橡皮端时,返回 [code]true[/code]。\n"
+"[b]注æ„:[/b]这个属性在 Linuxã€macOS å’Œ Windows 上实现。"
#: doc/classes/InputEventMouseMotion.xml
msgid ""
@@ -40989,10 +41016,11 @@ msgid "The tint of [Font]'s outline."
msgstr "对 [Font] 轮廓的染色。"
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -41010,10 +41038,11 @@ msgid "The size of one pixel's width on the label to scale it in 3D."
msgstr "标签上一个åƒç´ å®½åº¦çš„大å°ï¼Œä»¥ 3D 缩放。"
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -41048,8 +41077,9 @@ msgid "If set, lights in the environment affect the label."
msgstr "如果打开,环境中的ç¯å…‰ä¼šå½±å“该标签。"
#: doc/classes/Label3D.xml
+#, fuzzy
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr "如果打开,从åŽé¢ä¹Ÿå¯ä»¥çœ‹åˆ°æ–‡æœ¬ï¼Œå¦‚æžœä¸æ‰“开,从åŽé¢çœ‹å®ƒæ˜¯ä¸å¯è§çš„。"
@@ -46047,6 +46077,7 @@ msgid "An instance of a [NavigationMesh]."
msgstr "[NavigationMesh] 的一个实例。"
#: doc/classes/NavigationMeshInstance.xml
+#, fuzzy
msgid ""
"An instance of a [NavigationMesh]. It tells the [Navigation] node what can "
"be navigated and what cannot, based on the [NavigationMesh] resource.\n"
@@ -46060,7 +46091,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -46384,6 +46415,7 @@ msgid "A region of the 2D navigation map."
msgstr "2D 导航地图上的一个地区。"
#: doc/classes/NavigationPolygonInstance.xml
+#, fuzzy
msgid ""
"A region of the navigation map. It tells the [Navigation2DServer] what can "
"be navigated and what cannot, based on its [NavigationPolygon] resource.\n"
@@ -46397,7 +46429,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -46551,6 +46583,54 @@ msgstr ""
msgid "Control activation of this server."
msgstr "控制这个æœåŠ¡å™¨æ˜¯å¦æ¿€æ´»ã€‚"
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr "返回连接的当å‰çжæ€ã€‚è§ [enum ConnectionStatus]。"
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+#, fuzzy
+msgid "Set the max packet size that this peer can handle."
+msgstr "设置该实例使用的光照图。"
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -50248,8 +50328,14 @@ msgid "See [enum ShadowDetail]."
msgstr "è§ [enum ShadowDetail]。"
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
-msgstr "è§ [enum ShadowMode]。"
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
+msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
@@ -50259,9 +50345,11 @@ msgstr ""
"é˜´å½±è¢«æ¸²æŸ“åˆ°ä¸€ä¸ªåŒæŠ›ç‰©é¢çº¹ç†ã€‚比 [constant SHADOW_CUBE] 更快,但质é‡è¾ƒå·®ã€‚"
#: doc/classes/OmniLight.xml
+#, fuzzy
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
"阴影被渲染æˆä¸€ä¸ªç«‹æ–¹ä½“贴图。比 [constant SHADOW_DUAL_PARABOLOID] æ…¢ï¼Œä½†è´¨é‡æ›´"
"高。"
@@ -57224,9 +57312,8 @@ msgstr "改å˜ç»™å®šç´¢å¼•处的字节。"
#: doc/classes/PoolIntArray.xml doc/classes/PoolRealArray.xml
#: doc/classes/PoolStringArray.xml doc/classes/PoolVector2Array.xml
#: doc/classes/PoolVector3Array.xml
-#, fuzzy
msgid "Sorts the elements of the array in ascending order."
-msgstr "从数组中删除ä½äºŽç´¢å¼•的元素。"
+msgstr "将该数组中的元素按å‡åºæŽ’列。"
#: doc/classes/PoolByteArray.xml
msgid ""
@@ -63789,14 +63876,14 @@ msgid ""
"Generates a pseudo-random float between [code]0.0[/code] and [code]1.0[/"
"code] (inclusive)."
msgstr ""
-"产生一个[code]0.0[/code]å’Œ[code]1.0[/code]ï¼ˆåŒ…æ‹¬ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœºæµ®ç‚¹æ•°ã€‚"
+"生æˆä¸€ä¸ª[code]0.0[/code]å’Œ[code]1.0[/code]ï¼ˆåŒ…æ‹¬ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœºæµ®ç‚¹æ•°ã€‚"
#: doc/classes/RandomNumberGenerator.xml
msgid ""
"Generates a pseudo-random float between [code]from[/code] and [code]to[/"
"code] (inclusive)."
msgstr ""
-"产生一个[code]from[/code]å’Œ[code]to[/code]ï¼ˆåŒ…æ‹¬ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœºæµ®ç‚¹æ•°ã€‚"
+"生æˆä¸€ä¸ª[code]from[/code]å’Œ[code]to[/code]ï¼ˆåŒ…æ‹¬ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœºæµ®ç‚¹æ•°ã€‚"
#: doc/classes/RandomNumberGenerator.xml
msgid ""
@@ -63805,8 +63892,8 @@ msgid ""
"specified [code]mean[/code] and a standard [code]deviation[/code]. This is "
"also called Gaussian distribution."
msgstr ""
-"产生一个[url=https://en.wikipedia.org/wiki/Normal_distribution]æ­£æ€åˆ†å¸ƒ[/url]"
-"çš„ä¼ªéšæœºæ•°ï¼Œä½¿ç”¨Box-Mullerå˜æ¢ï¼Œå…·æœ‰æŒ‡å®šçš„[code]mean[/code]和标准"
+"生æˆä¸€ä¸ª[url=https://en.wikipedia.org/wiki/Normal_distribution]æ­£æ€åˆ†å¸ƒ[/url]"
+"çš„ä¼ªéšæœºæ•°ï¼Œä½¿ç”¨ Box-Muller å˜æ¢ï¼Œå…·æœ‰æŒ‡å®šçš„ [code]mean[/code] 和标准 "
"[code]deviation[/code]。这也被称为高斯分布。"
#: doc/classes/RandomNumberGenerator.xml
@@ -63814,16 +63901,16 @@ msgid ""
"Generates a pseudo-random 32-bit unsigned integer between [code]0[/code] and "
"[code]4294967295[/code] (inclusive)."
msgstr ""
-"产生一个[code]0[/code]å’Œ[code]4294967295[/code](å«ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœº32使— ç¬¦"
-"å·æ•´æ•°ã€‚"
+"生æˆä¸€ä¸ª [code]0[/code] å’Œ [code]4294967295[/code](å«ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœº 32 "
+"使— ç¬¦å·æ•´æ•°ã€‚"
#: doc/classes/RandomNumberGenerator.xml
msgid ""
"Generates a pseudo-random 32-bit signed integer between [code]from[/code] "
"and [code]to[/code] (inclusive)."
msgstr ""
-"产生一个[code]to[/code]å’Œ[code]from[/code](å«ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœº32使œ‰ç¬¦å·æ•´"
-"数。"
+"生æˆä¸€ä¸ª [code]to[/code] å’Œ [code]from[/code](å«ç«¯ç‚¹ï¼‰ä¹‹é—´çš„ä¼ªéšæœº 32 使œ‰ç¬¦"
+"å·æ•´æ•°ã€‚"
#: doc/classes/RandomNumberGenerator.xml
msgid "Setups a time-based seed to generator."
@@ -63926,20 +64013,20 @@ msgstr "使该 [Range] åœæ­¢ä¸Žä»»ä½•å…¶ä»– Range 共享其æˆå‘˜å˜é‡ã€‚"
#: doc/classes/Range.xml
msgid ""
"If [code]true[/code], [member value] may be greater than [member max_value]."
-msgstr "如果为 [code]true[/code],[member value]å¯èƒ½å¤§äºŽ[member max_value]。"
+msgstr "如果为 [code]true[/code],[member value] å¯èƒ½å¤§äºŽ [member max_value]。"
#: doc/classes/Range.xml
msgid ""
"If [code]true[/code], [member value] may be less than [member min_value]."
-msgstr "如果为 [code]true[/code],[member value]å¯èƒ½å°äºŽ[member min_value]。"
+msgstr "如果为 [code]true[/code],[member value] å¯èƒ½å°äºŽ [member min_value]。"
#: doc/classes/Range.xml
msgid ""
"If [code]true[/code], and [code]min_value[/code] is greater than 0, "
"[code]value[/code] will be represented exponentially rather than linearly."
msgstr ""
-"如果为 [code]true[/code],并且[code]min_value[/code]大于0,[code]value[/code]"
-"将以指数方å¼è€Œä¸æ˜¯çº¿æ€§æ–¹å¼è¡¨ç¤ºã€‚"
+"如果为 [code]true[/code],并且 [code]min_value[/code] 大于 0,[code]value[/"
+"code] 将以指数方å¼è€Œä¸æ˜¯çº¿æ€§æ–¹å¼è¡¨ç¤ºã€‚"
#: doc/classes/Range.xml
msgid ""
@@ -63961,12 +64048,12 @@ msgid ""
"multiplied by [code]page[/code] over the difference between [code]min_value[/"
"code] and [code]max_value[/code]."
msgstr ""
-"页é¢å¤§å°ã€‚主è¦ç”¨äºŽ[ScrollBar]。ScrollBar的长度是它的尺寸乘以[code]page[/code]"
-"超过[code]min_value[/code]和[code]max_value[/code]之间的差值。"
+"页é¢å¤§å°ã€‚主è¦ç”¨äºŽ [ScrollBar]。ScrollBar 的长度是它的尺寸乘以 [code]page[/"
+"code] 超过 [code]min_value[/code] 和 [code]max_value[/code] 之间的差值。"
#: doc/classes/Range.xml
msgid "The value mapped between 0 and 1."
-msgstr "该值在0和1之间进行映射。"
+msgstr "该值在 0 和 1 之间进行映射。"
#: doc/classes/Range.xml
msgid ""
@@ -63982,9 +64069,9 @@ msgid ""
"[code]value[/code] will first be rounded to a multiple of [code]step[/code] "
"then rounded to the nearest integer."
msgstr ""
-"如果大于0,[code]value[/code]将总是被四èˆäº”入为[code]step[/code]çš„å€æ•°ã€‚如果"
-"[code]rounded[/code]也是[code]true[/code],[code]value[/code]将首先被四èˆäº”å…¥"
-"为[code]step[/code]çš„å€æ•°ï¼Œç„¶åŽèˆå…¥ä¸ºæœ€è¿‘的整数。"
+"如果大于 0,[code]value[/code] 将总是被四èˆäº”入为 [code]step[/code] çš„å€æ•°ã€‚"
+"如果 [code]rounded[/code] 也是 [code]true[/code],[code]value[/code] 将首先被"
+"å››èˆäº”入为 [code]step[/code] çš„å€æ•°ï¼Œç„¶åŽèˆå…¥ä¸ºæœ€è¿‘的整数。"
#: doc/classes/Range.xml
msgid "Range's current value."
@@ -63995,8 +64082,8 @@ msgid ""
"Emitted when [member min_value], [member max_value], [member page], or "
"[member step] change."
msgstr ""
-"在 [member min_value], [member max_value], [member page], 或 [member step] 改"
-"å˜æ—¶é‡Šæ”¾ä¿¡å·ã€‚"
+"在 [member min_value]ã€[member max_value]ã€[member page]ã€[member step] 改å˜"
+"时释放信å·ã€‚"
#: doc/classes/Range.xml
msgid ""
@@ -64039,12 +64126,12 @@ msgstr ""
"以便找到沿光线路径最近的对象。\n"
"RayCast å¯ä»¥å¿½ç•¥æŸäº›å¯¹è±¡ï¼Œæ–¹æ³•是通过 [code]add_exception[/code] 将它们添加到"
"例外列表中,或者通过使用碰撞层和掩ç è®¾ç½®ï¼Œè¿›è¡Œé€‚当的过滤。\n"
-"RayCast å¯ä»¥é…置为报告与 [Area]([member collide_with_areas]) å’Œ/或 "
-"[PhysicsBody]([member collide_with_bodies]) 的碰撞。\n"
+"RayCast å¯ä»¥é…置为报告与 [Area]([member collide_with_areas])和/或 "
+"[PhysicsBody]([member collide_with_bodies])的碰撞。\n"
"åªæœ‰å¯ç”¨çš„光线投射æ‰èƒ½æ£€æµ‹ç©ºé—´å¹¶æŠ¥å‘Šç¢°æ’žã€‚\n"
-"RayCast 计算æ¯ä¸ªç‰©ç†å¸§çš„交集(å‚阅 [Node]),并将结果缓存起æ¥ï¼Œä»¥ä¾¿ç¨åŽä½¿ç”¨ï¼Œ"
-"直到下一帧。如果物ç†å¸§ä¹‹é—´ï¼ˆæˆ–åŒä¸€å¸§æœŸé—´ï¼‰éœ€è¦å¤šæ¬¡æ£€æµ‹ï¼Œè¯·åœ¨è°ƒæ•´å…‰çº¿æŠ•å°„åŽä½¿"
-"用[method force_raycast_update]。"
+"RayCast 计算æ¯ä¸ªç‰©ç†å¸§çš„äº¤é›†ï¼ˆè§ [Node]),并将结果缓存起æ¥ï¼Œä»¥ä¾¿ç¨åŽä½¿ç”¨ï¼Œç›´"
+"到下一帧。如果物ç†å¸§ä¹‹é—´ï¼ˆæˆ–åŒä¸€å¸§æœŸé—´ï¼‰éœ€è¦å¤šæ¬¡æ£€æµ‹ï¼Œè¯·åœ¨è°ƒæ•´å…‰çº¿æŠ•å°„åŽä½¿ç”¨ "
+"[method force_raycast_update]。"
#: doc/classes/RayCast.xml doc/classes/RayCast2D.xml
msgid ""
@@ -64072,7 +64159,7 @@ msgid ""
msgstr ""
"更新射线的碰撞信æ¯ã€‚ä½¿ç”¨æ­¤æ–¹æ³•ç«‹å³æ›´æ–°ç¢°æ’žä¿¡æ¯ï¼Œè€Œä¸æ˜¯ç­‰å¾…下一次 "
"[code]_physics_process[/code] 调用,例如,如果光线或其父级已更改状æ€ã€‚\n"
-"[b]注æ„:[/b][code]enabled[/code]ä¸éœ€è¦æ­¤åŠŸèƒ½ã€‚"
+"[b]注æ„:[/b][code]enabled[/code] ä¸éœ€è¦æ­¤åŠŸèƒ½ã€‚"
#: doc/classes/RayCast.xml doc/classes/RayCast2D.xml
msgid ""
@@ -64098,7 +64185,7 @@ msgid ""
"[b]Note:[/b] Bit indices range from 0-19."
msgstr ""
"如果通过的ä½ç´¢å¼•被打开,则返回 [code]true[/code]。\n"
-"[b]注æ„:[/b]使Œ‡æ•°èŒƒå›´ä¸º0-19。"
+"[b]注æ„:[/b]使Œ‡æ•°èŒƒå›´ä¸º 0-19。"
#: doc/classes/RayCast.xml doc/classes/RayCast2D.xml
msgid ""
@@ -64136,8 +64223,8 @@ msgid ""
"Sets the bit index passed to the [code]value[/code] passed.\n"
"[b]Note:[/b] Bit indexes range from 0-19."
msgstr ""
-"将传递的ä½ç´¢å¼•设置为传递的[code]值[/code]。\n"
-"[b]注æ„:[/b]ä½ç´¢å¼•的范围是0-19。"
+"将传递的ä½ç´¢å¼•设置为传递的 [code]value[/code]。\n"
+"[b]注æ„:[/b]ä½ç´¢å¼•的范围是 0-19。"
#: doc/classes/RayCast.xml doc/classes/RayCast2D.xml
msgid ""
@@ -64172,9 +64259,9 @@ msgid ""
"If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in "
"[member ProjectSettings.debug/shapes/collision/shape_color] is used."
msgstr ""
-"如果在 [b]Debug[/b] èœå•中å¯ç”¨äº†å¯è§ç¢°æ’žå½¢çж [b]Visible Collision Shapes[/"
-"b],则å¯ç”¨äºŽåœ¨ç¼–辑器中和è¿è¡Œæ—¶ç»˜åˆ¶å½¢çŠ¶çš„è‡ªå®šä¹‰é¢œè‰²ã€‚å¦‚æžœ [RayCast] 与æŸç‰©ä½“å‘"
-"生碰撞,此颜色将在è¿è¡Œæ—¶çªå‡ºæ˜¾ç¤ºã€‚\n"
+"如果在[b]调试[/b]èœå•中å¯ç”¨äº†[b]显示碰撞区域[/b],则å¯ç”¨äºŽåœ¨ç¼–辑器中和è¿è¡Œæ—¶"
+"绘制形状的自定义颜色。如果 [RayCast] 与æŸç‰©ä½“å‘生碰撞,此颜色将在è¿è¡Œæ—¶çªå‡ºæ˜¾"
+"示。\n"
"如果设置为 [code]Color(0.0, 0.0, 0.0)[/code](默认),则使用 [member "
"ProjectSettings.debug/shapes/collision/shape_color] 中设置的颜色。"
@@ -64186,8 +64273,8 @@ msgid ""
"shape to be visible at run-time."
msgstr ""
"如果设置为 [code]1[/code],则将一æ¡çº¿ç”¨ä½œè°ƒè¯•形状。å¦åˆ™ï¼Œå°†ç»˜åˆ¶ä¸€ä¸ªæˆªæ–­çš„金字"
-"å¡”æ¥è¡¨ç¤º [RayCast]。需è¦åœ¨ [b]调试[/b] èœå•中å¯ç”¨å¯è§ç¢°æ’žå½¢çж [b]Visible "
-"Collision Shapes[/b],以便调试形状在è¿è¡Œæ—¶å¯è§ã€‚"
+"å¡”æ¥è¡¨ç¤º [RayCast]。需è¦åœ¨[b]调试[/b]èœå•中å¯ç”¨[b]显示碰撞区域[/b],以便调试"
+"形状在è¿è¡Œæ—¶å¯è§ã€‚"
#: doc/classes/RayCast.xml doc/classes/RayCast2D.xml
msgid "If [code]true[/code], collisions will be reported."
@@ -64259,9 +64346,9 @@ msgid ""
"itself from whatever is touching its far endpoint. It's often useful for "
"characters."
msgstr ""
-"用于3D碰撞的射线形状,它å¯ä»¥è¢«è®¾ç½®æˆä¸€ä¸ª[PhysicsBody]或[Area]。一æ¡å°„çº¿å¹¶ä¸æ˜¯"
-"真正的碰撞体;然而,它试图将自己与其远端点接触的东西分开。这通常对角色很有"
-"用。"
+"用于 3D 碰撞的射线形状,它å¯ä»¥è¢«è®¾ç½®æˆä¸€ä¸ª [PhysicsBody] 或 [Area]。一æ¡å°„线"
+"并䏿˜¯çœŸæ­£çš„碰撞体;然而,它试图将自己与其远端点接触的东西分开。这通常对角色"
+"很有用。"
#: doc/classes/RayShape.xml doc/classes/RayShape2D.xml
msgid "The ray's length."
@@ -64301,11 +64388,11 @@ msgstr ""
#: doc/classes/Rect2.xml
msgid "Constructs a [Rect2] by position and size."
-msgstr "按ä½ç½®å’Œå¤§å°æž„造一个[Rect2]。"
+msgstr "按ä½ç½®å’Œå¤§å°æž„造一个 [Rect2]。"
#: doc/classes/Rect2.xml
msgid "Constructs a [Rect2] by x, y, width, and height."
-msgstr "通过xã€yã€å®½åº¦å’Œé«˜åº¦æž„造一个[Rect2]。"
+msgstr "通过 xã€yã€å®½åº¦å’Œé«˜åº¦æž„造一个 [Rect2]。"
#: doc/classes/Rect2.xml
msgid ""
@@ -68818,7 +68905,6 @@ msgid ""
msgstr "返回该 [SceneTreeTween] ç›®å‰æ˜¯å¦æ­£åœ¨æ‰§è¡Œï¼Œå³æœªæš‚åœä¸”未完æˆã€‚"
#: doc/classes/SceneTreeTween.xml
-#, fuzzy
msgid ""
"Returns whether the [SceneTreeTween] is valid. A valid [SceneTreeTween] is a "
"[SceneTreeTween] contained by the scene tree (i.e. the array from [method "
@@ -68832,7 +68918,7 @@ msgstr ""
"[SceneTreeTween]ï¼ˆå³ [method SceneTree.get_processed_tweens] 返回的数组中包å«"
"这个 [SceneTreeTween])。[SceneTreeTween] 失效的情况有:补间完æˆã€è¢«é”€æ¯ã€ä½¿"
"用 [code]SceneTreeTween.new()[/code] 创建。无效的 [SceneTreeTween] ä¸èƒ½è¿½åŠ  "
-"[Tweener]。"
+"[Tweener]。但你ä»ç„¶èƒ½å¤Ÿä½¿ç”¨ [method interpolate_value]。"
#: doc/classes/SceneTreeTween.xml
msgid "Aborts all tweening operations and invalidates the [SceneTreeTween]."
@@ -68879,7 +68965,6 @@ msgstr ""
"的默认缓动类型。"
#: doc/classes/SceneTreeTween.xml
-#, fuzzy
msgid ""
"Sets the number of times the tweening sequence will be repeated, i.e. "
"[code]set_loops(2)[/code] will run the animation twice.\n"
@@ -70738,13 +70823,13 @@ msgstr "å¯ç”¨æ­¤èŠ‚ç‚¹çš„å‘ˆçŽ°ã€‚å°† [member visible] 更改为 [code]true[/co
msgid ""
"Transforms [code]local_point[/code] from this node's local space to world "
"space."
-msgstr "å°† [code]local_point[/code] 从该节点的本地空间转æ¢ä¸ºä¸–界空间。"
+msgstr "å°† [code]local_point[/code] 从这个节点的局部空间转æ¢ä¸ºä¸–界空间。"
#: doc/classes/Spatial.xml
msgid ""
"Transforms [code]global_point[/code] from world space to this node's local "
"space."
-msgstr "å°† [code]global_point[/code] 从世界空间转æ¢åˆ°è¿™ä¸ªèŠ‚ç‚¹çš„æœ¬åœ°ç©ºé—´ã€‚"
+msgstr "å°† [code]global_point[/code] 从世界空间转æ¢åˆ°è¿™ä¸ªèŠ‚ç‚¹çš„å±€éƒ¨ç©ºé—´ã€‚"
#: doc/classes/Spatial.xml
msgid ""
@@ -70754,7 +70839,7 @@ msgid ""
"offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) "
"to the X coordinate."
msgstr ""
-"通过给定的åç§»é‡ [Vector3] 改å˜èŠ‚ç‚¹çš„ä½ç½®ã€‚\n"
+"通过给定的åç§»é‡ [Vector3] 改å˜è¯¥èŠ‚ç‚¹çš„ä½ç½®ã€‚\n"
"注æ„,平移 [code]offset[/code] å—节点缩放的影å“,所以如果按例如 [code]"
"(10,1,1)[/code] 进行缩放,平移 [code](2,0,0)[/code] 实际上会在 X åæ ‡ä¸Šå¢žåŠ  "
"20 ([code]2 * 10[/code])。"
@@ -70762,22 +70847,21 @@ msgstr ""
#: doc/classes/Spatial.xml
msgid ""
"Changes the node's position by the given offset [Vector3] in local space."
-msgstr "通过给定的åç§»é‡ [Vector3] 改å˜èŠ‚ç‚¹åœ¨å±€éƒ¨ç©ºé—´ä¸­çš„ä½ç½®ã€‚"
+msgstr "通过给定的局部空间åç§»é‡ [Vector3] 改å˜è¯¥èŠ‚ç‚¹çš„ä½ç½®ã€‚"
#: doc/classes/Spatial.xml
msgid "Updates the [SpatialGizmo] of this node."
-msgstr "更新该节点的 [SpatialGizmo]。"
+msgstr "更新这个节点的 [SpatialGizmo]。"
#: doc/classes/Spatial.xml
msgid ""
"The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] "
"as custom visualization and editing handles in Editor."
msgstr ""
-"此节点的 [SpatialGizmo]。例如在 [EditorSpatialGizmo] 中用作编辑器中的自定义å¯"
-"视化和编辑手柄。"
+"这个节点的 [SpatialGizmo]。例如在 [EditorSpatialGizmo] 中用作编辑器中的自定义"
+"å¯è§†åŒ–和编辑手柄。"
#: doc/classes/Spatial.xml
-#, fuzzy
msgid ""
"Rotation part of the global transformation in radians, specified in terms of "
"YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n"
@@ -70789,7 +70873,7 @@ msgid ""
"point numbers. Therefore, applying affine operations on the rotation "
"\"vector\" is not meaningful."
msgstr ""
-"å±€éƒ¨å˜æ¢çš„æ—‹è½¬éƒ¨åˆ†ä»¥å¼§åº¦è¡¨ç¤ºï¼Œä»¥ YXZ-Euler 角的形å¼è¡¨ç¤ºï¼ˆX è§’ã€Y è§’ã€Z "
+"å…¨å±€å˜æ¢çš„æ—‹è½¬éƒ¨åˆ†ï¼Œå•ä½ä¸ºå¼§åº¦ï¼Œä»¥ YXZ 欧拉角的形å¼è¡¨ç¤ºï¼ˆX è§’ã€Y è§’ã€Z "
"角)。\n"
"[b]注æ„:[/b]在数学æ„ä¹‰ä¸Šï¼Œæ—‹è½¬æ˜¯ä¸€ä¸ªçŸ©é˜µè€Œä¸æ˜¯ä¸€ä¸ªå‘é‡ã€‚这三个欧拉角是旋转矩"
"é˜µæ¬§æ‹‰è§’å‚æ•°åŒ–çš„ä¸‰ä¸ªç‹¬ç«‹å‚æ•°ï¼Œå­˜å‚¨åœ¨ [Vector3] æ•°æ®ç»“æž„ä¸­å¹¶ä¸æ˜¯å› ä¸ºæ—‹è½¬æ˜¯ä¸€ä¸ª"
@@ -70798,13 +70882,13 @@ msgstr ""
#: doc/classes/Spatial.xml
msgid "World space (global) [Transform] of this node."
-msgstr "此节点的世界空间(全局)[Transform]。"
+msgstr "è¿™ä¸ªèŠ‚ç‚¹çš„ä¸–ç•Œç©ºé—´ï¼ˆå…¨å±€ï¼‰å˜æ¢ [Transform]。"
#: doc/classes/Spatial.xml
msgid ""
"Global position of this node. This is equivalent to [code]global_transform."
"origin[/code]."
-msgstr ""
+msgstr "这个节点的全局ä½ç½®ã€‚与 [code]global_transform.origin[/code] 等价。"
#: doc/classes/Spatial.xml
msgid ""
@@ -70818,7 +70902,7 @@ msgid ""
"point numbers. Therefore, applying affine operations on the rotation "
"\"vector\" is not meaningful."
msgstr ""
-"å±€éƒ¨å˜æ¢çš„æ—‹è½¬éƒ¨åˆ†ä»¥å¼§åº¦è¡¨ç¤ºï¼Œä»¥ YXZ-Euler 角的形å¼è¡¨ç¤ºï¼ˆX è§’ã€Y è§’ã€Z "
+"å±€éƒ¨å˜æ¢çš„æ—‹è½¬éƒ¨åˆ†ï¼Œå•ä½ä¸ºå¼§åº¦ï¼Œä»¥ YXZ 欧拉角的形å¼è¡¨ç¤ºï¼ˆX è§’ã€Y è§’ã€Z "
"角)。\n"
"[b]注æ„:[/b]在数学æ„ä¹‰ä¸Šï¼Œæ—‹è½¬æ˜¯ä¸€ä¸ªçŸ©é˜µè€Œä¸æ˜¯ä¸€ä¸ªå‘é‡ã€‚这三个欧拉角是旋转矩"
"é˜µæ¬§æ‹‰è§’å‚æ•°åŒ–çš„ä¸‰ä¸ªç‹¬ç«‹å‚æ•°ï¼Œå­˜å‚¨åœ¨ [Vector3] æ•°æ®ç»“æž„ä¸­å¹¶ä¸æ˜¯å› ä¸ºæ—‹è½¬æ˜¯ä¸€ä¸ª"
@@ -70839,17 +70923,17 @@ msgid ""
"transformation matrices in Godot, the scale values will either be all "
"positive or all negative."
msgstr ""
-"æœ¬åœ°å˜æ¢ä¸­çš„缩放。\n"
+"å±€éƒ¨å˜æ¢çš„缩放部分。\n"
"[b]注æ„:[/b]3D ä¸­ï¼Œå˜æ¢çŸ©é˜µæ˜¯æ— æ³•分解出正负混åˆçš„缩放的。由于 Godot 中使用å˜"
"æ¢çŸ©é˜µæ¥è¡¨ç¤ºç¼©æ”¾ï¼Œå¾—到的缩放值è¦ä¹ˆå…¨æ­£ã€è¦ä¹ˆå…¨è´Ÿã€‚"
#: doc/classes/Spatial.xml
msgid "Local space [Transform] of this node, with respect to the parent node."
-msgstr "该节点相对于父节点的局部空间 [Transform]。"
+msgstr "这个节点相对于父节点的局部空间 [Transform]。"
#: doc/classes/Spatial.xml
msgid "Local translation of this node."
-msgstr "æ­¤èŠ‚ç‚¹çš„å±€éƒ¨å˜æ¢ã€‚"
+msgstr "è¿™ä¸ªèŠ‚ç‚¹çš„å±€éƒ¨å˜æ¢ã€‚"
#: doc/classes/Spatial.xml
msgid ""
@@ -72817,10 +72901,11 @@ msgid "The size of one pixel's width on the sprite to scale it in 3D."
msgstr "ç²¾çµä¸Šä¸€ä¸ªåƒç´ å®½åº¦çš„大å°ï¼Œä»¥ 3D 缩放。"
#: doc/classes/SpriteBase3D.xml
+#, fuzzy
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -76414,9 +76499,10 @@ msgid "Sets the text for a specific line."
msgstr "设置特定行的文本。"
#: doc/classes/TextEdit.xml
+#, fuzzy
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
"如果 [code]bookmark[/code] 为 true,则为行 [code]line[/code] 设置书签。如果 "
@@ -80281,7 +80367,7 @@ msgid ""
"is_selected]."
msgstr ""
"返回当å‰èŽ·å¾—ç„¦ç‚¹çš„åˆ—ï¼Œå¦‚æžœæ²¡æœ‰ç„¦ç‚¹åˆ—ï¼Œåˆ™è¿”å›ž -1。\n"
-"在[constant SELECT_SINGLE] 模å¼ä¸‹ï¼Œç„¦ç‚¹åˆ—是被选中的列。在 [constant "
+"在 [constant SELECT_SINGLE] 模å¼ä¸‹ï¼Œç„¦ç‚¹åˆ—是被选中的列。在 [constant "
"SELECT_ROW] 模å¼ä¸‹ï¼Œå¦‚果有任æ„项被选中,焦点列总是 0。在 [constant "
"SELECT_MULTI] 模å¼ä¸‹ï¼Œç„¦ç‚¹åˆ—是焦点光标下的列,但ä¸ä¸€å®šæœ‰åˆ—被选中。\n"
"è¦åˆ¤æ–­ä¸€ä¸ªé¡¹çš„æŸä¸€åˆ—æ˜¯å¦è¢«é€‰ä¸­ï¼Œè¯·ä½¿ç”¨ [method TreeItem.is_selected]。"
@@ -80306,12 +80392,12 @@ msgid ""
"will use their \"min_width\" in a similar fashion to [member Control."
"size_flags_stretch_ratio]."
msgstr ""
-"设置一个列的最å°å®½åº¦ã€‚拥有“Expandâ€æ ‡å¿—的列将以类似于 [member Control."
+"设置æŸä¸€åˆ—的最å°å®½åº¦ã€‚拥有“Expandâ€æ ‡å¿—的列将以类似于 [member Control."
"size_flags_stretch_ratio] 的方å¼ä½¿ç”¨å…¶â€œmin_widthâ€æœ€å°å®½åº¦ã€‚"
#: doc/classes/Tree.xml
msgid "Sets the title of a column."
-msgstr "设置一个列的标题。"
+msgstr "设置æŸä¸€åˆ—的标题。"
#: doc/classes/Tree.xml
msgid ""
@@ -80485,7 +80571,7 @@ msgid ""
"other flags."
msgstr ""
"ç¦ç”¨æ‰€æœ‰æ”¾ç½®éƒ¨åˆ†ï¼Œä½†ä»ç„¶å…许通过 [method get_drop_section_at_position] 检"
-"测“物å“上â€çš„æ”¾ç½®éƒ¨åˆ†ã€‚\n"
+"测“项目上â€çš„æ”¾ç½®éƒ¨åˆ†ã€‚\n"
"[b]注æ„:[/b]è¿™æ˜¯é»˜è®¤çš„æ ‡å¿—ï¼Œå½“ä¸Žå…¶ä»–æ ‡å¿—ç»“åˆæ—¶ï¼Œå®ƒæ²¡æœ‰æ•ˆæžœã€‚"
#: doc/classes/Tree.xml
@@ -80549,7 +80635,7 @@ msgid ""
"Draws the guidelines if not zero, this acts as a boolean. The guideline is a "
"horizontal line drawn at the bottom of each item."
msgstr ""
-"如果ä¸ä¸ºé›¶å°±ç»˜åˆ¶å‚考线,这作为一个布尔值。å‚考线是在æ¯ä¸ªé¡¹çš„åº•éƒ¨ç”»çš„ä¸€æ¡æ°´å¹³"
+"如果ä¸ä¸ºé›¶å°±ç»˜åˆ¶å‚考线,行为类似于布尔值。å‚考线是在æ¯ä¸ªé¡¹çš„åº•éƒ¨ç”»çš„ä¸€æ¡æ°´å¹³"
"线。"
#: doc/classes/Tree.xml
@@ -80557,8 +80643,8 @@ msgid ""
"Draws the relationship lines if not zero, this acts as a boolean. "
"Relationship lines are drawn at the start of child items to show hierarchy."
msgstr ""
-"如果ä¸ä¸ºé›¶ï¼Œåˆ™ç»˜åˆ¶å…³ç³»çº¿ï¼Œè¿™ä½œä¸ºä¸€ä¸ªå¸ƒå°”值。关系线在å­é¡¹çš„开始处绘制,以显示"
-"层次结构。"
+"如果ä¸ä¸ºé›¶å°±ç»˜åˆ¶å…³ç³»çº¿ï¼Œè¡Œä¸ºç±»ä¼¼äºŽå¸ƒå°”值。关系线在å­é¡¹çš„开始处绘制,以显示层"
+"次结构。"
#: doc/classes/Tree.xml
msgid ""
@@ -80820,14 +80906,17 @@ msgid ""
msgstr "返回使用 [method set_metadata] 为指定列设置的元数æ®ã€‚"
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr "返回树中的下一个 TreeItem,如果没有,则返回一个空对象。"
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -80841,14 +80930,17 @@ msgid "Returns the parent TreeItem or a null object if there is none."
msgstr "返回父级 TreeItem,如果没有,则返回一个空对象。"
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr "返回树中的å‰ä¸€ä¸ª TreeItem,如果没有,则返回一个空对象。"
#: doc/classes/TreeItem.xml
+#, fuzzy
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -89175,8 +89267,12 @@ msgid "Sets the viewport's global transformation matrix."
msgstr "è®¾ç½®è§†çª—çš„å…¨å±€å˜æ¢çŸ©é˜µã€‚"
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
-msgstr "如果为 [code]true[/code],视窗将呈现为 hdr。"
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
#: doc/classes/VisualServer.xml
msgid "If [code]true[/code], the viewport's canvas is not rendered."
@@ -89274,6 +89370,22 @@ msgid ""
msgstr "设置视窗的 2D/3D 模å¼ã€‚é€‰é¡¹è§ [enum ViewportUsage] 常é‡ã€‚"
#: doc/classes/VisualServer.xml
+#, fuzzy
+msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+"如果为 [code]true[/code],分é…该视窗的帧缓冲时将使用完整浮点数精度(32 ä½ï¼‰è€Œ"
+"䏿˜¯åŠæµ®ç‚¹æ•°ç²¾åº¦ï¼ˆ16 ä½ï¼‰ã€‚ä»…åœ¨åŒæ—¶å¯ç”¨ [member hdr] 时有效。\n"
+"[b]注æ„:[/b]å¯ç”¨è¿™ä¸ªè®¾ç½®ä¸ä¼šæå‡æ¸²æŸ“è´¨é‡ã€‚ä½¿ç”¨å®Œæ•´æµ®ç‚¹æ•°ç²¾åº¦è¾ƒæ…¢ï¼Œä¸€èˆ¬åªæœ‰è¦"
+"求更高精度的高级ç€è‰²å™¨éœ€è¦ä½¿ç”¨ã€‚如果是è¦å‡å°‘æ¡å¸¦æ•ˆåº”,请å¯ç”¨ [member "
+"debanding]。\n"
+"[b]注æ„:[/b]仅在 GLES3 åŽç«¯ä¸­å¯ç”¨ã€‚"
+
+#: doc/classes/VisualServer.xml
msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
diff --git a/doc/translations/zh_TW.po b/doc/translations/zh_TW.po
index cd8d5c0eb5..59cd8b199b 100644
--- a/doc/translations/zh_TW.po
+++ b/doc/translations/zh_TW.po
@@ -948,7 +948,14 @@ msgid ""
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
-msgid "Like [method print], but prints only when used in debug mode."
+msgid ""
+"Like [method print], but includes the current stack frame when running with "
+"the debugger turned on.\n"
+"Output in the console would look something like this:\n"
+"[codeblock]\n"
+"Test print\n"
+" At: res://test.gd:15:_process()\n"
+"[/codeblock]"
msgstr ""
#: modules/gdscript/doc_classes/@GDScript.xml
@@ -7798,8 +7805,8 @@ msgstr ""
#: doc/classes/ARVRController.xml
msgid ""
"The degree to which the controller vibrates. Ranges from [code]0.0[/code] to "
-"[code]1.0[/code] with precision [code].01[/code]. If changed, updates "
-"[member ARVRPositionalTracker.rumble] accordingly.\n"
+"[code]1.0[/code]. If changed, updates [member ARVRPositionalTracker.rumble] "
+"accordingly.\n"
"This is a useful property to animate if you want the controller to vibrate "
"for a limited duration."
msgstr ""
@@ -11871,7 +11878,12 @@ msgstr ""
#: doc/classes/Camera.xml
msgid ""
-"If [code]true[/code], the ancestor [Viewport] is currently using this camera."
+"If [code]true[/code], the ancestor [Viewport] is currently using this "
+"camera.\n"
+"If multiple cameras are in the scene, one will always be made current. For "
+"example, if two [Camera] nodes are present in the scene and only one is "
+"current, setting one camera's [member current] to [code]false[/code] will "
+"cause the other camera to be made current."
msgstr ""
#: doc/classes/Camera.xml
@@ -20299,7 +20311,7 @@ msgstr ""
msgid ""
"Saves the editor feature profile to a file in JSON format. It can then be "
"imported using the feature profile manager's [b]Import[/b] button or the "
-"[method load_from_file] button."
+"[method load_from_file] method."
msgstr ""
#: doc/classes/EditorFeatureProfile.xml
@@ -23691,7 +23703,7 @@ msgstr ""
#: doc/classes/Environment.xml
msgid ""
"The tonemapping mode to use. Tonemapping is the process that \"converts\" "
-"HDR values to be suitable for rendering on a LDR display. (Godot doesn't "
+"HDR values to be suitable for rendering on a SDR display. (Godot doesn't "
"support rendering on HDR displays yet.)"
msgstr ""
@@ -25528,7 +25540,7 @@ msgstr ""
#: doc/classes/Geometry.xml
msgid ""
"Given an array of [Vector2]s representing tiles, builds an atlas. The "
-"returned dictionary has two keys: [code]points[/code] is a vector of "
+"returned dictionary has two keys: [code]points[/code] is an array of "
"[Vector2] that specifies the positions of each tile, [code]size[/code] "
"contains the overall size of the whole atlas as [Vector2]."
msgstr ""
@@ -32638,7 +32650,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text outline. Higher priority objects will "
"be sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32654,7 +32666,7 @@ msgstr ""
msgid ""
"Sets the render priority for the text. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -32684,7 +32696,7 @@ msgstr ""
#: doc/classes/Label3D.xml
msgid ""
-"If set, text can be seen from the back as well. If not, the texture is "
+"If set, text can be seen from the back as well. If not, the text is "
"invisible when looking at it from behind."
msgstr ""
@@ -36820,7 +36832,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The cost of entering this region from another region can be controlled with "
"the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The cost of traveling distances inside this region can be controlled with "
"the [member travel_cost] multiplier."
@@ -37083,7 +37095,7 @@ msgid ""
"two regions. They must share a similar edge.\n"
"The pathfinding cost of entering this region from another region can be "
"controlled with the [member enter_cost] value.\n"
-"[b]Note[/b]: This value is not added to the path cost when the start "
+"[b]Note:[/b] This value is not added to the path cost when the start "
"position is already inside this region.\n"
"The pathfinding cost of traveling distances inside this region can be "
"controlled with the [member travel_cost] multiplier."
@@ -37201,6 +37213,52 @@ msgstr ""
msgid "Control activation of this server."
msgstr ""
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be controlled from a "
+"script."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"A [NetworkedMultiplayerPeer] implementation that can be used as a [member "
+"MultiplayerAPI.network_peer] and controlled from a script.\n"
+"Its purpose is to allow adding a new backend for the high-Level multiplayer "
+"API without needing to use GDNative."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Deliver a packet to the local [MultiplayerAPI].\n"
+"When your script receives a packet from other peers over the network "
+"(originating from the [signal packet_generated] signal on the sending peer), "
+"passing it to this method will deliver it locally."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Initialize the peer with the given [code]peer_id[/code] (must be between 1 "
+"and 2147483647)."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Set the state of the connection. See [enum NetworkedMultiplayerPeer."
+"ConnectionStatus]."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid "Set the max packet size that this peer can handle."
+msgstr ""
+
+#: doc/classes/NetworkedMultiplayerCustom.xml
+msgid ""
+"Emitted when the local [MultiplayerAPI] generates a packet.\n"
+"Your script should take this packet and send it to the requested peer over "
+"the network (which should call [method deliver_packet] with the data when "
+"it's received)."
+msgstr ""
+
#: modules/enet/doc_classes/NetworkedMultiplayerENet.xml
msgid ""
"PacketPeer implementation using the [url=http://enet.bespin.org/index."
@@ -39898,7 +39956,13 @@ msgid "See [enum ShadowDetail]."
msgstr ""
#: doc/classes/OmniLight.xml
-msgid "See [enum ShadowMode]."
+msgid ""
+"The shadow rendering mode to use for this [OmniLight]. See [enum "
+"ShadowMode].\n"
+"[b]Note:[/b] In GLES2, [constant SHADOW_CUBE] is only supported on GPUs that "
+"feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 "
+"series don't support cubemap shadows and will fall back to dual paraboloid "
+"shadows as a result."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -39910,7 +39974,8 @@ msgstr ""
#: doc/classes/OmniLight.xml
msgid ""
"Shadows are rendered to a cubemap. Slower than [constant "
-"SHADOW_DUAL_PARABOLOID], but higher-quality."
+"SHADOW_DUAL_PARABOLOID], but higher-quality. Only supported on GPUs that "
+"feature support for depth cubemaps."
msgstr ""
#: doc/classes/OmniLight.xml
@@ -57697,7 +57762,7 @@ msgstr ""
msgid ""
"Sets the render priority for the sprite. Higher priority objects will be "
"sorted in front of lower priority objects.\n"
-"[b]Node:[/b] This only applies if [member alpha_cut] is set to [constant "
+"[b]Note:[/b] This only applies if [member alpha_cut] is set to [constant "
"ALPHA_CUT_DISABLED] (default value).\n"
"[b]Note:[/b] This only applies to sorting of transparent objects. This will "
"not impact how transparent objects are sorted relative to opaque objects. "
@@ -60599,8 +60664,8 @@ msgstr ""
#: doc/classes/TextEdit.xml
msgid ""
-"Bookmarks the [code]line[/code] if [code]bookmark[/code] is true. Deletes "
-"the bookmark if [code]bookmark[/code] is false.\n"
+"Bookmarks the [code]line[/code] if [code]bookmark[/code] is [code]true[/"
+"code]. Deletes the bookmark if [code]bookmark[/code] is [code]false[/code].\n"
"Bookmarks are shown in the [member breakpoint_gutter]."
msgstr ""
@@ -64234,13 +64299,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next TreeItem in the tree or a null object if there is none."
+"Returns the next sibling TreeItem in the tree or a null object if there is "
+"none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the next visible TreeItem in the tree or a null object if there is "
-"none.\n"
+"Returns the next visible sibling TreeItem in the tree or a null object if "
+"there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the first "
"visible element in the tree when called on the last visible element, "
"otherwise it returns [code]null[/code]."
@@ -64252,13 +64318,14 @@ msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous TreeItem in the tree or a null object if there is none."
+"Returns the previous sibling TreeItem in the tree or a null object if there "
+"is none."
msgstr ""
#: doc/classes/TreeItem.xml
msgid ""
-"Returns the previous visible TreeItem in the tree or a null object if there "
-"is none.\n"
+"Returns the previous visible sibling TreeItem in the tree or a null object "
+"if there is none.\n"
"If [code]wrap[/code] is enabled, the method will wrap around to the last "
"visible element in the tree when called on the first visible element, "
"otherwise it returns [code]null[/code]."
@@ -71172,7 +71239,11 @@ msgid "Sets the viewport's global transformation matrix."
msgstr ""
#: doc/classes/VisualServer.xml
-msgid "If [code]true[/code], the viewport renders to hdr."
+msgid ""
+"If [code]true[/code], the viewport renders to high dynamic range (HDR) "
+"instead of standard dynamic range (SDR). See also [method "
+"viewport_set_use_32_bpc_depth].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
msgstr ""
#: doc/classes/VisualServer.xml
@@ -71257,6 +71328,15 @@ msgstr ""
#: doc/classes/VisualServer.xml
msgid ""
+"If [code]true[/code], allocates the viewport's framebuffer with full "
+"floating-point precision (32-bit) instead of half floating-point precision "
+"(16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used "
+"on the same [Viewport] to set HDR to [code]true[/code].\n"
+"[b]Note:[/b] Only available on the GLES3 backend."
+msgstr ""
+
+#: doc/classes/VisualServer.xml
+msgid ""
"If [code]true[/code], the viewport uses augmented or virtual reality "
"technologies. See [ARVRInterface]."
msgstr ""
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index a5dec393bb..d4ac3c993a 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -135,7 +135,7 @@ void RasterizerCanvasGLES3::canvas_render_items(RID p_to_render_target, Item *p_
Size2i ssize = texture_storage->render_target_get_size(p_to_render_target);
Transform3D screen_transform;
- screen_transform.translate(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
+ screen_transform.translate_local(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
screen_transform.scale(Vector3(2.0f / ssize.width, 2.0f / ssize.height, 1.0f));
_update_transform_to_mat4(screen_transform, state_buffer.screen_transform);
_update_transform_2d_to_mat4(p_canvas_transform, state_buffer.canvas_transform);
@@ -183,7 +183,7 @@ void RasterizerCanvasGLES3::canvas_render_items(RID p_to_render_target, Item *p_
glBindBufferBase(GL_UNIFORM_BUFFER, BASE_UNIFORM_LOCATION, state.canvas_state_buffer);
glBufferData(GL_UNIFORM_BUFFER, sizeof(StateBuffer), &state_buffer, GL_STREAM_DRAW);
- GLuint global_buffer = material_storage->global_variables_get_uniform_buffer();
+ GLuint global_buffer = material_storage->global_shader_uniforms_get_uniform_buffer();
glBindBufferBase(GL_UNIFORM_BUFFER, GLOBAL_UNIFORM_LOCATION, global_buffer);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
@@ -815,10 +815,8 @@ void RasterizerCanvasGLES3::_render_item(RID p_render_target, const Item *p_item
_bind_canvas_texture(texture, current_filter, current_repeat, r_index);
if (instance_count == 1) {
GLES3::MaterialStorage::get_singleton()->shaders.canvas_shader.version_bind_shader(state.current_shader_version, CanvasShaderGLES3::MODE_ATTRIBUTES);
- } else if (instance_count > 1) {
- GLES3::MaterialStorage::get_singleton()->shaders.canvas_shader.version_bind_shader(state.current_shader_version, CanvasShaderGLES3::MODE_INSTANCED);
} else {
- ERR_PRINT("Must have at least one mesh instance to draw mesh");
+ GLES3::MaterialStorage::get_singleton()->shaders.canvas_shader.version_bind_shader(state.current_shader_version, CanvasShaderGLES3::MODE_INSTANCED);
}
uint32_t surf_count = mesh_storage->mesh_get_surface_count(mesh);
@@ -882,7 +880,7 @@ void RasterizerCanvasGLES3::_render_item(RID p_render_target, const Item *p_item
} else {
glDrawArrays(primitive_gl, 0, mesh_storage->mesh_surface_get_vertices_drawn_count(surface));
}
- } else if (instance_count > 1) {
+ } else {
if (use_index_buffer) {
glDrawElementsInstanced(primitive_gl, mesh_storage->mesh_surface_get_vertices_drawn_count(surface), mesh_storage->mesh_surface_get_index_type(surface), 0, instance_count);
} else {
@@ -1570,7 +1568,7 @@ RasterizerCanvasGLES3::RasterizerCanvasGLES3() {
glBindBuffer(GL_UNIFORM_BUFFER, 0);
String global_defines;
- global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now
+ global_defines += "#define MAX_GLOBAL_SHADER_UNIFORMS 256\n"; // TODO: this is arbitrary for now
global_defines += "#define MAX_LIGHTS " + itos(state.max_instances_per_batch) + "\n";
global_defines += "#define MAX_DRAW_DATA_INSTANCES " + itos(state.max_instances_per_batch) + "\n";
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 969a9b2c42..26d84aa6a3 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/templates/sort_array.h"
#include "servers/rendering/rendering_server_default.h"
+#include "servers/rendering/rendering_server_globals.h"
#include "storage/config.h"
#include "storage/light_storage.h"
#include "storage/mesh_storage.h"
@@ -39,15 +40,9 @@
#ifdef GLES3_ENABLED
-uint64_t RasterizerSceneGLES3::auto_exposure_counter = 2;
-
RasterizerSceneGLES3 *RasterizerSceneGLES3::singleton = nullptr;
-RasterizerSceneGLES3 *RasterizerSceneGLES3::get_singleton() {
- return singleton;
-}
-
-RendererSceneRender::GeometryInstance *RasterizerSceneGLES3::geometry_instance_create(RID p_base) {
+RenderGeometryInstance *RasterizerSceneGLES3::geometry_instance_create(RID p_base) {
RS::InstanceType type = RSG::utilities->get_base_type(p_base);
ERR_FAIL_COND_V(!((1 << type) & RS::INSTANCE_GEOMETRY_MASK), nullptr);
@@ -57,176 +52,36 @@ RendererSceneRender::GeometryInstance *RasterizerSceneGLES3::geometry_instance_c
ginstance->data->base = p_base;
ginstance->data->base_type = type;
- _geometry_instance_mark_dirty(ginstance);
+ ginstance->_mark_dirty();
return ginstance;
}
-void RasterizerSceneGLES3::geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->skeleton = p_skeleton;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_override = p_override;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_overlay = p_overlay;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->surface_materials = p_materials;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ERR_FAIL_COND(!ginstance);
- ginstance->mesh_instance = p_mesh_instance;
-
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->transform = p_transform;
- ginstance->mirror = p_transform.basis.determinant() < 0;
- ginstance->data->aabb = p_aabb;
- ginstance->transformed_aabb = p_transformed_aabb;
-
- Vector3 model_scale_vec = p_transform.basis.get_scale_abs();
- // handle non uniform scale here
-
- float max_scale = MAX(model_scale_vec.x, MAX(model_scale_vec.y, model_scale_vec.z));
- float min_scale = MIN(model_scale_vec.x, MIN(model_scale_vec.y, model_scale_vec.z));
- ginstance->non_uniform_scale = max_scale >= 0.0 && (min_scale / max_scale) < 0.9;
-
- ginstance->lod_model_scale = max_scale;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->layer_mask = p_layer_mask;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->lod_bias = p_lod_bias;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->force_alpha = CLAMP(1.0 - p_transparency, 0, 1);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->fade_near = p_enable_near;
- ginstance->fade_near_begin = p_near_begin;
- ginstance->fade_near_end = p_near_end;
- ginstance->fade_far = p_enable_far;
- ginstance->fade_far_begin = p_far_begin;
- ginstance->fade_far_end = p_far_end;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->parent_fade_alpha = p_alpha;
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->use_baked_light = p_enable;
-
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->use_dynamic_gi = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->shader_parameters_offset = p_offset;
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->cast_double_sided_shadows = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-
uint32_t RasterizerSceneGLES3::geometry_instance_get_pair_mask() {
return (1 << RS::INSTANCE_LIGHT);
}
-void RasterizerSceneGLES3::geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
+void RasterizerSceneGLES3::GeometryInstanceGLES3::pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) {
GLES3::Config *config = GLES3::Config::get_singleton();
- ginstance->omni_light_count = 0;
- ginstance->spot_light_count = 0;
- ginstance->omni_lights.clear();
- ginstance->spot_lights.clear();
+ omni_light_count = 0;
+ spot_light_count = 0;
+ omni_lights.clear();
+ spot_lights.clear();
for (uint32_t i = 0; i < p_light_instance_count; i++) {
- RS::LightType type = light_instance_get_type(p_light_instances[i]);
+ RS::LightType type = RasterizerSceneGLES3::get_singleton()->light_instance_get_type(p_light_instances[i]);
switch (type) {
case RS::LIGHT_OMNI: {
- if (ginstance->omni_light_count < (uint32_t)config->max_lights_per_object) {
- ginstance->omni_lights.push_back(p_light_instances[i]);
- ginstance->omni_light_count++;
+ if (omni_light_count < (uint32_t)config->max_lights_per_object) {
+ omni_lights.push_back(p_light_instances[i]);
+ omni_light_count++;
}
} break;
case RS::LIGHT_SPOT: {
- if (ginstance->spot_light_count < (uint32_t)config->max_lights_per_object) {
- ginstance->spot_lights.push_back(p_light_instances[i]);
- ginstance->spot_light_count++;
+ if (spot_light_count < (uint32_t)config->max_lights_per_object) {
+ spot_lights.push_back(p_light_instances[i]);
+ spot_light_count++;
}
} break;
default:
@@ -235,21 +90,7 @@ void RasterizerSceneGLES3::geometry_instance_pair_light_instances(GeometryInstan
}
}
-void RasterizerSceneGLES3::geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) {
-}
-
-void RasterizerSceneGLES3::geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) {
-}
-
-void RasterizerSceneGLES3::geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) {
-}
-
-void RasterizerSceneGLES3::geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-}
-
-void RasterizerSceneGLES3::geometry_instance_free(GeometryInstance *p_geometry_instance) {
+void RasterizerSceneGLES3::geometry_instance_free(RenderGeometryInstance *p_geometry_instance) {
GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
GeometryInstanceSurface *surf = ginstance->surface_caches;
@@ -262,24 +103,29 @@ void RasterizerSceneGLES3::geometry_instance_free(GeometryInstance *p_geometry_i
geometry_instance_alloc.free(ginstance);
}
-void RasterizerSceneGLES3::_geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance) {
- GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
- if (ginstance->dirty_list_element.in_list()) {
+void RasterizerSceneGLES3::GeometryInstanceGLES3::_mark_dirty() {
+ if (dirty_list_element.in_list()) {
return;
}
//clear surface caches
- GeometryInstanceSurface *surf = ginstance->surface_caches;
+ GeometryInstanceSurface *surf = surface_caches;
while (surf) {
GeometryInstanceSurface *next = surf->next;
- geometry_instance_surface_alloc.free(surf);
+ RasterizerSceneGLES3::get_singleton()->geometry_instance_surface_alloc.free(surf);
surf = next;
}
- ginstance->surface_caches = nullptr;
+ surface_caches = nullptr;
+
+ RasterizerSceneGLES3::get_singleton()->geometry_instance_dirty_list.add(&dirty_list_element);
+}
+
+void RasterizerSceneGLES3::GeometryInstanceGLES3::set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
+}
- geometry_instance_dirty_list.add(&ginstance->dirty_list_element);
+void RasterizerSceneGLES3::GeometryInstanceGLES3::set_lightmap_capture(const Color *p_sh9) {
}
void RasterizerSceneGLES3::_update_dirty_geometry_instances() {
@@ -295,7 +141,7 @@ void RasterizerSceneGLES3::_geometry_instance_dependency_changed(Dependency::Dep
case Dependency::DEPENDENCY_CHANGED_PARTICLES:
case Dependency::DEPENDENCY_CHANGED_MULTIMESH:
case Dependency::DEPENDENCY_CHANGED_SKELETON_DATA: {
- static_cast<RasterizerSceneGLES3 *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
} break;
case Dependency::DEPENDENCY_CHANGED_MULTIMESH_VISIBLE_INSTANCES: {
GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_tracker->userdata);
@@ -310,7 +156,7 @@ void RasterizerSceneGLES3::_geometry_instance_dependency_changed(Dependency::Dep
}
void RasterizerSceneGLES3::_geometry_instance_dependency_deleted(const RID &p_dependency, DependencyTracker *p_tracker) {
- static_cast<RasterizerSceneGLES3 *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
}
void RasterizerSceneGLES3::_geometry_instance_add_surface_with_material(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh) {
@@ -467,7 +313,7 @@ void RasterizerSceneGLES3::_geometry_instance_add_surface(GeometryInstanceGLES3
}
}
-void RasterizerSceneGLES3::_geometry_instance_update(GeometryInstance *p_geometry_instance) {
+void RasterizerSceneGLES3::_geometry_instance_update(RenderGeometryInstance *p_geometry_instance) {
GLES3::MeshStorage *mesh_storage = GLES3::MeshStorage::get_singleton();
GeometryInstanceGLES3 *ginstance = static_cast<GeometryInstanceGLES3 *>(p_geometry_instance);
@@ -650,8 +496,7 @@ void RasterizerSceneGLES3::_update_dirty_skys() {
while (sky) {
if (sky->radiance == 0) {
- sky->mipmap_count = Image::get_image_required_mipmaps(sky->radiance_size, sky->radiance_size, Image::FORMAT_RGBA8) + 1;
-
+ sky->mipmap_count = Image::get_image_required_mipmaps(sky->radiance_size, sky->radiance_size, Image::FORMAT_RGBA8) - 2;
// Left uninitialized, will attach a texture at render time
glGenFramebuffers(1, &sky->radiance_framebuffer);
@@ -715,13 +560,13 @@ void RasterizerSceneGLES3::_update_dirty_skys() {
dirty_sky_list = nullptr;
}
-void RasterizerSceneGLES3::_setup_sky(Environment *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size) {
+void RasterizerSceneGLES3::_setup_sky(RID p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size) {
GLES3::LightStorage *light_storage = GLES3::LightStorage::get_singleton();
GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
GLES3::SkyMaterialData *material = nullptr;
- Sky *sky = sky_owner.get_or_null(p_env->sky);
+ Sky *sky = sky_owner.get_or_null(environment_get_sky(p_env));
RID sky_material;
@@ -861,17 +706,17 @@ void RasterizerSceneGLES3::_setup_sky(Environment *p_env, RID p_render_buffers,
}
}
-void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const Projection &p_projection, const Transform3D &p_transform) {
+void RasterizerSceneGLES3::_draw_sky(RID p_env, const Projection &p_projection, const Transform3D &p_transform) {
GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
- Sky *sky = sky_owner.get_or_null(p_env->sky);
+ Sky *sky = sky_owner.get_or_null(environment_get_sky(p_env));
ERR_FAIL_COND(!sky);
GLES3::SkyMaterialData *material_data = nullptr;
RID sky_material;
- RS::EnvironmentBG background = p_env->background;
+ RS::EnvironmentBG background = environment_get_background(p_env);
if (sky) {
ERR_FAIL_COND(!sky);
@@ -903,16 +748,16 @@ void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const Projection &p_pro
// Camera
Projection camera;
- if (p_env->sky_custom_fov) {
+ if (environment_get_sky_custom_fov(p_env)) {
float near_plane = p_projection.get_z_near();
float far_plane = p_projection.get_z_far();
float aspect = p_projection.get_aspect();
- camera.set_perspective(p_env->sky_custom_fov, aspect, near_plane, far_plane);
+ camera.set_perspective(environment_get_sky_custom_fov(p_env), aspect, near_plane, far_plane);
} else {
camera = p_projection;
}
- Basis sky_transform = p_env->sky_orientation;
+ Basis sky_transform = environment_get_sky_orientation(p_env);
sky_transform.invert();
sky_transform = p_transform.basis * sky_transform;
@@ -926,17 +771,17 @@ void RasterizerSceneGLES3::_draw_sky(Environment *p_env, const Projection &p_pro
glDrawArrays(GL_TRIANGLES, 0, 3);
}
-void RasterizerSceneGLES3::_update_sky_radiance(Environment *p_env, const Projection &p_projection, const Transform3D &p_transform) {
+void RasterizerSceneGLES3::_update_sky_radiance(RID p_env, const Projection &p_projection, const Transform3D &p_transform) {
GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
- Sky *sky = sky_owner.get_or_null(p_env->sky);
+ Sky *sky = sky_owner.get_or_null(environment_get_sky(p_env));
ERR_FAIL_COND(!sky);
GLES3::SkyMaterialData *material_data = nullptr;
RID sky_material;
- RS::EnvironmentBG background = p_env->background;
+ RS::EnvironmentBG background = environment_get_background(p_env);
if (sky) {
ERR_FAIL_COND(!sky);
@@ -990,7 +835,7 @@ void RasterizerSceneGLES3::_update_sky_radiance(Environment *p_env, const Projec
int max_processing_layer = sky->mipmap_count;
// Update radiance cubemap
- if (sky->reflection_dirty && (sky->processing_layer >= max_processing_layer || update_single_frame)) {
+ if (sky->reflection_dirty && (sky->processing_layer > max_processing_layer || update_single_frame)) {
static const Vector3 view_normals[6] = {
Vector3(+1, 0, 0),
Vector3(-1, 0, 0),
@@ -1034,7 +879,7 @@ void RasterizerSceneGLES3::_update_sky_radiance(Environment *p_env, const Projec
}
if (update_single_frame) {
- for (int i = 0; i < max_processing_layer; i++) {
+ for (int i = 0; i <= max_processing_layer; i++) {
_filter_sky_radiance(sky, i);
}
} else {
@@ -1044,13 +889,52 @@ void RasterizerSceneGLES3::_update_sky_radiance(Environment *p_env, const Projec
sky->reflection_dirty = false;
} else {
- if (sky_mode == RS::SKY_MODE_INCREMENTAL && sky->processing_layer < max_processing_layer) {
+ if (sky_mode == RS::SKY_MODE_INCREMENTAL && sky->processing_layer <= max_processing_layer) {
_filter_sky_radiance(sky, sky->processing_layer);
sky->processing_layer++;
}
}
}
+// Helper functions for IBL filtering
+
+Vector3 importance_sample_GGX(Vector2 xi, float roughness4) {
+ // Compute distribution direction
+ float phi = 2.0 * Math_PI * xi.x;
+ float cos_theta = sqrt((1.0 - xi.y) / (1.0 + (roughness4 - 1.0) * xi.y));
+ float sin_theta = sqrt(1.0 - cos_theta * cos_theta);
+
+ // Convert to spherical direction
+ Vector3 half_vector;
+ half_vector.x = sin_theta * cos(phi);
+ half_vector.y = sin_theta * sin(phi);
+ half_vector.z = cos_theta;
+
+ return half_vector;
+}
+
+float distribution_GGX(float NdotH, float roughness4) {
+ float NdotH2 = NdotH * NdotH;
+ float denom = (NdotH2 * (roughness4 - 1.0) + 1.0);
+ denom = Math_PI * denom * denom;
+
+ return roughness4 / denom;
+}
+
+float radical_inverse_vdC(uint32_t bits) {
+ bits = (bits << 16) | (bits >> 16);
+ bits = ((bits & 0x55555555) << 1) | ((bits & 0xAAAAAAAA) >> 1);
+ bits = ((bits & 0x33333333) << 2) | ((bits & 0xCCCCCCCC) >> 2);
+ bits = ((bits & 0x0F0F0F0F) << 4) | ((bits & 0xF0F0F0F0) >> 4);
+ bits = ((bits & 0x00FF00FF) << 8) | ((bits & 0xFF00FF00) >> 8);
+
+ return float(bits) * 2.3283064365386963e-10;
+}
+
+Vector2 hammersley(uint32_t i, uint32_t N) {
+ return Vector2(float(i) / float(N), radical_inverse_vdC(i));
+}
+
void RasterizerSceneGLES3::_filter_sky_radiance(Sky *p_sky, int p_base_layer) {
GLES3::MaterialStorage *material_storage = GLES3::MaterialStorage::get_singleton();
@@ -1062,21 +946,60 @@ void RasterizerSceneGLES3::_filter_sky_radiance(Sky *p_sky, int p_base_layer) {
if (p_base_layer == 0) {
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
+ // Copy over base layer without filtering.
mode = CubemapFilterShaderGLES3::MODE_COPY;
-
- //Copy over base layer
}
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, sky_globals.radical_inverse_vdc_cache_tex);
int size = p_sky->radiance_size >> p_base_layer;
glViewport(0, 0, size, size);
glBindVertexArray(sky_globals.screen_triangle_array);
material_storage->shaders.cubemap_filter_shader.version_bind_shader(scene_globals.cubemap_filter_shader_version, mode);
- material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::SAMPLE_COUNT, sky_globals.ggx_samples, scene_globals.cubemap_filter_shader_version, mode);
- material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::ROUGHNESS, float(p_base_layer) / (p_sky->mipmap_count - 1.0), scene_globals.cubemap_filter_shader_version, mode);
- material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::FACE_SIZE, float(size), scene_globals.cubemap_filter_shader_version, mode);
+
+ if (p_base_layer > 0) {
+ const uint32_t sample_counts[4] = { 1, sky_globals.ggx_samples / 4, sky_globals.ggx_samples / 2, sky_globals.ggx_samples };
+ uint32_t sample_count = sample_counts[MIN(3, p_base_layer)];
+
+ float roughness = float(p_base_layer) / (p_sky->mipmap_count);
+ float roughness4 = roughness * roughness;
+ roughness4 *= roughness4;
+
+ float solid_angle_texel = 4.0 * Math_PI / float(6 * size * size);
+
+ LocalVector<float> sample_directions;
+ sample_directions.resize(4 * sample_count);
+
+ uint32_t index = 0;
+ float weight = 0.0;
+ for (uint32_t i = 0; i < sample_count; i++) {
+ Vector2 xi = hammersley(i, sample_count);
+ Vector3 dir = importance_sample_GGX(xi, roughness4);
+ Vector3 light_vec = (2.0 * dir.z * dir - Vector3(0.0, 0.0, 1.0));
+
+ if (light_vec.z < 0.0) {
+ continue;
+ }
+
+ sample_directions[index * 4] = light_vec.x;
+ sample_directions[index * 4 + 1] = light_vec.y;
+ sample_directions[index * 4 + 2] = light_vec.z;
+
+ float D = distribution_GGX(dir.z, roughness4);
+ float pdf = D * dir.z / (4.0 * dir.z) + 0.0001;
+
+ float solid_angle_sample = 1.0 / (float(sample_count) * pdf + 0.0001);
+
+ float mip_level = MAX(0.5 * log2(solid_angle_sample / solid_angle_texel) + float(MAX(1, p_base_layer - 3)), 1.0);
+
+ sample_directions[index * 4 + 3] = mip_level;
+ weight += light_vec.z;
+ index++;
+ }
+
+ glUniform4fv(material_storage->shaders.cubemap_filter_shader.version_get_uniform(CubemapFilterShaderGLES3::SAMPLE_DIRECTIONS_MIP, scene_globals.cubemap_filter_shader_version, mode), sample_count, sample_directions.ptr());
+ material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::WEIGHT, weight, scene_globals.cubemap_filter_shader_version, mode);
+ material_storage->shaders.cubemap_filter_shader.version_set_uniform(CubemapFilterShaderGLES3::SAMPLE_COUNT, index, scene_globals.cubemap_filter_shader_version, mode);
+ }
for (int i = 0; i < 6; i++) {
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, p_sky->radiance, p_base_layer);
@@ -1099,84 +1022,6 @@ Ref<Image> RasterizerSceneGLES3::sky_bake_panorama(RID p_sky, float p_energy, bo
/* ENVIRONMENT API */
-RID RasterizerSceneGLES3::environment_allocate() {
- return environment_owner.allocate_rid();
-}
-
-void RasterizerSceneGLES3::environment_initialize(RID p_rid) {
- environment_owner.initialize_rid(p_rid);
-}
-
-void RasterizerSceneGLES3::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->background = p_bg;
-}
-
-void RasterizerSceneGLES3::environment_set_sky(RID p_env, RID p_sky) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky = p_sky;
-}
-
-void RasterizerSceneGLES3::environment_set_sky_custom_fov(RID p_env, float p_scale) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky_custom_fov = p_scale;
-}
-
-void RasterizerSceneGLES3::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky_orientation = p_orientation;
-}
-
-void RasterizerSceneGLES3::environment_set_bg_color(RID p_env, const Color &p_color) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->bg_color = p_color;
-}
-
-void RasterizerSceneGLES3::environment_set_bg_energy(RID p_env, float p_energy) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->bg_energy = p_energy;
-}
-
-void RasterizerSceneGLES3::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->canvas_max_layer = p_max_layer;
-}
-
-void RasterizerSceneGLES3::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->ambient_light = p_color;
- env->ambient_source = p_ambient;
- env->ambient_light_energy = p_energy;
- env->ambient_sky_contribution = p_sky_contribution;
- env->reflection_source = p_reflection_source;
-}
-
-void RasterizerSceneGLES3::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- ERR_FAIL_COND_MSG(p_levels.size() != 7, "Size of array of glow levels must be 7");
- env->glow_enabled = p_enable;
- env->glow_levels = p_levels;
- env->glow_intensity = p_intensity;
- env->glow_strength = p_strength;
- env->glow_mix = p_mix;
- env->glow_bloom = p_bloom_threshold;
- env->glow_blend_mode = p_blend_mode;
- env->glow_hdr_bleed_threshold = p_hdr_bleed_threshold;
- env->glow_hdr_bleed_scale = p_hdr_bleed_scale;
- env->glow_hdr_luminance_cap = p_hdr_luminance_cap;
- env->glow_map_strength = p_glow_map_strength;
- env->glow_map = p_glow_map;
-}
-
void RasterizerSceneGLES3::environment_glow_set_use_bicubic_upscale(bool p_enable) {
glow_bicubic_upscale = p_enable;
}
@@ -1185,35 +1030,15 @@ void RasterizerSceneGLES3::environment_glow_set_use_high_quality(bool p_enable)
glow_high_quality = p_enable;
}
-void RasterizerSceneGLES3::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->ssr_enabled = p_enable;
- env->ssr_max_steps = p_max_steps;
- env->ssr_fade_in = p_fade_int;
- env->ssr_fade_out = p_fade_out;
- env->ssr_depth_tolerance = p_depth_tolerance;
-}
-
void RasterizerSceneGLES3::environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) {
}
-void RasterizerSceneGLES3::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-}
-
void RasterizerSceneGLES3::environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) {
}
-void RasterizerSceneGLES3::environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) {
-}
void RasterizerSceneGLES3::environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) {
}
-void RasterizerSceneGLES3::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
-}
-
void RasterizerSceneGLES3::environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) {
}
@@ -1223,49 +1048,6 @@ void RasterizerSceneGLES3::environment_set_sdfgi_frames_to_converge(RS::Environm
void RasterizerSceneGLES3::environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) {
}
-void RasterizerSceneGLES3::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->exposure = p_exposure;
- env->tone_mapper = p_tone_mapper;
- if (!env->auto_exposure && p_auto_exposure) {
- env->auto_exposure_version = ++auto_exposure_counter;
- }
- env->auto_exposure = p_auto_exposure;
- env->white = p_white;
- env->min_luminance = p_min_luminance;
- env->max_luminance = p_max_luminance;
- env->auto_exp_speed = p_auto_exp_speed;
- env->auto_exp_scale = p_auto_exp_scale;
-}
-
-void RasterizerSceneGLES3::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->adjustments_enabled = p_enable;
- env->adjustments_brightness = p_brightness;
- env->adjustments_contrast = p_contrast;
- env->adjustments_saturation = p_saturation;
- env->use_1d_color_correction = p_use_1d_color_correction;
- env->color_correction = p_color_correction;
-}
-
-void RasterizerSceneGLES3::environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->fog_enabled = p_enable;
- env->fog_light_color = p_light_color;
- env->fog_light_energy = p_light_energy;
- env->fog_sun_scatter = p_sun_scatter;
- env->fog_density = p_density;
- env->fog_height = p_height;
- env->fog_height_density = p_height_density;
- env->fog_aerial_perspective = p_aerial_perspective;
-}
-
-void RasterizerSceneGLES3::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) {
-}
-
void RasterizerSceneGLES3::environment_set_volumetric_fog_volume_size(int p_size, int p_depth) {
}
@@ -1273,27 +1055,9 @@ void RasterizerSceneGLES3::environment_set_volumetric_fog_filter_active(bool p_e
}
Ref<Image> RasterizerSceneGLES3::environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Ref<Image>());
return Ref<Image>();
}
-bool RasterizerSceneGLES3::is_environment(RID p_env) const {
- return environment_owner.owns(p_env);
-}
-
-RS::EnvironmentBG RasterizerSceneGLES3::environment_get_background(RID p_env) const {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, RS::ENV_BG_MAX);
- return env->background;
-}
-
-int RasterizerSceneGLES3::environment_get_canvas_max_layer(RID p_env) const {
- Environment *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->canvas_max_layer;
-}
-
RID RasterizerSceneGLES3::camera_effects_allocate() {
return RID();
}
@@ -1431,7 +1195,7 @@ bool RasterizerSceneGLES3::voxel_gi_needs_update(RID p_probe) const {
return false;
}
-void RasterizerSceneGLES3::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects) {
+void RasterizerSceneGLES3::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) {
}
void RasterizerSceneGLES3::voxel_gi_set_quality(RS::VoxelGIQuality) {
@@ -1633,18 +1397,17 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da
scene_state.ubo.time = time;
if (is_environment(p_render_data->environment)) {
- Environment *env = environment_owner.get_or_null(p_render_data->environment);
- RS::EnvironmentBG env_bg = env->background;
- RS::EnvironmentAmbientSource ambient_src = env->ambient_source;
+ RS::EnvironmentBG env_bg = environment_get_background(p_render_data->environment);
+ RS::EnvironmentAmbientSource ambient_src = environment_get_ambient_source(p_render_data->environment);
- float bg_energy = env->bg_energy;
+ float bg_energy = environment_get_bg_energy(p_render_data->environment);
scene_state.ubo.ambient_light_color_energy[3] = bg_energy;
- scene_state.ubo.ambient_color_sky_mix = env->ambient_sky_contribution;
+ scene_state.ubo.ambient_color_sky_mix = environment_get_ambient_sky_contribution(p_render_data->environment);
//ambient
if (ambient_src == RS::ENV_AMBIENT_SOURCE_BG && (env_bg == RS::ENV_BG_CLEAR_COLOR || env_bg == RS::ENV_BG_COLOR)) {
- Color color = env_bg == RS::ENV_BG_CLEAR_COLOR ? p_default_bg_color : env->bg_color;
+ Color color = env_bg == RS::ENV_BG_CLEAR_COLOR ? p_default_bg_color : environment_get_bg_color(p_render_data->environment);
color = color.srgb_to_linear();
scene_state.ubo.ambient_light_color_energy[0] = color.r * bg_energy;
@@ -1653,14 +1416,14 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da
scene_state.ubo.use_ambient_light = true;
scene_state.ubo.use_ambient_cubemap = false;
} else {
- float energy = env->ambient_light_energy;
- Color color = env->ambient_light;
+ float energy = environment_get_ambient_light_energy(p_render_data->environment);
+ Color color = environment_get_ambient_light(p_render_data->environment);
color = color.srgb_to_linear();
scene_state.ubo.ambient_light_color_energy[0] = color.r * energy;
scene_state.ubo.ambient_light_color_energy[1] = color.g * energy;
scene_state.ubo.ambient_light_color_energy[2] = color.b * energy;
- Basis sky_transform = env->sky_orientation;
+ Basis sky_transform = environment_get_sky_orientation(p_render_data->environment);
sky_transform = sky_transform.inverse() * p_render_data->cam_transform.basis;
GLES3::MaterialStorage::store_transform_3x3(sky_transform, scene_state.ubo.radiance_inverse_xform);
scene_state.ubo.use_ambient_cubemap = (ambient_src == RS::ENV_AMBIENT_SOURCE_BG && env_bg == RS::ENV_BG_SKY) || ambient_src == RS::ENV_AMBIENT_SOURCE_SKY;
@@ -1668,27 +1431,27 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da
}
//specular
- RS::EnvironmentReflectionSource ref_src = env->reflection_source;
+ RS::EnvironmentReflectionSource ref_src = environment_get_reflection_source(p_render_data->environment);
if ((ref_src == RS::ENV_REFLECTION_SOURCE_BG && env_bg == RS::ENV_BG_SKY) || ref_src == RS::ENV_REFLECTION_SOURCE_SKY) {
scene_state.ubo.use_reflection_cubemap = true;
} else {
scene_state.ubo.use_reflection_cubemap = false;
}
- scene_state.ubo.fog_enabled = env->fog_enabled;
- scene_state.ubo.fog_density = env->fog_density;
- scene_state.ubo.fog_height = env->fog_height;
- scene_state.ubo.fog_height_density = env->fog_height_density;
- scene_state.ubo.fog_aerial_perspective = env->fog_aerial_perspective;
+ scene_state.ubo.fog_enabled = environment_get_fog_enabled(p_render_data->environment);
+ scene_state.ubo.fog_density = environment_get_fog_density(p_render_data->environment);
+ scene_state.ubo.fog_height = environment_get_fog_height(p_render_data->environment);
+ scene_state.ubo.fog_height_density = environment_get_fog_height_density(p_render_data->environment);
+ scene_state.ubo.fog_aerial_perspective = environment_get_fog_aerial_perspective(p_render_data->environment);
- Color fog_color = env->fog_light_color.srgb_to_linear();
- float fog_energy = env->fog_light_energy;
+ Color fog_color = environment_get_fog_light_color(p_render_data->environment).srgb_to_linear();
+ float fog_energy = environment_get_fog_light_energy(p_render_data->environment);
scene_state.ubo.fog_light_color[0] = fog_color.r * fog_energy;
scene_state.ubo.fog_light_color[1] = fog_color.g * fog_energy;
scene_state.ubo.fog_light_color[2] = fog_color.b * fog_energy;
- scene_state.ubo.fog_sun_scatter = env->fog_sun_scatter;
+ scene_state.ubo.fog_sun_scatter = environment_get_fog_sun_scatter(p_render_data->environment);
} else {
}
@@ -1905,7 +1668,7 @@ void RasterizerSceneGLES3::_setup_lights(const RenderDataGLES3 *p_render_data, b
glBindBuffer(GL_UNIFORM_BUFFER, 0);
}
-void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) {
+void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) {
GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton();
GLES3::Config *config = GLES3::Config::get_singleton();
RENDER_TIMESTAMP("Setup 3D Scene");
@@ -1970,7 +1733,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
// Fill Light lists here
//////////
- GLuint global_buffer = GLES3::MaterialStorage::get_singleton()->global_variables_get_uniform_buffer();
+ GLuint global_buffer = GLES3::MaterialStorage::get_singleton()->global_shader_uniforms_get_uniform_buffer();
glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_GLOBALS_UNIFORM_LOCATION, global_buffer);
Color clear_color;
@@ -1980,8 +1743,6 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
clear_color = texture_storage->get_default_clear_color();
}
- Environment *env = environment_owner.get_or_null(p_environment);
-
bool fb_cleared = false;
Size2i screen_size;
@@ -1991,10 +1752,10 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
bool use_wireframe = get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME;
SceneState::TonemapUBO tonemap_ubo;
- if (env) {
- tonemap_ubo.exposure = env->exposure;
- tonemap_ubo.white = env->white;
- tonemap_ubo.tonemapper = int32_t(env->tone_mapper);
+ if (render_data.environment.is_valid()) {
+ tonemap_ubo.exposure = environment_get_exposure(render_data.environment);
+ tonemap_ubo.white = environment_get_white(render_data.environment);
+ tonemap_ubo.tonemapper = int32_t(environment_get_tone_mapper(render_data.environment));
}
if (scene_state.tonemap_buffer == 0) {
@@ -2017,25 +1778,25 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_OVERDRAW) {
clear_color = Color(0, 0, 0, 1); //in overdraw mode, BG should always be black
- } else if (env) {
- RS::EnvironmentBG bg_mode = env->background;
- float bg_energy = env->bg_energy;
+ } else if (render_data.environment.is_valid()) {
+ RS::EnvironmentBG bg_mode = environment_get_background(render_data.environment);
+ float bg_energy = environment_get_bg_energy(render_data.environment);
switch (bg_mode) {
case RS::ENV_BG_CLEAR_COLOR: {
clear_color.r *= bg_energy;
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
- if (env->fog_enabled) {
+ if (environment_get_fog_enabled(render_data.environment)) {
draw_sky_fog_only = true;
GLES3::MaterialStorage::get_singleton()->material_set_param(sky_globals.fog_material, "clear_color", Variant(clear_color));
}
} break;
case RS::ENV_BG_COLOR: {
- clear_color = env->bg_color;
+ clear_color = environment_get_bg_color(render_data.environment);
clear_color.r *= bg_energy;
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
- if (env->fog_enabled) {
+ if (environment_get_fog_enabled(render_data.environment)) {
draw_sky_fog_only = true;
GLES3::MaterialStorage::get_singleton()->material_set_param(sky_globals.fog_material, "clear_color", Variant(clear_color));
}
@@ -2055,7 +1816,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
}
}
// setup sky if used for ambient, reflections, or background
- if (draw_sky || draw_sky_fog_only || env->reflection_source == RS::ENV_REFLECTION_SOURCE_SKY || env->ambient_source == RS::ENV_AMBIENT_SOURCE_SKY) {
+ if (draw_sky || draw_sky_fog_only || environment_get_reflection_source(render_data.environment) == RS::ENV_REFLECTION_SOURCE_SKY || environment_get_ambient_source(render_data.environment) == RS::ENV_AMBIENT_SOURCE_SKY) {
RENDER_TIMESTAMP("Setup Sky");
Projection projection = render_data.cam_projection;
if (render_data.reflection_probe.is_valid()) {
@@ -2064,11 +1825,11 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
projection = correction * render_data.cam_projection;
}
- _setup_sky(env, p_render_buffers, *render_data.lights, projection, render_data.cam_transform, screen_size);
+ _setup_sky(render_data.environment, p_render_buffers, *render_data.lights, projection, render_data.cam_transform, screen_size);
- if (env->sky.is_valid()) {
- if (env->reflection_source == RS::ENV_REFLECTION_SOURCE_SKY || env->ambient_source == RS::ENV_AMBIENT_SOURCE_SKY || (env->reflection_source == RS::ENV_REFLECTION_SOURCE_BG && env->background == RS::ENV_BG_SKY)) {
- _update_sky_radiance(env, projection, render_data.cam_transform);
+ if (environment_get_sky(render_data.environment).is_valid()) {
+ if (environment_get_reflection_source(render_data.environment) == RS::ENV_REFLECTION_SOURCE_SKY || environment_get_ambient_source(render_data.environment) == RS::ENV_AMBIENT_SOURCE_SKY || (environment_get_reflection_source(render_data.environment) == RS::ENV_REFLECTION_SOURCE_BG && environment_get_background(render_data.environment) == RS::ENV_BG_SKY)) {
+ _update_sky_radiance(render_data.environment, projection, render_data.cam_transform);
}
} else {
// do not try to draw sky if invalid
@@ -2148,7 +1909,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_DIRECTIONAL_LIGHTS;
}
- if (!env || (env && !env->fog_enabled)) {
+ if (render_data.environment.is_null() || (render_data.environment.is_valid() && !environment_get_fog_enabled(render_data.environment))) {
spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_FOG;
}
}
@@ -2172,7 +1933,7 @@ void RasterizerSceneGLES3::render_scene(RID p_render_buffers, const CameraData *
scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_DISABLED;
scene_state.cull_mode = GLES3::SceneShaderData::CULL_BACK;
- _draw_sky(env, render_data.cam_projection, render_data.cam_transform);
+ _draw_sky(render_data.environment, render_data.cam_projection, render_data.cam_transform);
}
RENDER_TIMESTAMP("Render 3D Transparent Pass");
@@ -2221,11 +1982,10 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
}
if (p_pass_mode == PASS_MODE_COLOR || p_pass_mode == PASS_MODE_COLOR_TRANSPARENT) {
- Environment *env = environment_owner.get_or_null(p_render_data->environment);
glActiveTexture(GL_TEXTURE0 + config->max_texture_image_units - 2);
GLuint texture_to_bind = texture_storage->get_texture(texture_storage->texture_gl_get_default(GLES3::DEFAULT_GL_TEXTURE_CUBEMAP_BLACK))->tex_id;
- if (env) {
- Sky *sky = sky_owner.get_or_null(env->sky);
+ if (p_render_data->environment.is_valid()) {
+ Sky *sky = sky_owner.get_or_null(environment_get_sky(p_render_data->environment));
if (sky && sky->radiance != 0) {
texture_to_bind = sky->radiance;
// base_spec_constant |= USE_RADIANCE_MAP;
@@ -2490,10 +2250,10 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
}
}
-void RasterizerSceneGLES3::render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RasterizerSceneGLES3::render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
}
-void RasterizerSceneGLES3::render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) {
+void RasterizerSceneGLES3::render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) {
}
void RasterizerSceneGLES3::set_time(double p_time, double p_step) {
@@ -2510,7 +2270,7 @@ RID RasterizerSceneGLES3::render_buffers_create() {
return render_buffers_owner.make_rid(rb);
}
-void RasterizerSceneGLES3::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) {
+void RasterizerSceneGLES3::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) {
GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton();
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
@@ -2624,8 +2384,8 @@ TypedArray<Image> RasterizerSceneGLES3::bake_render_uv2(RID p_base, const Vector
}
bool RasterizerSceneGLES3::free(RID p_rid) {
- if (environment_owner.owns(p_rid)) {
- environment_owner.free(p_rid);
+ if (is_environment(p_rid)) {
+ environment_free(p_rid);
} else if (sky_owner.owns(p_rid)) {
Sky *sky = sky_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!sky, false);
@@ -2705,7 +2465,7 @@ RasterizerSceneGLES3::RasterizerSceneGLES3() {
{
String global_defines;
- global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now
+ global_defines += "#define MAX_GLOBAL_SHADER_UNIFORMS 256\n"; // TODO: this is arbitrary for now
global_defines += "\n#define MAX_LIGHT_DATA_STRUCTS " + itos(config->max_renderable_lights) + "\n";
global_defines += "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(MAX_DIRECTIONAL_LIGHTS) + "\n";
global_defines += "\n#define MAX_FORWARD_LIGHTS " + itos(config->max_lights_per_object) + "\n";
@@ -2744,13 +2504,17 @@ void fragment() {
sky_globals.ggx_samples = GLOBAL_GET("rendering/reflections/sky_reflections/ggx_samples");
String global_defines;
- global_defines += "#define MAX_GLOBAL_VARIABLES 256\n"; // TODO: this is arbitrary for now
+ global_defines += "#define MAX_GLOBAL_SHADER_UNIFORMS 256\n"; // TODO: this is arbitrary for now
global_defines += "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(sky_globals.max_directional_lights) + "\n";
material_storage->shaders.sky_shader.initialize(global_defines);
sky_globals.shader_default_version = material_storage->shaders.sky_shader.version_create();
material_storage->shaders.sky_shader.version_bind_shader(sky_globals.shader_default_version, SkyShaderGLES3::MODE_BACKGROUND);
+ }
- material_storage->shaders.cubemap_filter_shader.initialize();
+ {
+ String global_defines;
+ global_defines += "\n#define MAX_SAMPLE_COUNT " + itos(sky_globals.ggx_samples) + "\n";
+ material_storage->shaders.cubemap_filter_shader.initialize(global_defines);
scene_globals.cubemap_filter_shader_version = material_storage->shaders.cubemap_filter_shader.version_create();
material_storage->shaders.cubemap_filter_shader.version_bind_shader(scene_globals.cubemap_filter_shader_version, CubemapFilterShaderGLES3::MODE_DEFAULT);
}
@@ -2820,36 +2584,6 @@ void sky() {
glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
}
- // Radical inverse vdc cache texture used for cubemap filtering.
- {
- glGenTextures(1, &sky_globals.radical_inverse_vdc_cache_tex);
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, sky_globals.radical_inverse_vdc_cache_tex);
-
- uint8_t radical_inverse[512];
-
- for (uint32_t i = 0; i < 512; i++) {
- uint32_t bits = i;
-
- bits = (bits << 16) | (bits >> 16);
- bits = ((bits & 0x55555555) << 1) | ((bits & 0xAAAAAAAA) >> 1);
- bits = ((bits & 0x33333333) << 2) | ((bits & 0xCCCCCCCC) >> 2);
- bits = ((bits & 0x0F0F0F0F) << 4) | ((bits & 0xF0F0F0F0) >> 4);
- bits = ((bits & 0x00FF00FF) << 8) | ((bits & 0xFF00FF00) >> 8);
-
- float value = float(bits) * 2.3283064365386963e-10;
- radical_inverse[i] = uint8_t(CLAMP(value * 255.0, 0, 255));
- }
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, 512, 1, 0, GL_RED, GL_UNSIGNED_BYTE, radical_inverse);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); //need this for proper sampling
-
- glBindTexture(GL_TEXTURE_2D, 0);
- }
#ifdef GLES_OVER_GL
glEnable(_EXT_TEXTURE_CUBE_MAP_SEAMLESS);
#endif
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 3ac8770228..e227b2df82 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -107,7 +107,7 @@ struct RenderDataGLES3 {
float z_near = 0.0;
float z_far = 0.0;
- const PagedArray<RendererSceneRender::GeometryInstance *> *instances = nullptr;
+ const PagedArray<RenderGeometryInstance *> *instances = nullptr;
const PagedArray<RID> *lights = nullptr;
const PagedArray<RID> *reflection_probes = nullptr;
RID environment = RID();
@@ -210,7 +210,7 @@ private:
mutable RID_Owner<LightInstance> light_instance_owner;
- struct GeometryInstanceGLES3;
+ class GeometryInstanceGLES3;
// Cached data for drawing surfaces
struct GeometryInstanceSurface {
@@ -265,33 +265,16 @@ private:
GeometryInstanceGLES3 *owner = nullptr;
};
- struct GeometryInstanceGLES3 : public GeometryInstance {
+ class GeometryInstanceGLES3 : public RenderGeometryInstanceBase {
+ public:
//used during rendering
- bool mirror = false;
- bool non_uniform_scale = false;
- float lod_bias = 0.0;
- float lod_model_scale = 1.0;
- AABB transformed_aabb; //needed for LOD
- float depth = 0;
- uint32_t flags_cache = 0;
bool store_transform_cache = true;
- int32_t shader_parameters_offset = -1;
- uint32_t layer_mask = 1;
int32_t instance_count = 0;
- RID mesh_instance;
bool can_sdfgi = false;
bool using_projectors = false;
bool using_softshadows = false;
- bool fade_near = false;
- float fade_near_begin = 0;
- float fade_near_end = 0;
- bool fade_far = false;
- float fade_far_begin = 0;
- float fade_far_end = 0;
- float force_alpha = 1.0;
- float parent_fade_alpha = 1.0;
uint32_t omni_light_count = 0;
LocalVector<RID> omni_lights;
@@ -301,35 +284,22 @@ private:
LocalVector<uint32_t> spot_light_gl_cache;
//used during setup
- uint32_t base_flags = 0;
- Transform3D transform;
GeometryInstanceSurface *surface_caches = nullptr;
SelfList<GeometryInstanceGLES3> dirty_list_element;
- struct Data {
- //data used less often goes into regular heap
- RID base;
- RS::InstanceType base_type;
-
- RID skeleton;
- Vector<RID> surface_materials;
- RID material_override;
- RID material_overlay;
- AABB aabb;
-
- bool use_dynamic_gi = false;
- bool use_baked_light = false;
- bool cast_double_sided_shadows = false;
- bool mirror = false;
- bool dirty_dependencies = false;
+ GeometryInstanceGLES3() :
+ dirty_list_element(this) {}
- DependencyTracker dependency_tracker;
- };
+ virtual void _mark_dirty() override;
+ virtual void set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
+ virtual void set_lightmap_capture(const Color *p_sh9) override;
- Data *data = nullptr;
+ virtual void pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) override;
+ virtual void pair_reflection_probe_instances(const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override {}
+ virtual void pair_decal_instances(const RID *p_decal_instances, uint32_t p_decal_instance_count) override {}
+ virtual void pair_voxel_gi_instances(const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override {}
- GeometryInstanceGLES3() :
- dirty_list_element(this) {}
+ virtual void set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) override {}
};
enum {
@@ -357,8 +327,7 @@ private:
void _geometry_instance_add_surface_with_material(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh);
void _geometry_instance_add_surface_with_material_chain(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, GLES3::SceneMaterialData *p_material, RID p_mat_src, RID p_mesh);
void _geometry_instance_add_surface(GeometryInstanceGLES3 *ginstance, uint32_t p_surface, RID p_material, RID p_mesh);
- void _geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance);
- void _geometry_instance_update(GeometryInstance *p_geometry_instance);
+ void _geometry_instance_update(RenderGeometryInstance *p_geometry_instance);
void _update_dirty_geometry_instances();
struct SceneState {
@@ -570,85 +539,6 @@ protected:
/* Environment */
- struct Environment {
- // BG
- RS::EnvironmentBG background = RS::ENV_BG_CLEAR_COLOR;
- RID sky;
- float sky_custom_fov = 0.0;
- Basis sky_orientation;
- Color bg_color;
- float bg_energy = 1.0;
- int canvas_max_layer = 0;
- RS::EnvironmentAmbientSource ambient_source = RS::ENV_AMBIENT_SOURCE_BG;
- Color ambient_light;
- float ambient_light_energy = 1.0;
- float ambient_sky_contribution = 1.0;
- RS::EnvironmentReflectionSource reflection_source = RS::ENV_REFLECTION_SOURCE_BG;
- Color ao_color;
-
- /// Tonemap
-
- RS::EnvironmentToneMapper tone_mapper;
- float exposure = 1.0;
- float white = 1.0;
- bool auto_exposure = false;
- float min_luminance = 0.2;
- float max_luminance = 8.0;
- float auto_exp_speed = 0.2;
- float auto_exp_scale = 0.5;
- uint64_t auto_exposure_version = 0;
-
- // Fog
- bool fog_enabled = false;
- Color fog_light_color = Color(0.5, 0.6, 0.7);
- float fog_light_energy = 1.0;
- float fog_sun_scatter = 0.0;
- float fog_density = 0.001;
- float fog_height = 0.0;
- float fog_height_density = 0.0; //can be negative to invert effect
- float fog_aerial_perspective = 0.0;
-
- /// Glow
- bool glow_enabled = false;
- Vector<float> glow_levels;
- float glow_intensity = 0.8;
- float glow_strength = 1.0;
- float glow_bloom = 0.0;
- float glow_mix = 0.01;
- RS::EnvironmentGlowBlendMode glow_blend_mode = RS::ENV_GLOW_BLEND_MODE_SOFTLIGHT;
- float glow_hdr_bleed_threshold = 1.0;
- float glow_hdr_luminance_cap = 12.0;
- float glow_hdr_bleed_scale = 2.0;
- float glow_map_strength = 1.0;
- RID glow_map = RID();
-
- /// SSAO
- bool ssao_enabled = false;
- float ssao_radius = 1.0;
- float ssao_intensity = 2.0;
- float ssao_power = 1.5;
- float ssao_detail = 0.5;
- float ssao_horizon = 0.06;
- float ssao_sharpness = 0.98;
- float ssao_direct_light_affect = 0.0;
- float ssao_ao_channel_affect = 0.0;
-
- /// SSR
- bool ssr_enabled = false;
- int ssr_max_steps = 64;
- float ssr_fade_in = 0.15;
- float ssr_fade_out = 2.0;
- float ssr_depth_tolerance = 0.2;
-
- /// Adjustments
- bool adjustments_enabled = false;
- float adjustments_brightness = 1.0f;
- float adjustments_contrast = 1.0f;
- float adjustments_saturation = 1.0f;
- bool use_1d_color_correction = false;
- RID color_correction = RID();
- };
-
RS::EnvironmentSSAOQuality ssao_quality = RS::ENV_SSAO_QUALITY_MEDIUM;
bool ssao_half_size = false;
float ssao_adaptive_target = 0.5;
@@ -660,10 +550,6 @@ protected:
bool glow_high_quality = false;
RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::ENV_SSR_ROUGHNESS_QUALITY_LOW;
- static uint64_t auto_exposure_counter;
-
- mutable RID_Owner<Environment, true> environment_owner;
-
/* Sky */
struct SkyGlobals {
@@ -729,44 +615,23 @@ protected:
Sky *dirty_sky_list = nullptr;
mutable RID_Owner<Sky, true> sky_owner;
- void _setup_sky(Environment *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size);
+ void _setup_sky(RID p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size);
void _invalidate_sky(Sky *p_sky);
void _update_dirty_skys();
- void _update_sky_radiance(Environment *p_env, const Projection &p_projection, const Transform3D &p_transform);
+ void _update_sky_radiance(RID p_env, const Projection &p_projection, const Transform3D &p_transform);
void _filter_sky_radiance(Sky *p_sky, int p_base_layer);
- void _draw_sky(Environment *p_env, const Projection &p_projection, const Transform3D &p_transform);
+ void _draw_sky(RID p_env, const Projection &p_projection, const Transform3D &p_transform);
void _free_sky_data(Sky *p_sky);
public:
+ static RasterizerSceneGLES3 *get_singleton() { return singleton; }
+
RasterizerCanvasGLES3 *canvas;
- GeometryInstance *geometry_instance_create(RID p_base) override;
- void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) override;
- void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) override;
- void geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) override;
- void geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_material) override;
- void geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) override;
- void geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) override;
- void geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) override;
- void geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) override;
- void geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) override;
- void geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override;
- void geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) override;
- void geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) override;
- void geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) override;
- void geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
- void geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) override;
- void geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) override;
- void geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) override;
+ RenderGeometryInstance *geometry_instance_create(RID p_base) override;
+ void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;
uint32_t geometry_instance_get_pair_mask() override;
- void geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) override;
- void geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override;
- void geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) override;
- void geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override;
- void geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) override;
-
- void geometry_instance_free(GeometryInstance *p_geometry_instance) override;
/* SHADOW ATLAS API */
@@ -803,49 +668,24 @@ public:
/* ENVIRONMENT API */
- RID environment_allocate() override;
- void environment_initialize(RID p_rid) override;
- void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) override;
- void environment_set_sky(RID p_env, RID p_sky) override;
- void environment_set_sky_custom_fov(RID p_env, float p_scale) override;
- void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) override;
- void environment_set_bg_color(RID p_env, const Color &p_color) override;
- void environment_set_bg_energy(RID p_env, float p_energy) override;
- void environment_set_canvas_max_layer(RID p_env, int p_max_layer) override;
- void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG) override;
-
- void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) override;
void environment_glow_set_use_bicubic_upscale(bool p_enable) override;
void environment_glow_set_use_high_quality(bool p_enable) override;
- void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) override;
void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override;
- void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) override;
+
void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
- void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) override;
- void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
- void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
+ void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override;
void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override;
void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) override;
- void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) override;
-
- void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) override;
-
- void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) override;
- void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) override;
void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) override;
void environment_set_volumetric_fog_filter_active(bool p_enable) override;
Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) override;
- bool is_environment(RID p_env) const override;
- RS::EnvironmentBG environment_get_background(RID p_env) const override;
- int environment_get_canvas_max_layer(RID p_env) const override;
-
RID camera_effects_allocate() override;
void camera_effects_initialize(RID p_rid) override;
void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) override;
@@ -899,13 +739,13 @@ public:
RID voxel_gi_instance_create(RID p_voxel_gi) override;
void voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform) override;
bool voxel_gi_needs_update(RID p_probe) const override;
- void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects) override;
+ void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) override;
void voxel_gi_set_quality(RS::VoxelGIQuality) override;
- void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) override;
- void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) override;
+ void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) override;
+ void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) override;
void set_scene_pass(uint64_t p_pass) override {
scene_pass = p_pass;
@@ -922,7 +762,7 @@ public:
}
RID render_buffers_create() override;
- void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override;
+ void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override;
void gi_set_use_half_resolution(bool p_enable) override;
void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) override;
@@ -940,7 +780,6 @@ public:
void decals_set_filter(RS::DecalFilter p_filter) override;
void light_projectors_set_filter(RS::LightProjectorFilter p_filter) override;
- static RasterizerSceneGLES3 *get_singleton();
RasterizerSceneGLES3();
~RasterizerSceneGLES3();
};
diff --git a/drivers/gles3/shaders/canvas_uniforms_inc.glsl b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
index e08a15e59d..852dccf415 100644
--- a/drivers/gles3/shaders/canvas_uniforms_inc.glsl
+++ b/drivers/gles3/shaders/canvas_uniforms_inc.glsl
@@ -58,8 +58,8 @@ struct DrawData {
uvec4 lights;
};
-layout(std140) uniform GlobalVariableData { //ubo:1
- vec4 global_variables[MAX_GLOBAL_VARIABLES];
+layout(std140) uniform GlobalShaderUniformData { //ubo:1
+ vec4 global_shader_uniforms[MAX_GLOBAL_SHADER_UNIFORMS];
};
layout(std140) uniform CanvasData { //ubo:0
diff --git a/drivers/gles3/shaders/cubemap_filter.glsl b/drivers/gles3/shaders/cubemap_filter.glsl
index ebf0c08ec4..57f0d7d0b8 100644
--- a/drivers/gles3/shaders/cubemap_filter.glsl
+++ b/drivers/gles3/shaders/cubemap_filter.glsl
@@ -29,19 +29,15 @@ uniform samplerCube source_cube; //texunit:0
/* clang-format on */
uniform int face_id;
-uniform float roughness;
-uniform float face_size;
-uniform int sample_count;
-//Todo, profile on low end hardware to see if fixed loop is faster
-#ifdef USE_FIXED_SAMPLES
-#define FIXED_SAMPLE_COUNT 32
+#ifndef MODE_DIRECT_WRITE
+uniform int sample_count;
+uniform vec4 sample_directions_mip[MAX_SAMPLE_COUNT];
+uniform float weight;
#endif
in highp vec2 uv_interp;
-uniform sampler2D radical_inverse_vdc_cache; // texunit:1
-
layout(location = 0) out vec4 frag_color;
#define M_PI 3.14159265359
@@ -93,48 +89,6 @@ vec3 texelCoordToVec(vec2 uv, int faceID) {
return normalize(result);
}
-vec3 ImportanceSampleGGX(vec2 xi, float roughness4) {
- // Compute distribution direction
- float Phi = 2.0 * M_PI * xi.x;
- float CosTheta = sqrt((1.0 - xi.y) / (1.0 + (roughness4 - 1.0) * xi.y));
- float SinTheta = sqrt(1.0 - CosTheta * CosTheta);
-
- // Convert to spherical direction
- vec3 H;
- H.x = SinTheta * cos(Phi);
- H.y = SinTheta * sin(Phi);
- H.z = CosTheta;
-
- return H;
-}
-
-float DistributionGGX(float NdotH, float roughness4) {
- float NdotH2 = NdotH * NdotH;
- float denom = (NdotH2 * (roughness4 - 1.0) + 1.0);
- denom = M_PI * denom * denom;
-
- return roughness4 / denom;
-}
-
-// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
-float GGX(float NdotV, float a) {
- float k = a / 2.0;
- return NdotV / (NdotV * (1.0 - k) + k);
-}
-
-// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
-float G_Smith(float a, float nDotV, float nDotL) {
- return GGX(nDotL, a * a) * GGX(nDotV, a * a);
-}
-
-float radical_inverse_VdC(int i) {
- return texture(radical_inverse_vdc_cache, vec2(float(i) / 512.0, 0.0)).x;
-}
-
-vec2 Hammersley(int i, int N) {
- return vec2(float(i) / float(N), radical_inverse_VdC(i));
-}
-
void main() {
vec3 color = vec3(0.0);
vec2 uv = uv_interp;
@@ -145,9 +99,6 @@ void main() {
#else
vec4 sum = vec4(0.0);
- float solid_angle_texel = 4.0 * M_PI / (6.0 * face_size * face_size);
- float roughness2 = roughness * roughness;
- float roughness4 = roughness2 * roughness2;
vec3 UpVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
mat3 T;
T[0] = normalize(cross(UpVector, N));
@@ -155,32 +106,15 @@ void main() {
T[2] = N;
for (int sample_num = 0; sample_num < sample_count; sample_num++) {
- vec2 xi = Hammersley(sample_num, sample_count);
-
- vec3 H = T * ImportanceSampleGGX(xi, roughness4);
- float NdotH = dot(N, H);
- vec3 L = (2.0 * NdotH * H - N);
-
- float NdotL = clamp(dot(N, L), 0.0, 1.0);
-
- if (NdotL > 0.0) {
- float D = DistributionGGX(NdotH, roughness4);
- float pdf = D * NdotH / (4.0 * NdotH) + 0.0001;
-
- float solid_angle_sample = 1.0 / (float(sample_count) * pdf + 0.0001);
-
- float mipLevel = roughness == 0.0 ? 0.0 : 0.5 * log2(solid_angle_sample / solid_angle_texel);
-
- vec3 val = textureLod(source_cube, L, mipLevel).rgb;
- // Mix using linear
- val = srgb_to_linear(val);
-
- sum.rgb += val * NdotL;
- sum.a += NdotL;
- }
+ vec4 sample = sample_directions_mip[sample_num];
+ vec3 L = T * sample.xyz;
+ vec3 val = textureLod(source_cube, L, sample.w).rgb;
+ // Mix using linear
+ val = srgb_to_linear(val);
+ sum.rgb += val * sample.z;
}
- sum /= sum.a;
+ sum /= weight;
sum.rgb = linear_to_srgb(sum.rgb);
frag_color = vec4(sum.rgb, 1.0);
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 2f9ffac89b..93bb4c191d 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -104,8 +104,8 @@ layout(location = 14) in highp vec4 instance_xform2;
layout(location = 15) in highp uvec4 instance_color_custom_data; // Color packed into xy, Custom data into zw.
#endif
-layout(std140) uniform GlobalVariableData { //ubo:1
- vec4 global_variables[MAX_GLOBAL_VARIABLES];
+layout(std140) uniform GlobalShaderUniformData { //ubo:1
+ vec4 global_shader_uniforms[MAX_GLOBAL_SHADER_UNIFORMS];
};
layout(std140) uniform SceneData { // ubo:2
@@ -399,8 +399,8 @@ uniform samplerCube radiance_map; // texunit:-2
#endif
-layout(std140) uniform GlobalVariableData { //ubo:1
- vec4 global_variables[MAX_GLOBAL_VARIABLES];
+layout(std140) uniform GlobalShaderUniformData { //ubo:1
+ vec4 global_shader_uniforms[MAX_GLOBAL_SHADER_UNIFORMS];
};
/* Material Uniforms */
diff --git a/drivers/gles3/shaders/sky.glsl b/drivers/gles3/shaders/sky.glsl
index 50ab38bc31..eb1befe38e 100644
--- a/drivers/gles3/shaders/sky.glsl
+++ b/drivers/gles3/shaders/sky.glsl
@@ -42,8 +42,8 @@ uniform sampler2D half_res; //texunit:-2
uniform sampler2D quarter_res; //texunit:-3
#endif
-layout(std140) uniform GlobalVariableData { //ubo:1
- vec4 global_variables[MAX_GLOBAL_VARIABLES];
+layout(std140) uniform GlobalShaderUniformData { //ubo:1
+ vec4 global_shader_uniforms[MAX_GLOBAL_SHADER_UNIFORMS];
};
struct DirectionalLightData {
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 91c4320acc..68045930b0 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -180,10 +180,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 2 * p_array_size;
const int *r = iv.ptr();
@@ -210,10 +206,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 3 * p_array_size;
const int *r = iv.ptr();
@@ -242,10 +234,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 4 * p_array_size;
const int *r = iv.ptr();
@@ -298,10 +286,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 2 * p_array_size;
const int *r = iv.ptr();
@@ -328,10 +312,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 3 * p_array_size;
const int *r = iv.ptr();
@@ -360,10 +340,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 4 * p_array_size;
const int *r = iv.ptr();
@@ -997,7 +973,7 @@ void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguag
if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL) {
//this is a global variable, get the index to it
- GlobalVariables::Variable *gv = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *gv = material_storage->global_shader_uniforms.variables.getptr(E.key);
uint32_t index = 0;
if (gv) {
index = gv->buffer_index;
@@ -1053,9 +1029,9 @@ void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguag
if (uses_global_buffer != (global_buffer_E != nullptr)) {
if (uses_global_buffer) {
- global_buffer_E = material_storage->global_variables.materials_using_buffer.push_back(self);
+ global_buffer_E = material_storage->global_shader_uniforms.materials_using_buffer.push_back(self);
} else {
- material_storage->global_variables.materials_using_buffer.erase(global_buffer_E);
+ material_storage->global_shader_uniforms.materials_using_buffer.erase(global_buffer_E);
global_buffer_E = nullptr;
}
}
@@ -1066,20 +1042,20 @@ MaterialData::~MaterialData() {
if (global_buffer_E) {
//unregister global buffers
- material_storage->global_variables.materials_using_buffer.erase(global_buffer_E);
+ material_storage->global_shader_uniforms.materials_using_buffer.erase(global_buffer_E);
}
if (global_texture_E) {
//unregister global textures
for (const KeyValue<StringName, uint64_t> &E : used_global_textures) {
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(E.key);
if (v) {
v->texture_materials.erase(self);
}
}
//unregister material from those using global textures
- material_storage->global_variables.materials_using_texture.erase(global_texture_E);
+ material_storage->global_shader_uniforms.materials_using_texture.erase(global_texture_E);
}
if (uniform_buffer) {
@@ -1110,7 +1086,7 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
if (p_texture_uniforms[i].global) {
uses_global_textures = true;
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(uniform_name);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(uniform_name);
if (v) {
if (v->buffer_index >= 0) {
WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!.");
@@ -1282,7 +1258,7 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
if (E.value != global_textures_pass) {
to_delete.push_back(E.key);
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(E.key);
if (v) {
v->texture_materials.erase(self);
}
@@ -1296,9 +1272,9 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
//handle registering/unregistering global textures
if (uses_global_textures != (global_texture_E != nullptr)) {
if (uses_global_textures) {
- global_texture_E = material_storage->global_variables.materials_using_texture.push_back(self);
+ global_texture_E = material_storage->global_shader_uniforms.materials_using_texture.push_back(self);
} else {
- material_storage->global_variables.materials_using_texture.erase(global_texture_E);
+ material_storage->global_shader_uniforms.materials_using_texture.erase(global_texture_E);
global_texture_E = nullptr;
}
}
@@ -1365,22 +1341,22 @@ MaterialStorage::MaterialStorage() {
material_data_request_func[RS::SHADER_SKY] = _create_sky_material_func;
material_data_request_func[RS::SHADER_FOG] = nullptr;
- static_assert(sizeof(GlobalVariables::Value) == 16);
+ static_assert(sizeof(GlobalShaderUniforms::Value) == 16);
- global_variables.buffer_size = MAX(4096, (int)GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size"));
- if (global_variables.buffer_size > uint32_t(Config::get_singleton()->max_uniform_buffer_size)) {
- global_variables.buffer_size = uint32_t(Config::get_singleton()->max_uniform_buffer_size);
+ global_shader_uniforms.buffer_size = MAX(4096, (int)GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size"));
+ if (global_shader_uniforms.buffer_size > uint32_t(Config::get_singleton()->max_uniform_buffer_size)) {
+ global_shader_uniforms.buffer_size = uint32_t(Config::get_singleton()->max_uniform_buffer_size);
WARN_PRINT("Project setting: rendering/limits/global_shader_variables/buffer_size exceeds maximum uniform buffer size of: " + itos(Config::get_singleton()->max_uniform_buffer_size));
}
- global_variables.buffer_values = memnew_arr(GlobalVariables::Value, global_variables.buffer_size);
- memset(global_variables.buffer_values, 0, sizeof(GlobalVariables::Value) * global_variables.buffer_size);
- global_variables.buffer_usage = memnew_arr(GlobalVariables::ValueUsage, global_variables.buffer_size);
- global_variables.buffer_dirty_regions = memnew_arr(bool, global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE);
- memset(global_variables.buffer_dirty_regions, 0, sizeof(bool) * global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE);
- glGenBuffers(1, &global_variables.buffer);
- glBindBuffer(GL_UNIFORM_BUFFER, global_variables.buffer);
- glBufferData(GL_UNIFORM_BUFFER, sizeof(GlobalVariables::Value) * global_variables.buffer_size, nullptr, GL_DYNAMIC_DRAW);
+ global_shader_uniforms.buffer_values = memnew_arr(GlobalShaderUniforms::Value, global_shader_uniforms.buffer_size);
+ memset(global_shader_uniforms.buffer_values, 0, sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size);
+ global_shader_uniforms.buffer_usage = memnew_arr(GlobalShaderUniforms::ValueUsage, global_shader_uniforms.buffer_size);
+ global_shader_uniforms.buffer_dirty_regions = memnew_arr(bool, global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE);
+ memset(global_shader_uniforms.buffer_dirty_regions, 0, sizeof(bool) * global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE);
+ glGenBuffers(1, &global_shader_uniforms.buffer);
+ glBindBuffer(GL_UNIFORM_BUFFER, global_shader_uniforms.buffer);
+ glBufferData(GL_UNIFORM_BUFFER, sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size, nullptr, GL_DYNAMIC_DRAW);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
{
@@ -1518,7 +1494,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["NORMAL_ROUGHNESS_TEXTURE"] = "normal_roughness_buffer";
actions.renames["DEPTH"] = "gl_FragDepth";
actions.renames["OUTPUT_IS_SRGB"] = "true";
- actions.renames["FOG"] = "custom_fog";
+ actions.renames["FOG"] = "fog";
actions.renames["RADIANCE"] = "custom_radiance";
actions.renames["IRRADIANCE"] = "custom_irradiance";
actions.renames["BONE_INDICES"] = "bone_attrib";
@@ -1674,7 +1650,7 @@ ShaderCompiler::DefaultIdentifierActions actions;
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
particles_shader.compiler.initialize(actions);
*/
@@ -1736,25 +1712,25 @@ ShaderCompiler::DefaultIdentifierActions actions;
MaterialStorage::~MaterialStorage() {
//shaders.copy.version_free(shaders.copy_version);
- memdelete_arr(global_variables.buffer_values);
- memdelete_arr(global_variables.buffer_usage);
- memdelete_arr(global_variables.buffer_dirty_regions);
- glDeleteBuffers(1, &global_variables.buffer);
+ memdelete_arr(global_shader_uniforms.buffer_values);
+ memdelete_arr(global_shader_uniforms.buffer_usage);
+ memdelete_arr(global_shader_uniforms.buffer_dirty_regions);
+ glDeleteBuffers(1, &global_shader_uniforms.buffer);
singleton = nullptr;
}
-/* GLOBAL VARIABLE API */
+/* GLOBAL SHADER UNIFORM API */
-int32_t MaterialStorage::_global_variable_allocate(uint32_t p_elements) {
+int32_t MaterialStorage::_global_shader_uniform_allocate(uint32_t p_elements) {
int32_t idx = 0;
- while (idx + p_elements <= global_variables.buffer_size) {
- if (global_variables.buffer_usage[idx].elements == 0) {
+ while (idx + p_elements <= global_shader_uniforms.buffer_size) {
+ if (global_shader_uniforms.buffer_usage[idx].elements == 0) {
bool valid = true;
for (uint32_t i = 1; i < p_elements; i++) {
- if (global_variables.buffer_usage[idx + i].elements > 0) {
+ if (global_shader_uniforms.buffer_usage[idx + i].elements > 0) {
valid = false;
- idx += i + global_variables.buffer_usage[idx + i].elements;
+ idx += i + global_shader_uniforms.buffer_usage[idx + i].elements;
break;
}
}
@@ -1765,17 +1741,17 @@ int32_t MaterialStorage::_global_variable_allocate(uint32_t p_elements) {
return idx;
} else {
- idx += global_variables.buffer_usage[idx].elements;
+ idx += global_shader_uniforms.buffer_usage[idx].elements;
}
}
return -1;
}
-void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::GlobalVariableType p_type, const Variant &p_value) {
+void MaterialStorage::_global_shader_uniform_store_in_buffer(int32_t p_index, RS::GlobalShaderUniformType p_type, const Variant &p_value) {
switch (p_type) {
case RS::GLOBAL_VAR_TYPE_BOOL: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
bool b = p_value;
bv.x = b ? 1.0 : 0.0;
bv.y = 0.0;
@@ -1784,7 +1760,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_BVEC2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1792,7 +1768,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_BVEC3: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1800,7 +1776,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_BVEC4: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1808,7 +1784,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = (bvec & 8) ? 1.0 : 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_INT: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
int32_t v = p_value;
bv.x = v;
bv.y = 0;
@@ -1816,7 +1792,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC2: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector2i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1824,7 +1800,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC3: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector3i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1832,7 +1808,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC4: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector<int32_t> v = p_value;
bv.x = v.size() >= 1 ? v[0] : 0;
bv.y = v.size() >= 2 ? v[1] : 0;
@@ -1840,7 +1816,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size() >= 4 ? v[3] : 0;
} break;
case RS::GLOBAL_VAR_TYPE_RECT2I: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Rect2i v = p_value;
bv.x = v.position.x;
bv.y = v.position.y;
@@ -1848,7 +1824,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size.y;
} break;
case RS::GLOBAL_VAR_TYPE_UINT: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
uint32_t v = p_value;
bv.x = v;
bv.y = 0;
@@ -1856,7 +1832,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC2: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector2i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1864,7 +1840,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC3: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector3i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1872,7 +1848,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC4: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector<int32_t> v = p_value;
bv.x = v.size() >= 1 ? v[0] : 0;
bv.y = v.size() >= 2 ? v[1] : 0;
@@ -1880,7 +1856,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size() >= 4 ? v[3] : 0;
} break;
case RS::GLOBAL_VAR_TYPE_FLOAT: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
float v = p_value;
bv.x = v;
bv.y = 0;
@@ -1888,7 +1864,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Vector2 v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1896,7 +1872,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC3: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Vector3 v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1904,7 +1880,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC4: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Plane v = p_value;
bv.x = v.normal.x;
bv.y = v.normal.y;
@@ -1912,14 +1888,14 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.d;
} break;
case RS::GLOBAL_VAR_TYPE_COLOR: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Color v = p_value;
bv.x = v.r;
bv.y = v.g;
bv.z = v.b;
bv.w = v.a;
- GlobalVariables::Value &bv_linear = global_variables.buffer_values[p_index + 1];
+ GlobalShaderUniforms::Value &bv_linear = global_shader_uniforms.buffer_values[p_index + 1];
//v = v.srgb_to_linear();
bv_linear.x = v.r;
bv_linear.y = v.g;
@@ -1928,7 +1904,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_RECT2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Rect2 v = p_value;
bv.x = v.position.x;
bv.y = v.position.y;
@@ -1936,7 +1912,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size.y;
} break;
case RS::GLOBAL_VAR_TYPE_MAT2: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Vector<float> m2 = p_value;
if (m2.size() < 4) {
m2.resize(4);
@@ -1953,7 +1929,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_MAT3: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Basis v = p_value;
bv[0].x = v.rows[0][0];
bv[0].y = v.rows[1][0];
@@ -1972,7 +1948,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_MAT4: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Vector<float> m2 = p_value;
if (m2.size() < 16) {
@@ -2001,7 +1977,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_TRANSFORM_2D: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Transform2D v = p_value;
bv[0].x = v.columns[0][0];
bv[0].y = v.columns[0][1];
@@ -2020,7 +1996,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_TRANSFORM: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Transform3D v = p_value;
bv[0].x = v.basis.rows[0][0];
bv[0].y = v.basis.rows[1][0];
@@ -2049,15 +2025,15 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
}
}
-void MaterialStorage::_global_variable_mark_buffer_dirty(int32_t p_index, int32_t p_elements) {
+void MaterialStorage::_global_shader_uniform_mark_buffer_dirty(int32_t p_index, int32_t p_elements) {
int32_t prev_chunk = -1;
for (int32_t i = 0; i < p_elements; i++) {
- int32_t chunk = (p_index + i) / GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
+ int32_t chunk = (p_index + i) / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
if (chunk != prev_chunk) {
- if (!global_variables.buffer_dirty_regions[chunk]) {
- global_variables.buffer_dirty_regions[chunk] = true;
- global_variables.buffer_dirty_region_count++;
+ if (!global_shader_uniforms.buffer_dirty_regions[chunk]) {
+ global_shader_uniforms.buffer_dirty_regions[chunk] = true;
+ global_shader_uniforms.buffer_dirty_region_count++;
}
}
@@ -2065,16 +2041,16 @@ void MaterialStorage::_global_variable_mark_buffer_dirty(int32_t p_index, int32_
}
}
-void MaterialStorage::global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) {
- ERR_FAIL_COND(global_variables.variables.has(p_name));
- GlobalVariables::Variable gv;
+void MaterialStorage::global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) {
+ ERR_FAIL_COND(global_shader_uniforms.variables.has(p_name));
+ GlobalShaderUniforms::Variable gv;
gv.type = p_type;
gv.value = p_value;
gv.buffer_index = -1;
if (p_type >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
//is texture
- global_variables.must_update_texture_materials = true; //normally there are none
+ global_shader_uniforms.must_update_texture_materials = true; //normally there are none
} else {
gv.buffer_elements = 1;
if (p_type == RS::GLOBAL_VAR_TYPE_COLOR || p_type == RS::GLOBAL_VAR_TYPE_MAT2) {
@@ -2091,56 +2067,56 @@ void MaterialStorage::global_variable_add(const StringName &p_name, RS::GlobalVa
}
//is vector, allocate in buffer and update index
- gv.buffer_index = _global_variable_allocate(gv.buffer_elements);
+ gv.buffer_index = _global_shader_uniform_allocate(gv.buffer_elements);
ERR_FAIL_COND_MSG(gv.buffer_index < 0, vformat("Failed allocating global variable '%s' out of buffer memory. Consider increasing it in the Project Settings.", String(p_name)));
- global_variables.buffer_usage[gv.buffer_index].elements = gv.buffer_elements;
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ global_shader_uniforms.buffer_usage[gv.buffer_index].elements = gv.buffer_elements;
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
- global_variables.must_update_buffer_materials = true; //normally there are none
+ global_shader_uniforms.must_update_buffer_materials = true; //normally there are none
}
- global_variables.variables[p_name] = gv;
+ global_shader_uniforms.variables[p_name] = gv;
}
-void MaterialStorage::global_variable_remove(const StringName &p_name) {
- if (!global_variables.variables.has(p_name)) {
+void MaterialStorage::global_shader_uniform_remove(const StringName &p_name) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return;
}
- GlobalVariables::Variable &gv = global_variables.variables[p_name];
+ GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
if (gv.buffer_index >= 0) {
- global_variables.buffer_usage[gv.buffer_index].elements = 0;
- global_variables.must_update_buffer_materials = true;
+ global_shader_uniforms.buffer_usage[gv.buffer_index].elements = 0;
+ global_shader_uniforms.must_update_buffer_materials = true;
} else {
- global_variables.must_update_texture_materials = true;
+ global_shader_uniforms.must_update_texture_materials = true;
}
- global_variables.variables.erase(p_name);
+ global_shader_uniforms.variables.erase(p_name);
}
-Vector<StringName> MaterialStorage::global_variable_get_list() const {
+Vector<StringName> MaterialStorage::global_shader_uniform_get_list() const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(Vector<StringName>(), "This function should never be used outside the editor, it can severely damage performance.");
}
Vector<StringName> names;
- for (const KeyValue<StringName, GlobalVariables::Variable> &E : global_variables.variables) {
+ for (const KeyValue<StringName, GlobalShaderUniforms::Variable> &E : global_shader_uniforms.variables) {
names.push_back(E.key);
}
names.sort_custom<StringName::AlphCompare>();
return names;
}
-void MaterialStorage::global_variable_set(const StringName &p_name, const Variant &p_value) {
- ERR_FAIL_COND(!global_variables.variables.has(p_name));
- GlobalVariables::Variable &gv = global_variables.variables[p_name];
+void MaterialStorage::global_shader_uniform_set(const StringName &p_name, const Variant &p_value) {
+ ERR_FAIL_COND(!global_shader_uniforms.variables.has(p_name));
+ GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
gv.value = p_value;
if (gv.override.get_type() == Variant::NIL) {
if (gv.buffer_index >= 0) {
//buffer
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
} else {
//texture
MaterialStorage *material_storage = MaterialStorage::get_singleton();
@@ -2153,26 +2129,26 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian
}
}
-void MaterialStorage::global_variable_set_override(const StringName &p_name, const Variant &p_value) {
- if (!global_variables.variables.has(p_name)) {
+void MaterialStorage::global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return; //variable may not exist
}
ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT);
- GlobalVariables::Variable &gv = global_variables.variables[p_name];
+ GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
gv.override = p_value;
if (gv.buffer_index >= 0) {
//buffer
if (gv.override.get_type() == Variant::NIL) {
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
} else {
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.override);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.override);
}
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
} else {
//texture
MaterialStorage *material_storage = MaterialStorage::get_singleton();
@@ -2184,35 +2160,35 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con
}
}
-Variant MaterialStorage::global_variable_get(const StringName &p_name) const {
+Variant MaterialStorage::global_shader_uniform_get(const StringName &p_name) const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(Variant(), "This function should never be used outside the editor, it can severely damage performance.");
}
- if (!global_variables.variables.has(p_name)) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return Variant();
}
- return global_variables.variables[p_name].value;
+ return global_shader_uniforms.variables[p_name].value;
}
-RS::GlobalVariableType MaterialStorage::global_variable_get_type_internal(const StringName &p_name) const {
- if (!global_variables.variables.has(p_name)) {
+RS::GlobalShaderUniformType MaterialStorage::global_shader_uniform_get_type_internal(const StringName &p_name) const {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return RS::GLOBAL_VAR_TYPE_MAX;
}
- return global_variables.variables[p_name].type;
+ return global_shader_uniforms.variables[p_name].type;
}
-RS::GlobalVariableType MaterialStorage::global_variable_get_type(const StringName &p_name) const {
+RS::GlobalShaderUniformType MaterialStorage::global_shader_uniform_get_type(const StringName &p_name) const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(RS::GLOBAL_VAR_TYPE_MAX, "This function should never be used outside the editor, it can severely damage performance.");
}
- return global_variable_get_type_internal(p_name);
+ return global_shader_uniform_get_type_internal(p_name);
}
-void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
+void MaterialStorage::global_shader_uniforms_load_settings(bool p_load_textures) {
List<PropertyInfo> settings;
ProjectSettings::get_singleton()->get_property_list(&settings);
@@ -2257,11 +2233,11 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
"samplerCube",
};
- RS::GlobalVariableType gvtype = RS::GLOBAL_VAR_TYPE_MAX;
+ RS::GlobalShaderUniformType gvtype = RS::GLOBAL_VAR_TYPE_MAX;
for (int i = 0; i < RS::GLOBAL_VAR_TYPE_MAX; i++) {
if (global_var_type_names[i] == type) {
- gvtype = RS::GlobalVariableType(i);
+ gvtype = RS::GlobalShaderUniformType(i);
break;
}
}
@@ -2283,47 +2259,47 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
value = resource;
}
- if (global_variables.variables.has(name)) {
+ if (global_shader_uniforms.variables.has(name)) {
//has it, update it
- global_variable_set(name, value);
+ global_shader_uniform_set(name, value);
} else {
- global_variable_add(name, gvtype, value);
+ global_shader_uniform_add(name, gvtype, value);
}
}
}
}
-void MaterialStorage::global_variables_clear() {
- global_variables.variables.clear();
+void MaterialStorage::global_shader_uniforms_clear() {
+ global_shader_uniforms.variables.clear();
}
-GLuint MaterialStorage::global_variables_get_uniform_buffer() const {
- return global_variables.buffer;
+GLuint MaterialStorage::global_shader_uniforms_get_uniform_buffer() const {
+ return global_shader_uniforms.buffer;
}
-int32_t MaterialStorage::global_variables_instance_allocate(RID p_instance) {
- ERR_FAIL_COND_V(global_variables.instance_buffer_pos.has(p_instance), -1);
- int32_t pos = _global_variable_allocate(ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES);
- global_variables.instance_buffer_pos[p_instance] = pos; //save anyway
+int32_t MaterialStorage::global_shader_uniforms_instance_allocate(RID p_instance) {
+ ERR_FAIL_COND_V(global_shader_uniforms.instance_buffer_pos.has(p_instance), -1);
+ int32_t pos = _global_shader_uniform_allocate(ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES);
+ global_shader_uniforms.instance_buffer_pos[p_instance] = pos; //save anyway
ERR_FAIL_COND_V_MSG(pos < 0, -1, "Too many instances using shader instance variables. Increase buffer size in Project Settings.");
- global_variables.buffer_usage[pos].elements = ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES;
+ global_shader_uniforms.buffer_usage[pos].elements = ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES;
return pos;
}
-void MaterialStorage::global_variables_instance_free(RID p_instance) {
- ERR_FAIL_COND(!global_variables.instance_buffer_pos.has(p_instance));
- int32_t pos = global_variables.instance_buffer_pos[p_instance];
+void MaterialStorage::global_shader_uniforms_instance_free(RID p_instance) {
+ ERR_FAIL_COND(!global_shader_uniforms.instance_buffer_pos.has(p_instance));
+ int32_t pos = global_shader_uniforms.instance_buffer_pos[p_instance];
if (pos >= 0) {
- global_variables.buffer_usage[pos].elements = 0;
+ global_shader_uniforms.buffer_usage[pos].elements = 0;
}
- global_variables.instance_buffer_pos.erase(p_instance);
+ global_shader_uniforms.instance_buffer_pos.erase(p_instance);
}
-void MaterialStorage::global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) {
- if (!global_variables.instance_buffer_pos.has(p_instance)) {
+void MaterialStorage::global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) {
+ if (!global_shader_uniforms.instance_buffer_pos.has(p_instance)) {
return; //just not allocated, ignore
}
- int32_t pos = global_variables.instance_buffer_pos[p_instance];
+ int32_t pos = global_shader_uniforms.instance_buffer_pos[p_instance];
if (pos < 0) {
return; //again, not allocated, ignore
@@ -2358,59 +2334,59 @@ void MaterialStorage::global_variables_instance_update(RID p_instance, int p_ind
pos += p_index;
- _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_variables.buffer_values[pos]);
- _global_variable_mark_buffer_dirty(pos, 1);
+ _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_shader_uniforms.buffer_values[pos]);
+ _global_shader_uniform_mark_buffer_dirty(pos, 1);
}
-void MaterialStorage::_update_global_variables() {
+void MaterialStorage::_update_global_shader_uniforms() {
MaterialStorage *material_storage = MaterialStorage::get_singleton();
- if (global_variables.buffer_dirty_region_count > 0) {
- uint32_t total_regions = global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
- if (total_regions / global_variables.buffer_dirty_region_count <= 4) {
+ if (global_shader_uniforms.buffer_dirty_region_count > 0) {
+ uint32_t total_regions = global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
+ if (total_regions / global_shader_uniforms.buffer_dirty_region_count <= 4) {
// 25% of regions dirty, just update all buffer
- glBindBuffer(GL_UNIFORM_BUFFER, global_variables.buffer);
- glBufferData(GL_UNIFORM_BUFFER, sizeof(GlobalVariables::Value) * global_variables.buffer_size, global_variables.buffer_values, GL_DYNAMIC_DRAW);
+ glBindBuffer(GL_UNIFORM_BUFFER, global_shader_uniforms.buffer);
+ glBufferData(GL_UNIFORM_BUFFER, sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size, global_shader_uniforms.buffer_values, GL_DYNAMIC_DRAW);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
- memset(global_variables.buffer_dirty_regions, 0, sizeof(bool) * total_regions);
+ memset(global_shader_uniforms.buffer_dirty_regions, 0, sizeof(bool) * total_regions);
} else {
- uint32_t region_byte_size = sizeof(GlobalVariables::Value) * GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
- glBindBuffer(GL_UNIFORM_BUFFER, global_variables.buffer);
+ uint32_t region_byte_size = sizeof(GlobalShaderUniforms::Value) * GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
+ glBindBuffer(GL_UNIFORM_BUFFER, global_shader_uniforms.buffer);
for (uint32_t i = 0; i < total_regions; i++) {
- if (global_variables.buffer_dirty_regions[i]) {
- glBufferSubData(GL_UNIFORM_BUFFER, i * region_byte_size, region_byte_size, &global_variables.buffer_values[i * GlobalVariables::BUFFER_DIRTY_REGION_SIZE]);
- global_variables.buffer_dirty_regions[i] = false;
+ if (global_shader_uniforms.buffer_dirty_regions[i]) {
+ glBufferSubData(GL_UNIFORM_BUFFER, i * region_byte_size, region_byte_size, &global_shader_uniforms.buffer_values[i * GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE]);
+ global_shader_uniforms.buffer_dirty_regions[i] = false;
}
}
glBindBuffer(GL_UNIFORM_BUFFER, 0);
}
- global_variables.buffer_dirty_region_count = 0;
+ global_shader_uniforms.buffer_dirty_region_count = 0;
}
- if (global_variables.must_update_buffer_materials) {
+ if (global_shader_uniforms.must_update_buffer_materials) {
// only happens in the case of a buffer variable added or removed,
// so not often.
- for (const RID &E : global_variables.materials_using_buffer) {
+ for (const RID &E : global_shader_uniforms.materials_using_buffer) {
Material *material = material_storage->get_material(E);
ERR_CONTINUE(!material); //wtf
material_storage->_material_queue_update(material, true, false);
}
- global_variables.must_update_buffer_materials = false;
+ global_shader_uniforms.must_update_buffer_materials = false;
}
- if (global_variables.must_update_texture_materials) {
+ if (global_shader_uniforms.must_update_texture_materials) {
// only happens in the case of a buffer variable added or removed,
// so not often.
- for (const RID &E : global_variables.materials_using_texture) {
+ for (const RID &E : global_shader_uniforms.materials_using_texture) {
Material *material = material_storage->get_material(E);
ERR_CONTINUE(!material); //wtf
material_storage->_material_queue_update(material, false, true);
}
- global_variables.must_update_texture_materials = false;
+ global_shader_uniforms.must_update_texture_materials = false;
}
}
diff --git a/drivers/gles3/storage/material_storage.h b/drivers/gles3/storage/material_storage.h
index 91e1eee306..8fc15ddcba 100644
--- a/drivers/gles3/storage/material_storage.h
+++ b/drivers/gles3/storage/material_storage.h
@@ -365,15 +365,15 @@ struct SceneMaterialData : public MaterialData {
MaterialData *_create_scene_material_func(ShaderData *p_shader);
-/* Global variable structs */
-struct GlobalVariables {
+/* Global shader uniform structs */
+struct GlobalShaderUniforms {
enum {
BUFFER_DIRTY_REGION_SIZE = 1024
};
struct Variable {
HashSet<RID> texture_materials; // materials using this
- RS::GlobalVariableType type;
+ RS::GlobalShaderUniformType type;
Variant value;
Variant override;
int32_t buffer_index; //for vectors
@@ -429,13 +429,13 @@ private:
friend struct MaterialData;
static MaterialStorage *singleton;
- /* GLOBAL VARIABLE API */
+ /* GLOBAL SHADER UNIFORM API */
- GlobalVariables global_variables;
+ GlobalShaderUniforms global_shader_uniforms;
- int32_t _global_variable_allocate(uint32_t p_elements);
- void _global_variable_store_in_buffer(int32_t p_index, RS::GlobalVariableType p_type, const Variant &p_value);
- void _global_variable_mark_buffer_dirty(int32_t p_index, int32_t p_elements);
+ int32_t _global_shader_uniform_allocate(uint32_t p_elements);
+ void _global_shader_uniform_store_in_buffer(int32_t p_index, RS::GlobalShaderUniformType p_type, const Variant &p_value);
+ void _global_shader_uniform_mark_buffer_dirty(int32_t p_index, int32_t p_elements);
/* SHADER API */
@@ -508,28 +508,28 @@ public:
ShaderCompiler compiler_sky;
} shaders;
- /* GLOBAL VARIABLE API */
+ /* GLOBAL SHADER UNIFORM API */
- void _update_global_variables();
+ void _update_global_shader_uniforms();
- virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) override;
- virtual void global_variable_remove(const StringName &p_name) override;
- virtual Vector<StringName> global_variable_get_list() const override;
+ virtual void global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) override;
+ virtual void global_shader_uniform_remove(const StringName &p_name) override;
+ virtual Vector<StringName> global_shader_uniform_get_list() const override;
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) override;
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) override;
- virtual Variant global_variable_get(const StringName &p_name) const override;
- virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const override;
- RS::GlobalVariableType global_variable_get_type_internal(const StringName &p_name) const;
+ virtual void global_shader_uniform_set(const StringName &p_name, const Variant &p_value) override;
+ virtual void global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) override;
+ virtual Variant global_shader_uniform_get(const StringName &p_name) const override;
+ virtual RS::GlobalShaderUniformType global_shader_uniform_get_type(const StringName &p_name) const override;
+ RS::GlobalShaderUniformType global_shader_uniform_get_type_internal(const StringName &p_name) const;
- virtual void global_variables_load_settings(bool p_load_textures = true) override;
- virtual void global_variables_clear() override;
+ virtual void global_shader_uniforms_load_settings(bool p_load_textures = true) override;
+ virtual void global_shader_uniforms_clear() override;
- virtual int32_t global_variables_instance_allocate(RID p_instance) override;
- virtual void global_variables_instance_free(RID p_instance) override;
- virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) override;
+ virtual int32_t global_shader_uniforms_instance_allocate(RID p_instance) override;
+ virtual void global_shader_uniforms_instance_free(RID p_instance) override;
+ virtual void global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) override;
- GLuint global_variables_get_uniform_buffer() const;
+ GLuint global_shader_uniforms_get_uniform_buffer() const;
/* SHADER API */
diff --git a/drivers/gles3/storage/utilities.cpp b/drivers/gles3/storage/utilities.cpp
index a00210a2ab..654104722b 100644
--- a/drivers/gles3/storage/utilities.cpp
+++ b/drivers/gles3/storage/utilities.cpp
@@ -293,7 +293,7 @@ void Utilities::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_de
/* MISC */
void Utilities::update_dirty_resources() {
- MaterialStorage::get_singleton()->_update_global_variables();
+ MaterialStorage::get_singleton()->_update_global_shader_uniforms();
MaterialStorage::get_singleton()->_update_queued_materials();
//MeshStorage::get_singleton()->_update_dirty_skeletons();
MeshStorage::get_singleton()->_update_dirty_multimeshes();
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 704ddca726..275f3240d7 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -35,7 +35,7 @@
#include "drivers/png/png_driver_common.h"
#include "scene/resources/texture.h"
-Error ResourceSaverPNG::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceSaverPNG::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<ImageTexture> texture = p_resource;
ERR_FAIL_COND_V_MSG(!texture.is_valid(), ERR_INVALID_PARAMETER, "Can't save invalid texture as PNG.");
diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h
index 1a681faaec..260a643a1b 100644
--- a/drivers/png/resource_saver_png.h
+++ b/drivers/png/resource_saver_png.h
@@ -39,7 +39,7 @@ public:
static Error save_image(const String &p_path, const Ref<Image> &p_img);
static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img);
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 9abd4780eb..0979ae9e16 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -1834,6 +1834,11 @@ RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const T
if (p_format.usage_bits & TEXTURE_USAGE_STORAGE_ATOMIC_BIT && !(flags & VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT)) {
ERR_FAIL_V_MSG(RID(), "Format " + format_text + " does not support usage as atomic storage image.");
}
+
+ // Validation via VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR fails if VRS attachment is not supported.
+ if (p_format.usage_bits & TEXTURE_USAGE_VRS_ATTACHMENT_BIT && p_format.format != DATA_FORMAT_R8_UINT) {
+ ERR_FAIL_V_MSG(RID(), "Format " + format_text + " does not support usage as VRS attachment.");
+ }
}
//some view validation
@@ -3354,6 +3359,11 @@ bool RenderingDeviceVulkan::texture_is_format_supported_for_usage(DataFormat p_f
return false;
}
+ // Validation via VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR fails if VRS attachment is not supported.
+ if (p_usage & TEXTURE_USAGE_VRS_ATTACHMENT_BIT && p_format != DATA_FORMAT_R8_UINT) {
+ return false;
+ }
+
return true;
}
@@ -3807,7 +3817,12 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
subpass.pNext = subpass_nextptr;
subpass.flags = 0;
subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
- subpass.viewMask = view_mask;
+ if (p_view_count == 1) {
+ // VUID-VkSubpassDescription2-multiview-06558: If the multiview feature is not enabled, viewMask must be 0.
+ subpass.viewMask = 0;
+ } else {
+ subpass.viewMask = view_mask;
+ }
subpass.inputAttachmentCount = input_references.size();
if (input_references.size()) {
subpass.pInputAttachments = input_references.ptr();
@@ -3895,8 +3910,14 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
render_pass_create_info.pDependencies = nullptr;
}
- render_pass_create_info.correlatedViewMaskCount = 1;
- render_pass_create_info.pCorrelatedViewMasks = &correlation_mask;
+ if (p_view_count == 1) {
+ // VUID-VkRenderPassCreateInfo2-viewMask-03057: If the VkSubpassDescription2::viewMask member of all elements of pSubpasses is 0, correlatedViewMaskCount must be 0.
+ render_pass_create_info.correlatedViewMaskCount = 0;
+ render_pass_create_info.pCorrelatedViewMasks = nullptr;
+ } else {
+ render_pass_create_info.correlatedViewMaskCount = 1;
+ render_pass_create_info.pCorrelatedViewMasks = &correlation_mask;
+ }
Vector<uint32_t> view_masks;
VkRenderPassMultiviewCreateInfo render_pass_multiview_create_info;
@@ -3997,6 +4018,7 @@ RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_format_c
subpass.pNext = nullptr;
subpass.flags = 0;
subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
+ subpass.viewMask = 0;
subpass.inputAttachmentCount = 0; //unsupported for now
subpass.pInputAttachments = nullptr;
subpass.colorAttachmentCount = 0;
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 524693eb03..0d8a3310fd 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -1827,7 +1827,7 @@ Error VulkanContext::_update_swap_chain(Window *window) {
/*pNext*/ nullptr,
/*flags*/ 0,
/*pipelineBindPoint*/ VK_PIPELINE_BIND_POINT_GRAPHICS,
- /*viewMask*/ 1,
+ /*viewMask*/ 0,
/*inputAttachmentCount*/ 0,
/*pInputAttachments*/ nullptr,
/*colorAttachmentCount*/ 1,
@@ -1838,7 +1838,6 @@ Error VulkanContext::_update_swap_chain(Window *window) {
/*pPreserveAttachments*/ nullptr,
};
- uint32_t view_masks = 1;
const VkRenderPassCreateInfo2KHR rp_info = {
/*sType*/ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR,
/*pNext*/ nullptr,
@@ -1849,8 +1848,8 @@ Error VulkanContext::_update_swap_chain(Window *window) {
/*pSubpasses*/ &subpass,
/*dependencyCount*/ 0,
/*pDependencies*/ nullptr,
- /*correlatedViewMaskCount*/ 1,
- /*pCorrelatedViewMasks*/ &view_masks,
+ /*correlatedViewMaskCount*/ 0,
+ /*pCorrelatedViewMasks*/ nullptr,
};
err = vkCreateRenderPass2KHR(device, &rp_info, nullptr, &window->render_pass);
@@ -2402,7 +2401,7 @@ void VulkanContext::command_begin_label(VkCommandBuffer p_command_buffer, String
return;
}
- CharString cs = p_label_name.utf8().get_data();
+ CharString cs = p_label_name.utf8();
VkDebugUtilsLabelEXT label;
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
label.pNext = nullptr;
@@ -2418,7 +2417,7 @@ void VulkanContext::command_insert_label(VkCommandBuffer p_command_buffer, Strin
if (!enabled_debug_utils) {
return;
}
- CharString cs = p_label_name.utf8().get_data();
+ CharString cs = p_label_name.utf8();
VkDebugUtilsLabelEXT label;
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
label.pNext = nullptr;
diff --git a/editor/SCsub b/editor/SCsub
index a596c7d364..c217f162b4 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -76,7 +76,7 @@ if env["tools"]:
# Editor translations
to_include = (
- "ar,bg,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,lv,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,th,tr,uk,vi,zh_CN,zh_TW"
+ "ar,bg,ca,cs,de,el,eo,es_AR,es,fi,fr,gl,he,hu,id,it,ja,ko,lv,ms,nb,nl,pl,pt_BR,pt,ro,ru,sk,sv,th,tr,uk,vi,zh_CN,zh_TW"
).split(",")
tlist = [env.Dir("#editor/translations").abspath + "/" + f + ".po" for f in to_include]
env.Depends("#editor/editor_translations.gen.h", tlist)
@@ -113,6 +113,7 @@ if env["tools"]:
env.add_source_files(env.editor_sources, "register_exporters.gen.cpp")
SConscript("debugger/SCsub")
+ SConscript("export/SCsub")
SConscript("fileserver/SCsub")
SConscript("icons/SCsub")
SConscript("import/SCsub")
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 8c59d65c80..462f314471 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -720,7 +720,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
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), varray(i));
+ mod_checkboxes[i]->connect("toggled", callable_mp(this, &InputEventConfigurationDialog::_mod_toggled).bind(i));
mod_checkboxes[i]->set_text(name);
mod_container->add_child(mod_checkboxes[i]);
}
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 44e04efb5d..ab9afda803 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -654,9 +654,9 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
- connect("clear_selection", Callable(editor, "_clear_selection"), varray(false));
- connect("select_key", Callable(editor, "_key_selected"), varray(), CONNECT_DEFERRED);
- connect("deselect_key", Callable(editor, "_key_deselected"), varray(), CONNECT_DEFERRED);
+ connect("clear_selection", Callable(editor, "_clear_selection").bind(false));
+ connect("select_key", Callable(editor, "_key_selected"), CONNECT_DEFERRED);
+ connect("deselect_key", Callable(editor, "_key_deselected"), CONNECT_DEFERRED);
}
void AnimationBezierTrackEdit::_play_position_draw() {
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 234bfb944c..e66aa88eb9 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -3428,7 +3428,7 @@ void AnimationTrackEditor::set_root(Node *p_root) {
root = p_root;
if (root) {
- root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), make_binds(), CONNECT_ONESHOT);
+ root->connect("tree_exiting", callable_mp(this, &AnimationTrackEditor::_root_removed), CONNECT_ONESHOT);
}
_update_tracks();
@@ -3746,19 +3746,7 @@ void AnimationTrackEditor::_insert_track(bool p_reset_wanted, bool p_create_bezi
undo_redo->commit_action();
if (advance) {
- float step = animation->get_step();
- if (step == 0) {
- step = 1;
- }
-
- float pos = timeline->get_play_position();
-
- pos = Math::snapped(pos + step, step);
- if (pos > animation->get_length()) {
- pos = animation->get_length();
- }
- set_anim_pos(pos);
- emit_signal(SNAME("timeline_changed"), pos, true, false);
+ _edit_menu_pressed(EDIT_GOTO_NEXT_STEP_TIMELINE_ONLY);
}
}
@@ -4086,12 +4074,20 @@ void AnimationTrackEditor::_confirm_insert_list() {
}
TrackIndices next_tracks(animation.ptr(), reset_anim.ptr());
+ bool advance = false;
while (insert_data.size()) {
+ if (insert_data.front()->get().advance) {
+ advance = true;
+ }
next_tracks = _confirm_insert(insert_data.front()->get(), next_tracks, create_reset, reset_anim, insert_confirm_bezier->is_pressed());
insert_data.pop_front();
}
undo_redo->commit_action();
+
+ if (advance) {
+ _edit_menu_pressed(EDIT_GOTO_NEXT_STEP_TIMELINE_ONLY);
+ }
}
PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val) {
@@ -4518,20 +4514,20 @@ void AnimationTrackEditor::_update_tracks() {
}
track_edit->connect("timeline_changed", callable_mp(this, &AnimationTrackEditor::_timeline_changed));
- track_edit->connect("remove_request", callable_mp(this, &AnimationTrackEditor::_track_remove_request), varray(), CONNECT_DEFERRED);
- track_edit->connect("dropped", callable_mp(this, &AnimationTrackEditor::_dropped_track), varray(), CONNECT_DEFERRED);
- track_edit->connect("insert_key", callable_mp(this, &AnimationTrackEditor::_insert_key_from_track), varray(i), CONNECT_DEFERRED);
- track_edit->connect("select_key", callable_mp(this, &AnimationTrackEditor::_key_selected), varray(i), CONNECT_DEFERRED);
- track_edit->connect("deselect_key", callable_mp(this, &AnimationTrackEditor::_key_deselected), varray(i), CONNECT_DEFERRED);
+ track_edit->connect("remove_request", callable_mp(this, &AnimationTrackEditor::_track_remove_request), CONNECT_DEFERRED);
+ track_edit->connect("dropped", callable_mp(this, &AnimationTrackEditor::_dropped_track), CONNECT_DEFERRED);
+ track_edit->connect("insert_key", callable_mp(this, &AnimationTrackEditor::_insert_key_from_track).bind(i), CONNECT_DEFERRED);
+ track_edit->connect("select_key", callable_mp(this, &AnimationTrackEditor::_key_selected).bind(i), CONNECT_DEFERRED);
+ track_edit->connect("deselect_key", callable_mp(this, &AnimationTrackEditor::_key_deselected).bind(i), CONNECT_DEFERRED);
track_edit->connect("move_selection_begin", callable_mp(this, &AnimationTrackEditor::_move_selection_begin));
track_edit->connect("move_selection", callable_mp(this, &AnimationTrackEditor::_move_selection));
track_edit->connect("move_selection_commit", callable_mp(this, &AnimationTrackEditor::_move_selection_commit));
track_edit->connect("move_selection_cancel", callable_mp(this, &AnimationTrackEditor::_move_selection_cancel));
- track_edit->connect("duplicate_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED);
- track_edit->connect("duplicate_transpose_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED);
- track_edit->connect("create_reset_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_ADD_RESET_KEY), CONNECT_DEFERRED);
- track_edit->connect("delete_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_DELETE_SELECTION), CONNECT_DEFERRED);
+ track_edit->connect("duplicate_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_DUPLICATE_SELECTION), CONNECT_DEFERRED);
+ track_edit->connect("duplicate_transpose_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_DUPLICATE_TRANSPOSED), CONNECT_DEFERRED);
+ track_edit->connect("create_reset_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_ADD_RESET_KEY), CONNECT_DEFERRED);
+ track_edit->connect("delete_request", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_DELETE_SELECTION), CONNECT_DEFERRED);
}
}
@@ -5597,7 +5593,7 @@ void AnimationTrackEditor::goto_prev_step(bool p_from_mouse_event) {
emit_signal(SNAME("timeline_changed"), pos, true, false);
}
-void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event) {
+void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event, bool p_timeline_only) {
if (animation.is_null()) {
return;
}
@@ -5621,7 +5617,7 @@ void AnimationTrackEditor::goto_next_step(bool p_from_mouse_event) {
}
set_anim_pos(pos);
- emit_signal(SNAME("timeline_changed"), pos, true, false);
+ emit_signal(SNAME("timeline_changed"), pos, true, p_timeline_only);
}
void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
@@ -5969,8 +5965,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
_update_key_edit();
}
} break;
+ case EDIT_GOTO_NEXT_STEP_TIMELINE_ONLY:
case EDIT_GOTO_NEXT_STEP: {
- goto_next_step(false);
+ goto_next_step(false, p_option == EDIT_GOTO_NEXT_STEP_TIMELINE_ONLY);
} break;
case EDIT_GOTO_PREV_STEP: {
goto_prev_step(false);
@@ -6480,7 +6477,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
optimize_max_angle->set_value(22);
optimize_dialog->set_ok_button_text(TTR("Optimize"));
- optimize_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_OPTIMIZE_ANIMATION_CONFIRM));
+ optimize_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_OPTIMIZE_ANIMATION_CONFIRM));
//
@@ -6506,7 +6503,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)"));
cleanup_dialog->set_ok_button_text(TTR("Clean-Up"));
- cleanup_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
+ cleanup_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
//
scale_dialog = memnew(ConfirmationDialog);
@@ -6518,7 +6515,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
scale->set_max(99999);
scale->set_step(0.001);
vbc->add_margin_child(TTR("Scale Ratio:"), scale);
- scale_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_SCALE_CONFIRM));
+ scale_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM));
add_child(scale_dialog);
track_copy_dialog = memnew(ConfirmationDialog);
@@ -6539,7 +6536,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
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_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed), varray(EDIT_COPY_TRACKS_CONFIRM));
+ track_copy_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_COPY_TRACKS_CONFIRM));
}
AnimationTrackEditor::~AnimationTrackEditor() {
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index dede2e9bbe..9e693eaffd 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -33,7 +33,6 @@
#include "editor/editor_data.h"
#include "editor/editor_spin_slider.h"
-#include "editor/property_editor.h"
#include "editor/property_selector.h"
#include "scene/gui/control.h"
@@ -518,6 +517,7 @@ public:
EDIT_ADD_RESET_KEY,
EDIT_DELETE_SELECTION,
EDIT_GOTO_NEXT_STEP,
+ EDIT_GOTO_NEXT_STEP_TIMELINE_ONLY, // Next step without updating animation.
EDIT_GOTO_PREV_STEP,
EDIT_APPLY_RESET,
EDIT_OPTIMIZE_ANIMATION,
@@ -563,7 +563,7 @@ public:
void goto_prev_step(bool p_from_mouse_event);
/** If `p_from_mouse_event` is `true`, handle Shift key presses for precise snapping. */
- void goto_next_step(bool p_from_mouse_event);
+ void goto_next_step(bool p_from_mouse_event, bool p_timeline_only = false);
MenuButton *get_edit_menu();
AnimationTrackEditor();
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index fc47e1ef5c..b9e52ad7ad 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -200,6 +200,7 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
if (preview->playback.is_valid()) {
preview->thread = memnew(Thread);
+ preview->thread->set_name("AudioStreamPreviewGenerator");
preview->thread->start(_preview_thread, preview);
}
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index ce94edd583..6fdd9563fb 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -627,7 +627,7 @@ void ConnectionsDock::_connect(ConnectDialog::ConnectionData p_cd) {
Callable callable = p_cd.get_callable();
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, varray(), p_cd.flags);
+ 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);
undo_redo->add_do_method(this, "update_tree");
undo_redo->add_undo_method(this, "update_tree");
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index dcfde8800a..d141d1a880 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -97,7 +97,7 @@ public:
for (int i = 0; i < binds.size(); i++) {
argptrs[i] = &binds[i];
}
- return Callable(target, method).bind(argptrs, binds.size());
+ return Callable(target, method).bindp(argptrs, binds.size());
} else {
return Callable(target, method);
}
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index c41eeb520a..e6168f4924 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -34,6 +34,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -378,7 +379,7 @@ void CreateDialog::_confirmed() {
}
{
- Ref<FileAccess> f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::WRITE);
+ Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("create_recent." + base_type), FileAccess::WRITE);
if (f.is_valid()) {
f->store_line(selected_item);
@@ -655,7 +656,7 @@ void CreateDialog::_save_and_update_favorite_list() {
TreeItem *root = favorites->create_item();
{
- Ref<FileAccess> f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("favorites." + base_type), FileAccess::WRITE);
+ Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("favorites." + base_type), FileAccess::WRITE);
if (f.is_valid()) {
for (int i = 0; i < favorite_list.size(); i++) {
String l = favorite_list[i];
@@ -680,7 +681,7 @@ void CreateDialog::_save_and_update_favorite_list() {
}
void CreateDialog::_load_favorites_and_history() {
- String dir = EditorSettings::get_singleton()->get_project_settings_dir();
+ String dir = EditorPaths::get_singleton()->get_project_settings_dir();
Ref<FileAccess> f = FileAccess::open(dir.plus_file("create_recent." + base_type), FileAccess::READ);
if (f.is_valid()) {
while (!f->eof_reached()) {
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
index 0caeb90108..3c3e4faa6f 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
@@ -34,6 +34,7 @@
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_node.h"
#include "editor/editor_run_native.h"
+#include "editor/export/editor_export_platform.h"
#include "editor/plugins/script_editor_plugin.h"
void DebugAdapterParser::_bind_methods() {
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
index 92ea0f15e9..4c445eb766 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
@@ -37,6 +37,7 @@
#include "editor/doc_tools.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
DebugAdapterProtocol *DebugAdapterProtocol::singleton = nullptr;
diff --git a/editor/debugger/debug_adapter/debug_adapter_server.cpp b/editor/debugger/debug_adapter/debug_adapter_server.cpp
index e9fc7ec913..41e6b1f308 100644
--- a/editor/debugger/debug_adapter/debug_adapter_server.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_server.cpp
@@ -33,6 +33,7 @@
#include "core/os/os.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
DebugAdapterServer::DebugAdapterServer() {
_EDITOR_DEF("network/debug_adapter/remote_port", remote_port);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index e13af59d69..472e53c0e8 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -92,17 +92,17 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
ScriptEditorDebugger *node = memnew(ScriptEditorDebugger);
int id = tabs->get_tab_count();
- node->connect("stop_requested", callable_mp(this, &EditorDebuggerNode::_debugger_wants_stop), varray(id));
- node->connect("stopped", callable_mp(this, &EditorDebuggerNode::_debugger_stopped), varray(id));
- node->connect("stack_frame_selected", callable_mp(this, &EditorDebuggerNode::_stack_frame_selected), varray(id));
- node->connect("error_selected", callable_mp(this, &EditorDebuggerNode::_error_selected), varray(id));
- node->connect("breakpoint_selected", callable_mp(this, &EditorDebuggerNode::_error_selected), varray(id));
+ node->connect("stop_requested", callable_mp(this, &EditorDebuggerNode::_debugger_wants_stop).bind(id));
+ node->connect("stopped", callable_mp(this, &EditorDebuggerNode::_debugger_stopped).bind(id));
+ node->connect("stack_frame_selected", callable_mp(this, &EditorDebuggerNode::_stack_frame_selected).bind(id));
+ node->connect("error_selected", callable_mp(this, &EditorDebuggerNode::_error_selected).bind(id));
+ node->connect("breakpoint_selected", callable_mp(this, &EditorDebuggerNode::_error_selected).bind(id));
node->connect("clear_execution", callable_mp(this, &EditorDebuggerNode::_clear_execution));
- node->connect("breaked", callable_mp(this, &EditorDebuggerNode::_breaked), varray(id));
- node->connect("remote_tree_updated", callable_mp(this, &EditorDebuggerNode::_remote_tree_updated), varray(id));
- node->connect("remote_object_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_updated), varray(id));
- node->connect("remote_object_property_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_property_updated), varray(id));
- node->connect("remote_object_requested", callable_mp(this, &EditorDebuggerNode::_remote_object_requested), varray(id));
+ node->connect("breaked", callable_mp(this, &EditorDebuggerNode::_breaked).bind(id));
+ node->connect("remote_tree_updated", callable_mp(this, &EditorDebuggerNode::_remote_tree_updated).bind(id));
+ node->connect("remote_object_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_updated).bind(id));
+ node->connect("remote_object_property_updated", callable_mp(this, &EditorDebuggerNode::_remote_object_property_updated).bind(id));
+ node->connect("remote_object_requested", callable_mp(this, &EditorDebuggerNode::_remote_object_requested).bind(id));
node->connect("errors_cleared", callable_mp(this, &EditorDebuggerNode::_update_errors));
if (tabs->get_tab_count() > 0) {
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index bdab1cfecb..dbd2c61d44 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -225,6 +225,39 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
updating_scene_tree = false;
}
+Variant EditorDebuggerTree::get_drag_data(const Point2 &p_point) {
+ if (get_button_id_at_position(p_point) != -1) {
+ return Variant();
+ }
+
+ TreeItem *selected = get_selected();
+ if (!selected) {
+ return Variant();
+ }
+
+ String path = selected->get_text(0);
+
+ HBoxContainer *hb = memnew(HBoxContainer);
+ TextureRect *tf = memnew(TextureRect);
+ tf->set_texture(selected->get_icon(0));
+ tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
+ hb->add_child(tf);
+ Label *label = memnew(Label(path));
+ hb->add_child(label);
+ set_drag_preview(hb);
+
+ if (!selected->get_parent() || !selected->get_parent()->get_parent()) {
+ path = ".";
+ } else {
+ while (selected->get_parent()->get_parent() != get_root()) {
+ selected = selected->get_parent();
+ path = selected->get_text(0) + "/" + path;
+ }
+ }
+
+ return vformat("\"%s\"", path);
+}
+
String EditorDebuggerTree::get_selected_path() {
if (!get_selected()) {
return "";
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
index 9d163fd548..5b2df8abd5 100644
--- a/editor/debugger/editor_debugger_tree.h
+++ b/editor/debugger/editor_debugger_tree.h
@@ -65,6 +65,8 @@ protected:
void _notification(int p_what);
public:
+ virtual Variant get_drag_data(const Point2 &p_point) override;
+
String get_selected_path();
ObjectID get_selected_object();
int get_current_debugger(); // Would love to have one tree for every debugger.
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index ee67cbdaea..6f3dd1793c 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -796,7 +796,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
frame_delay->set_wait_time(0.1);
frame_delay->set_one_shot(true);
add_child(frame_delay);
- frame_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_frame), make_binds(false));
+ frame_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_frame).bind(false));
plot_delay = memnew(Timer);
plot_delay->set_wait_time(0.1);
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index f8b82ecc51..ac2e958c5b 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -50,7 +50,6 @@
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
-#include "editor/property_editor.h"
#include "main/performance.h"
#include "scene/3d/camera_3d.h"
#include "scene/debugger/scene_debugger.h"
@@ -753,7 +752,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
const Variant *args[2] = { &cmd, &data };
Variant retval;
Callable::CallError err;
- c.call(args, 2, retval, 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;
@@ -1877,7 +1876,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
profiler = memnew(EditorProfiler);
profiler->set_name(TTR("Profiler"));
tabs->add_child(profiler);
- profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate), varray(PROFILER_SCRIPTS_SERVERS));
+ profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate).bind(PROFILER_SCRIPTS_SERVERS));
profiler->connect("break_request", callable_mp(this, &ScriptEditorDebugger::_profiler_seeked));
}
@@ -1885,14 +1884,14 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
visual_profiler = memnew(EditorVisualProfiler);
visual_profiler->set_name(TTR("Visual Profiler"));
tabs->add_child(visual_profiler);
- visual_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate), varray(PROFILER_VISUAL));
+ 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), varray(PROFILER_NETWORK));
+ network_profiler->connect("enable_profiling", callable_mp(this, &ScriptEditorDebugger::_profiler_activate).bind(PROFILER_NETWORK));
}
{ //monitors
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 4f89e1b2d1..5b4da0e32b 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -37,6 +37,7 @@
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/margin_container.h"
void DependencyEditor::_searched(const String &p_path) {
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 773fcc5017..a819458417 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -39,6 +39,7 @@
#include "core/object/script_language.h"
#include "core/string/translation.h"
#include "core/version.h"
+#include "editor/editor_settings.h"
#include "scene/resources/theme.h"
// Used for a hack preserving Mono properties on non-Mono builds.
@@ -363,8 +364,15 @@ void DocTools::generate(bool p_basic_types) {
List<PropertyInfo> properties;
List<PropertyInfo> own_properties;
- if (name == "ProjectSettings") {
- // Special case for project settings, so settings can be documented.
+
+ // Special case for editor and project settings, so they can be documented.
+ if (name == "EditorSettings") {
+ // We don't create the full blown EditorSettings (+ config file) with `create()`,
+ // instead we just make a local instance to get default values.
+ Ref<EditorSettings> edset = memnew(EditorSettings);
+ edset->get_property_list(&properties);
+ own_properties = properties;
+ } else if (name == "ProjectSettings") {
ProjectSettings::get_singleton()->get_property_list(&properties);
own_properties = properties;
} else {
@@ -402,6 +410,13 @@ void DocTools::generate(bool p_basic_types) {
bool default_value_valid = false;
Variant default_value;
+ if (name == "EditorSettings") {
+ if (E.name == "resource_local_to_scene" || E.name == "resource_name" || E.name == "resource_path" || E.name == "script") {
+ // Don't include spurious properties in the generated EditorSettings class reference.
+ continue;
+ }
+ }
+
if (name == "ProjectSettings") {
// Special case for project settings, so that settings are not taken from the current project's settings
if (E.name == "script" || !ProjectSettings::get_singleton()->is_builtin_setting(E.name)) {
@@ -424,8 +439,6 @@ void DocTools::generate(bool p_basic_types) {
}
}
- //used to track uninitialized values using valgrind
- //print_line("getting default value for " + String(name) + "." + String(E.name));
if (default_value_valid && default_value.get_type() != Variant::OBJECT) {
prop.default_value = default_value.get_construct_string().replace("\n", " ");
}
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 8fa486408e..8dc8a0ab6b 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -100,8 +100,8 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
extension_guess["tga"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
extension_guess["webp"] = tree->get_theme_icon(SNAME("ImageTexture"), SNAME("EditorIcons"));
- extension_guess["wav"] = tree->get_theme_icon(SNAME("AudioStreamSample"), SNAME("EditorIcons"));
- extension_guess["ogg"] = tree->get_theme_icon(SNAME("AudioStreamOGGVorbis"), SNAME("EditorIcons"));
+ extension_guess["wav"] = tree->get_theme_icon(SNAME("AudioStreamWAV"), SNAME("EditorIcons"));
+ extension_guess["ogg"] = tree->get_theme_icon(SNAME("AudioStreamOggVorbis"), SNAME("EditorIcons"));
extension_guess["mp3"] = tree->get_theme_icon(SNAME("AudioStreamMP3"), SNAME("EditorIcons"));
extension_guess["scn"] = tree->get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons"));
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index fa365c4368..b6d7bbc45f 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -37,6 +37,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "filesystem_dock.h"
#include "scene/resources/font.h"
#include "servers/audio_server.h"
@@ -1007,11 +1008,11 @@ void EditorAudioBuses::_update_buses() {
bool is_master = (i == 0);
EditorAudioBus *audio_bus = memnew(EditorAudioBus(this, is_master));
bus_hb->add_child(audio_bus);
- audio_bus->connect("delete_request", callable_mp(this, &EditorAudioBuses::_delete_bus), varray(audio_bus), CONNECT_DEFERRED);
- audio_bus->connect("duplicate_request", callable_mp(this, &EditorAudioBuses::_duplicate_bus), varray(), CONNECT_DEFERRED);
- audio_bus->connect("vol_reset_request", callable_mp(this, &EditorAudioBuses::_reset_bus_volume), varray(audio_bus), CONNECT_DEFERRED);
+ audio_bus->connect("delete_request", callable_mp(this, &EditorAudioBuses::_delete_bus).bind(audio_bus), CONNECT_DEFERRED);
+ audio_bus->connect("duplicate_request", callable_mp(this, &EditorAudioBuses::_duplicate_bus), CONNECT_DEFERRED);
+ audio_bus->connect("vol_reset_request", callable_mp(this, &EditorAudioBuses::_reset_bus_volume).bind(audio_bus), CONNECT_DEFERRED);
audio_bus->connect("drop_end_request", callable_mp(this, &EditorAudioBuses::_request_drop_end));
- audio_bus->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), varray(), CONNECT_DEFERRED);
+ audio_bus->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), CONNECT_DEFERRED);
}
}
@@ -1154,7 +1155,7 @@ void EditorAudioBuses::_request_drop_end() {
bus_hb->add_child(drop_end);
drop_end->set_custom_minimum_size(Object::cast_to<Control>(bus_hb->get_child(0))->get_size());
- drop_end->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), varray(), CONNECT_DEFERRED);
+ drop_end->connect("dropped", callable_mp(this, &EditorAudioBuses::_drop_at_index), CONNECT_DEFERRED);
}
}
@@ -1174,7 +1175,7 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
void EditorAudioBuses::_server_save() {
Ref<AudioBusLayout> state = AudioServer::get_singleton()->generate_bus_layout();
- ResourceSaver::save(edited_path, state);
+ ResourceSaver::save(state, edited_path);
}
void EditorAudioBuses::_select_layout() {
@@ -1244,7 +1245,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
AudioServer::get_singleton()->set_bus_layout(empty_state);
}
- Error err = ResourceSaver::save(p_string, AudioServer::get_singleton()->generate_bus_layout());
+ Error err = ResourceSaver::save(AudioServer::get_singleton()->generate_bus_layout(), p_string);
if (err != OK) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_string));
diff --git a/editor/editor_build_profile.cpp b/editor/editor_build_profile.cpp
index 6a5604290f..d093ab518e 100644
--- a/editor/editor_build_profile.cpp
+++ b/editor/editor_build_profile.cpp
@@ -723,19 +723,19 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
profile_actions[ACTION_NEW] = memnew(Button(TTR("New")));
path_hbc->add_child(profile_actions[ACTION_NEW]);
- profile_actions[ACTION_NEW]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_NEW));
+ profile_actions[ACTION_NEW]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_NEW));
profile_actions[ACTION_LOAD] = memnew(Button(TTR("Load")));
path_hbc->add_child(profile_actions[ACTION_LOAD]);
- profile_actions[ACTION_LOAD]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_LOAD));
+ profile_actions[ACTION_LOAD]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_LOAD));
profile_actions[ACTION_SAVE] = memnew(Button(TTR("Save")));
path_hbc->add_child(profile_actions[ACTION_SAVE]);
- profile_actions[ACTION_SAVE]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_SAVE));
+ profile_actions[ACTION_SAVE]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE));
profile_actions[ACTION_SAVE_AS] = memnew(Button(TTR("Save As")));
path_hbc->add_child(profile_actions[ACTION_SAVE_AS]);
- profile_actions[ACTION_SAVE_AS]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_SAVE_AS));
+ profile_actions[ACTION_SAVE_AS]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_SAVE_AS));
main_vbc->add_margin_child(TTR("Profile:"), path_hbc);
@@ -745,11 +745,11 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
profile_actions[ACTION_RESET] = memnew(Button(TTR("Reset to Defaults")));
profiles_hbc->add_child(profile_actions[ACTION_RESET]);
- profile_actions[ACTION_RESET]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_RESET));
+ profile_actions[ACTION_RESET]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_RESET));
profile_actions[ACTION_DETECT] = memnew(Button(TTR("Detect from Project")));
profiles_hbc->add_child(profile_actions[ACTION_DETECT]);
- profile_actions[ACTION_DETECT]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action), varray(ACTION_DETECT));
+ profile_actions[ACTION_DETECT]->connect("pressed", callable_mp(this, &EditorBuildProfileManager::_profile_action).bind(ACTION_DETECT));
main_vbc->add_margin_child(TTR("Actions:"), profiles_hbc);
@@ -757,7 +757,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
class_list->set_hide_root(true);
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
class_list->connect("cell_selected", callable_mp(this, &EditorBuildProfileManager::_class_list_item_selected));
- class_list->connect("item_edited", callable_mp(this, &EditorBuildProfileManager::_class_list_item_edited), varray(), CONNECT_DEFERRED);
+ class_list->connect("item_edited", callable_mp(this, &EditorBuildProfileManager::_class_list_item_edited), CONNECT_DEFERRED);
class_list->connect("item_collapsed", callable_mp(this, &EditorBuildProfileManager::_class_list_item_collapsed));
// It will be displayed once the user creates or chooses a profile.
main_vbc->add_margin_child(TTR("Configure Engine Build Profile:"), class_list, true);
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index c1cd7f9c7b..ba1f2fd6af 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -32,6 +32,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/control.h"
#include "scene/gui/tree.h"
@@ -199,7 +200,7 @@ void EditorCommandPalette::add_command(String p_command_name, String p_key_name,
}
Command command;
command.name = p_command_name;
- command.callable = p_action.bind(argptrs, arguments.size());
+ command.callable = p_action.bindp(argptrs, arguments.size());
command.shortcut = p_shortcut_text;
commands[p_key_name] = command;
@@ -225,7 +226,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_deferred(nullptr, 0);
+ commands[p_command_key].callable.call_deferredp(nullptr, 0);
_save_history();
}
@@ -311,8 +312,8 @@ EditorCommandPalette::EditorCommandPalette() {
search_options = memnew(Tree);
search_options->connect("item_activated", callable_mp(this, &EditorCommandPalette::_confirmed));
- search_options->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled), varray(false));
- search_options->connect("nothing_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled), varray(true));
+ search_options->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
+ search_options->connect("nothing_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(true));
search_options->create_item();
search_options->set_hide_root(true);
search_options->set_columns(2);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index e9e3320a3d..2d4945db14 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -1028,7 +1028,7 @@ void EditorSelection::add_node(Node *p_node) {
}
selection[p_node] = meta;
- p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed), varray(p_node), CONNECT_ONESHOT);
+ p_node->connect("tree_exiting", callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONESHOT);
}
void EditorSelection::remove_node(Node *p_node) {
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 4cbc0cf25d..4071722185 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -81,15 +81,15 @@ void EditorDirDialog::reload(const String &p_path) {
void EditorDirDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds(""));
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload).bind(""));
reload();
if (!tree->is_connected("item_collapsed", callable_mp(this, &EditorDirDialog::_item_collapsed))) {
- tree->connect("item_collapsed", callable_mp(this, &EditorDirDialog::_item_collapsed), varray(), CONNECT_DEFERRED);
+ tree->connect("item_collapsed", callable_mp(this, &EditorDirDialog::_item_collapsed), CONNECT_DEFERRED);
}
if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed", callable_mp(this, &EditorDirDialog::reload))) {
- EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds(""));
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload).bind(""));
}
} break;
diff --git a/editor/editor_export.h b/editor/editor_export.h
deleted file mode 100644
index a632cd88cd..0000000000
--- a/editor/editor_export.h
+++ /dev/null
@@ -1,532 +0,0 @@
-/*************************************************************************/
-/* 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. */
-/*************************************************************************/
-
-#ifndef EDITOR_EXPORT_H
-#define EDITOR_EXPORT_H
-
-#include "core/io/dir_access.h"
-#include "core/io/resource.h"
-#include "scene/gui/rich_text_label.h"
-#include "scene/main/node.h"
-#include "scene/main/timer.h"
-#include "scene/resources/texture.h"
-
-class FileAccess;
-class EditorExportPlatform;
-class EditorFileSystemDirectory;
-struct EditorProgress;
-
-class EditorExportPreset : public RefCounted {
- GDCLASS(EditorExportPreset, RefCounted);
-
-public:
- enum ExportFilter {
- EXPORT_ALL_RESOURCES,
- EXPORT_SELECTED_SCENES,
- EXPORT_SELECTED_RESOURCES,
- EXCLUDE_SELECTED_RESOURCES,
- };
-
- enum ScriptExportMode {
- MODE_SCRIPT_TEXT,
- MODE_SCRIPT_COMPILED,
- };
-
-private:
- Ref<EditorExportPlatform> platform;
- ExportFilter export_filter = EXPORT_ALL_RESOURCES;
- String include_filter;
- String exclude_filter;
- String export_path;
-
- String exporter;
- HashSet<String> selected_files;
- bool runnable = false;
-
- friend class EditorExport;
- friend class EditorExportPlatform;
-
- List<PropertyInfo> properties;
- HashMap<StringName, Variant> values;
-
- String name;
-
- String custom_features;
-
- String enc_in_filters;
- String enc_ex_filters;
- bool enc_pck = false;
- bool enc_directory = false;
-
- int script_mode = MODE_SCRIPT_COMPILED;
- String script_key;
-
-protected:
- 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:
- Ref<EditorExportPlatform> get_platform() const;
-
- bool has(const StringName &p_property) const { return values.has(p_property); }
-
- void update_files_to_export();
-
- Vector<String> get_files_to_export() const;
-
- void add_export_file(const String &p_path);
- void remove_export_file(const String &p_path);
- bool has_export_file(const String &p_path);
-
- void set_name(const String &p_name);
- String get_name() const;
-
- void set_runnable(bool p_enable);
- bool is_runnable() const;
-
- void set_export_filter(ExportFilter p_filter);
- ExportFilter get_export_filter() const;
-
- void set_include_filter(const String &p_include);
- String get_include_filter() const;
-
- void set_exclude_filter(const String &p_exclude);
- String get_exclude_filter() const;
-
- void set_custom_features(const String &p_custom_features);
- String get_custom_features() const;
-
- void set_export_path(const String &p_path);
- String get_export_path() const;
-
- void set_enc_in_filter(const String &p_filter);
- String get_enc_in_filter() const;
-
- void set_enc_ex_filter(const String &p_filter);
- String get_enc_ex_filter() const;
-
- void set_enc_pck(bool p_enabled);
- bool get_enc_pck() const;
-
- 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;
-
- const List<PropertyInfo> &get_properties() const { return properties; }
-
- EditorExportPreset() {}
-};
-
-struct SharedObject {
- String path;
- Vector<String> tags;
- String target;
-
- SharedObject(const String &p_path, const Vector<String> &p_tags, const String &p_target) :
- path(p_path),
- tags(p_tags),
- target(p_target) {
- }
-
- SharedObject() {}
-};
-
-class EditorExportPlatform : public RefCounted {
- GDCLASS(EditorExportPlatform, RefCounted);
-
-public:
- typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
- typedef Error (*EditorExportSaveSharedObject)(void *p_userdata, const SharedObject &p_so);
-
- enum ExportMessageType {
- EXPORT_MESSAGE_NONE,
- EXPORT_MESSAGE_INFO,
- EXPORT_MESSAGE_WARNING,
- EXPORT_MESSAGE_ERROR,
- };
-
- struct ExportMessage {
- ExportMessageType msg_type;
- String category;
- String text;
- };
-
-private:
- struct SavedData {
- uint64_t ofs = 0;
- uint64_t size = 0;
- bool encrypted = false;
- Vector<uint8_t> md5;
- CharString path_utf8;
-
- bool operator<(const SavedData &p_data) const {
- return path_utf8 < p_data.path_utf8;
- }
- };
-
- struct PackData {
- Ref<FileAccess> f;
- Vector<SavedData> file_ofs;
- EditorProgress *ep = nullptr;
- Vector<SharedObject> *so_files = nullptr;
- };
-
- struct ZipData {
- void *zip = nullptr;
- EditorProgress *ep = nullptr;
- };
-
- struct FeatureContainers {
- HashSet<String> features;
- Vector<String> features_pv;
- };
-
- Vector<ExportMessage> messages;
-
- 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);
-
- void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, HashSet<String> &r_list, bool exclude);
- void _edit_filter_list(HashSet<String> &r_list, const String &p_filter, bool exclude);
-
- static Error _add_shared_object(void *p_userdata, const SharedObject &p_so);
-
-protected:
- struct ExportNotifier {
- ExportNotifier(EditorExportPlatform &p_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
- ~ExportNotifier();
- };
-
- FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug);
-
- 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);
-
-public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) = 0;
-
- struct ExportOption {
- PropertyInfo option;
- Variant default_value;
-
- ExportOption(const PropertyInfo &p_info, const Variant &p_default) :
- option(p_info),
- default_value(p_default) {
- }
- ExportOption() {}
- };
-
- virtual Ref<EditorExportPreset> create_preset();
-
- virtual void clear_messages() { messages.clear(); }
- virtual void add_message(ExportMessageType p_type, const String &p_category, const String &p_message) {
- ExportMessage msg;
- msg.category = p_category;
- msg.text = p_message;
- msg.msg_type = p_type;
- messages.push_back(msg);
- switch (p_type) {
- case EXPORT_MESSAGE_INFO: {
- print_line(vformat("%s: %s\n", msg.category, msg.text));
- } break;
- case EXPORT_MESSAGE_WARNING: {
- WARN_PRINT(vformat("%s: %s\n", msg.category, msg.text));
- } break;
- case EXPORT_MESSAGE_ERROR: {
- ERR_PRINT(vformat("%s: %s\n", msg.category, msg.text));
- } break;
- default:
- break;
- }
- }
-
- virtual int get_message_count() const {
- return messages.size();
- }
-
- virtual ExportMessage get_message(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, messages.size(), ExportMessage());
- return messages[p_index];
- }
-
- virtual ExportMessageType get_worst_message_type() const {
- ExportMessageType worst_type = EXPORT_MESSAGE_NONE;
- for (int i = 0; i < messages.size(); i++) {
- worst_type = MAX(worst_type, messages[i].msg_type);
- }
- return worst_type;
- }
-
- virtual bool fill_log_messages(RichTextLabel *p_log, Error p_err);
-
- virtual void get_export_options(List<ExportOption> *r_options) = 0;
- virtual bool should_update_export_options() { return false; }
- virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; }
-
- virtual String get_os_name() const = 0;
- virtual String get_name() const = 0;
- virtual Ref<Texture2D> get_logo() const = 0;
-
- Error export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func = nullptr);
-
- Error save_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, Vector<SharedObject> *p_so_files = nullptr, bool p_embed = false, int64_t *r_embedded_start = nullptr, int64_t *r_embedded_size = nullptr);
- Error save_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
-
- virtual bool poll_export() { return false; }
- virtual int get_options_count() const { return 0; }
- virtual String get_options_tooltip() const { return ""; }
- virtual Ref<ImageTexture> get_option_icon(int p_index) const;
- virtual String get_option_label(int p_device) const { return ""; }
- virtual String get_option_tooltip(int p_device) const { return ""; }
-
- enum DebugFlags {
- DEBUG_FLAG_DUMB_CLIENT = 1,
- DEBUG_FLAG_REMOTE_DEBUG = 2,
- DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST = 4,
- DEBUG_FLAG_VIEW_COLLISONS = 8,
- DEBUG_FLAG_VIEW_NAVIGATION = 16,
- };
-
- virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { return OK; }
- virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
-
- String test_etc2() const;
- virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
-
- virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0;
- virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) = 0;
- virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
- virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
- virtual void get_platform_features(List<String> *r_features) = 0;
- virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) = 0;
- virtual String get_debug_protocol() const { return "tcp://"; }
-
- EditorExportPlatform();
-};
-
-class EditorExportPlugin : public RefCounted {
- GDCLASS(EditorExportPlugin, RefCounted);
-
- friend class EditorExportPlatform;
-
- Ref<EditorExportPreset> export_preset;
-
- Vector<SharedObject> shared_objects;
- struct ExtraFile {
- String path;
- Vector<uint8_t> data;
- bool remap = false;
- };
- Vector<ExtraFile> extra_files;
- bool skipped = false;
-
- Vector<String> ios_frameworks;
- Vector<String> ios_embedded_frameworks;
- Vector<String> ios_project_static_libs;
- String ios_plist_content;
- String ios_linker_flags;
- Vector<String> ios_bundle_files;
- String ios_cpp_code;
-
- Vector<String> macos_plugin_files;
-
- _FORCE_INLINE_ void _clear() {
- shared_objects.clear();
- extra_files.clear();
- skipped = false;
- }
-
- _FORCE_INLINE_ void _export_end() {
- ios_frameworks.clear();
- ios_embedded_frameworks.clear();
- ios_bundle_files.clear();
- ios_plist_content = "";
- ios_linker_flags = "";
- ios_cpp_code = "";
- macos_plugin_files.clear();
- }
-
- void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
- void _export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags);
- void _export_end_script();
-
-protected:
- void set_export_preset(const Ref<EditorExportPreset> &p_preset);
- Ref<EditorExportPreset> get_export_preset() const;
-
- void add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap);
- void add_shared_object(const String &p_path, const Vector<String> &tags, const String &p_target = String());
-
- void add_ios_framework(const String &p_path);
- void add_ios_embedded_framework(const String &p_path);
- void add_ios_project_static_lib(const String &p_path);
- void add_ios_plist_content(const String &p_plist_content);
- void add_ios_linker_flags(const String &p_flags);
- void add_ios_bundle_file(const String &p_path);
- void add_ios_cpp_code(const String &p_code);
- void add_macos_plugin_file(const String &p_path);
-
- void skip();
-
- virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features);
- virtual void _export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags);
-
- static void _bind_methods();
-
- GDVIRTUAL3(_export_file, String, String, Vector<String>)
- GDVIRTUAL4(_export_begin, Vector<String>, bool, String, uint32_t)
- GDVIRTUAL0(_export_end)
-
-public:
- Vector<String> get_ios_frameworks() const;
- Vector<String> get_ios_embedded_frameworks() const;
- Vector<String> get_ios_project_static_libs() const;
- String get_ios_plist_content() const;
- String get_ios_linker_flags() const;
- Vector<String> get_ios_bundle_files() const;
- String get_ios_cpp_code() const;
- const Vector<String> &get_macos_plugin_files() const;
-
- EditorExportPlugin();
-};
-
-class EditorExport : public Node {
- GDCLASS(EditorExport, Node);
-
- Vector<Ref<EditorExportPlatform>> export_platforms;
- Vector<Ref<EditorExportPreset>> export_presets;
- Vector<Ref<EditorExportPlugin>> export_plugins;
-
- StringName _export_presets_updated;
-
- Timer *save_timer = nullptr;
- bool block_save = false;
-
- static EditorExport *singleton;
-
- void _save();
-
-protected:
- friend class EditorExportPreset;
- void save_presets();
-
- void _notification(int p_what);
- static void _bind_methods();
-
-public:
- static EditorExport *get_singleton() { return singleton; }
-
- void add_export_platform(const Ref<EditorExportPlatform> &p_platform);
- int get_export_platform_count();
- Ref<EditorExportPlatform> get_export_platform(int p_idx);
-
- void add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos = -1);
- int get_export_preset_count() const;
- Ref<EditorExportPreset> get_export_preset(int p_idx);
- void remove_export_preset(int p_idx);
-
- void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
- void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
- Vector<Ref<EditorExportPlugin>> get_export_plugins();
-
- void load_config();
- void update_export_presets();
- bool poll_export_platforms();
-
- EditorExport();
- ~EditorExport();
-};
-
-class EditorExportPlatformPC : public EditorExportPlatform {
- GDCLASS(EditorExportPlatformPC, EditorExportPlatform);
-
-private:
- Ref<ImageTexture> logo;
- String name;
- String os_name;
-
- int chmod_flags = -1;
-
-public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
-
- virtual void get_export_options(List<ExportOption> *r_options) override;
-
- virtual String get_name() const override;
- virtual String get_os_name() const override;
- virtual Ref<Texture2D> get_logo() const override;
-
- virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
- virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
- virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
- virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0;
-
- virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
- 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);
-
- void set_logo(const Ref<Texture2D> &p_logo);
-
- void add_platform_feature(const String &p_feature);
- virtual void get_platform_features(List<String> *r_features) override;
- virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
-
- int get_chmod_flags() const;
- void set_chmod_flags(int p_flags);
-
- virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
- return Error::OK;
- }
-};
-
-class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin {
- GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin);
-
-public:
- virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) override;
- EditorExportTextSceneToBinaryPlugin();
-};
-
-#endif // EDITOR_EXPORT_H
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 9e2d56b2b9..ab6dec7eeb 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -34,6 +34,7 @@
#include "core/io/json.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_property_name_processor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -314,7 +315,7 @@ void EditorFeatureProfileManager::_notification(int p_what) {
current_profile = EDITOR_GET("_default_feature_profile");
if (!current_profile.is_empty()) {
current.instantiate();
- Error err = current->load_from_file(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(current_profile + ".profile"));
+ Error err = current->load_from_file(EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(current_profile + ".profile"));
if (err != OK) {
ERR_PRINT("Error loading default feature profile: " + current_profile);
current_profile = String();
@@ -340,7 +341,7 @@ void EditorFeatureProfileManager::_update_profile_list(const String &p_select_pr
if (p_select_profile.is_empty()) { //default, keep
if (profile_list->get_selected() >= 0) {
selected_profile = profile_list->get_item_metadata(profile_list->get_selected());
- if (!FileAccess::exists(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(selected_profile + ".profile"))) {
+ if (!FileAccess::exists(EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(selected_profile + ".profile"))) {
selected_profile = String(); //does not exist
}
}
@@ -349,8 +350,8 @@ void EditorFeatureProfileManager::_update_profile_list(const String &p_select_pr
}
Vector<String> profiles;
- Ref<DirAccess> d = DirAccess::open(EditorSettings::get_singleton()->get_feature_profiles_dir());
- ERR_FAIL_COND_MSG(d.is_null(), "Cannot open directory '" + EditorSettings::get_singleton()->get_feature_profiles_dir() + "'.");
+ Ref<DirAccess> d = DirAccess::open(EditorPaths::get_singleton()->get_feature_profiles_dir());
+ ERR_FAIL_COND_MSG(d.is_null(), "Cannot open directory '" + EditorPaths::get_singleton()->get_feature_profiles_dir() + "'.");
d->list_dir_begin();
while (true) {
@@ -452,8 +453,8 @@ void EditorFeatureProfileManager::_profile_action(int p_action) {
void EditorFeatureProfileManager::_erase_selected_profile() {
String selected = _get_selected_profile();
ERR_FAIL_COND(selected.is_empty());
- Ref<DirAccess> da = DirAccess::open(EditorSettings::get_singleton()->get_feature_profiles_dir());
- ERR_FAIL_COND_MSG(da.is_null(), "Cannot open directory '" + EditorSettings::get_singleton()->get_feature_profiles_dir() + "'.");
+ Ref<DirAccess> da = DirAccess::open(EditorPaths::get_singleton()->get_feature_profiles_dir());
+ ERR_FAIL_COND_MSG(da.is_null(), "Cannot open directory '" + EditorPaths::get_singleton()->get_feature_profiles_dir() + "'.");
da->remove(selected + ".profile");
if (selected == current_profile) {
@@ -469,7 +470,7 @@ void EditorFeatureProfileManager::_create_new_profile() {
EditorNode::get_singleton()->show_warning(TTR("Profile must be a valid filename and must not contain '.'"));
return;
}
- String file = EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(name + ".profile");
+ String file = EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(name + ".profile");
if (FileAccess::exists(file)) {
EditorNode::get_singleton()->show_warning(TTR("Profile with this name already exists."));
return;
@@ -748,8 +749,8 @@ void EditorFeatureProfileManager::_update_selected_profile() {
} else {
//reload edited, if different from current
edited.instantiate();
- Error err = edited->load_from_file(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(profile + ".profile"));
- ERR_FAIL_COND_MSG(err != OK, "Error when loading EditorSettings from file '" + EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(profile + ".profile") + "'.");
+ Error err = edited->load_from_file(EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(profile + ".profile"));
+ ERR_FAIL_COND_MSG(err != OK, "Error when loading editor feature profile from file '" + EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(profile + ".profile") + "'.");
}
updating_features = true;
@@ -804,7 +805,7 @@ void EditorFeatureProfileManager::_import_profiles(const Vector<String> &p_paths
return;
}
- String dst_file = EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(basefile);
+ String dst_file = EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(basefile);
if (FileAccess::exists(dst_file)) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Profile '%s' already exists. Remove it first before importing, import aborted."), basefile.get_basename()));
@@ -819,7 +820,7 @@ void EditorFeatureProfileManager::_import_profiles(const Vector<String> &p_paths
Error err = profile->load_from_file(p_paths[i]);
ERR_CONTINUE(err != OK);
String basefile = p_paths[i].get_file();
- String dst_file = EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(basefile);
+ String dst_file = EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(basefile);
profile->save_to_file(dst_file);
}
@@ -843,7 +844,7 @@ void EditorFeatureProfileManager::_save_and_update() {
ERR_FAIL_COND(edited_path.is_empty());
ERR_FAIL_COND(edited.is_null());
- edited->save_to_file(EditorSettings::get_singleton()->get_feature_profiles_dir().plus_file(edited_path + ".profile"));
+ edited->save_to_file(EditorPaths::get_singleton()->get_feature_profiles_dir().plus_file(edited_path + ".profile"));
if (edited == current) {
update_timer->start();
@@ -883,7 +884,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Reset to Default")));
name_hbc->add_child(profile_actions[PROFILE_CLEAR]);
profile_actions[PROFILE_CLEAR]->set_disabled(true);
- profile_actions[PROFILE_CLEAR]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_CLEAR));
+ profile_actions[PROFILE_CLEAR]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_CLEAR));
main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc);
@@ -897,12 +898,12 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
profile_actions[PROFILE_NEW] = memnew(Button(TTR("Create Profile")));
profiles_hbc->add_child(profile_actions[PROFILE_NEW]);
- profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_NEW));
+ profile_actions[PROFILE_NEW]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_NEW));
profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove Profile")));
profiles_hbc->add_child(profile_actions[PROFILE_ERASE]);
profile_actions[PROFILE_ERASE]->set_disabled(true);
- profile_actions[PROFILE_ERASE]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_ERASE));
+ profile_actions[PROFILE_ERASE]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_ERASE));
main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc);
@@ -911,18 +912,18 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current")));
current_profile_hbc->add_child(profile_actions[PROFILE_SET]);
profile_actions[PROFILE_SET]->set_disabled(true);
- profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_SET));
+ profile_actions[PROFILE_SET]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_SET));
current_profile_hbc->add_child(memnew(VSeparator));
profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import")));
current_profile_hbc->add_child(profile_actions[PROFILE_IMPORT]);
- profile_actions[PROFILE_IMPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_IMPORT));
+ profile_actions[PROFILE_IMPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_IMPORT));
profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export")));
current_profile_hbc->add_child(profile_actions[PROFILE_EXPORT]);
profile_actions[PROFILE_EXPORT]->set_disabled(true);
- profile_actions[PROFILE_EXPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action), varray(PROFILE_EXPORT));
+ profile_actions[PROFILE_EXPORT]->connect("pressed", callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_EXPORT));
main_vbc->add_child(current_profile_hbc);
@@ -939,7 +940,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
class_list->set_hide_root(true);
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
class_list->connect("cell_selected", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_selected));
- class_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_edited), varray(), CONNECT_DEFERRED);
+ class_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_edited), CONNECT_DEFERRED);
class_list->connect("item_collapsed", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_collapsed));
// It will be displayed once the user creates or chooses a profile.
class_list_vbc->hide();
@@ -957,7 +958,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
property_list->set_hide_root(true);
property_list->set_hide_folding(true);
property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
- property_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_property_item_edited), varray(), CONNECT_DEFERRED);
+ property_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_property_item_edited), CONNECT_DEFERRED);
// It will be displayed once the user creates or chooses a profile.
property_list_vbc->hide();
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 9f446ab38f..2f1134e8ef 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1681,7 +1681,7 @@ EditorFileDialog::EditorFileDialog() {
mode_thumbnails = memnew(Button);
mode_thumbnails->set_flat(true);
- mode_thumbnails->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_THUMBNAILS));
+ mode_thumbnails->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_THUMBNAILS));
mode_thumbnails->set_toggle_mode(true);
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
mode_thumbnails->set_button_group(view_mode_group);
@@ -1690,7 +1690,7 @@ EditorFileDialog::EditorFileDialog() {
mode_list = memnew(Button);
mode_list->set_flat(true);
- mode_list->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode), varray(DISPLAY_LIST));
+ mode_list->connect("pressed", callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_LIST));
mode_list->set_toggle_mode(true);
mode_list->set_pressed(display_mode == DISPLAY_LIST);
mode_list->set_button_group(view_mode_group);
@@ -1816,9 +1816,9 @@ EditorFileDialog::EditorFileDialog() {
_update_drives();
connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed));
- item_list->connect("item_selected", callable_mp(this, &EditorFileDialog::_item_selected), varray(), CONNECT_DEFERRED);
- item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), varray(), CONNECT_DEFERRED);
- item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected), varray());
+ item_list->connect("item_selected", callable_mp(this, &EditorFileDialog::_item_selected), CONNECT_DEFERRED);
+ item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), CONNECT_DEFERRED);
+ item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected).bind());
item_list->connect("empty_clicked", callable_mp(this, &EditorFileDialog::_items_clear_selection));
dir->connect("text_submitted", callable_mp(this, &EditorFileDialog::_dir_submitted));
file->connect("text_submitted", callable_mp(this, &EditorFileDialog::_file_submitted));
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 56046a07d7..1a105c7fe8 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -40,6 +40,7 @@
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_settings.h"
@@ -218,7 +219,7 @@ void EditorFileSystem::_scan_filesystem() {
String project = ProjectSettings::get_singleton()->get_resource_path();
- String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
+ String fscache = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
{
Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::READ);
@@ -288,7 +289,7 @@ void EditorFileSystem::_scan_filesystem() {
}
}
- String update_cache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4");
+ String update_cache = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4");
if (FileAccess::exists(update_cache)) {
{
@@ -331,7 +332,7 @@ void EditorFileSystem::_scan_filesystem() {
void EditorFileSystem::_save_filesystem_cache() {
group_file_cache.clear();
- String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
+ String fscache = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(CACHE_FILE_NAME);
Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::WRITE);
ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + fscache + "'. Check user write permissions.");
@@ -1456,7 +1457,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
void EditorFileSystem::_save_late_updated_files() {
//files that already existed, and were modified, need re-scanning for dependencies upon project restart. This is done via saving this special file
- String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4");
+ String fscache = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4");
Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::WRITE);
ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + fscache + "'. Check user write permissions.");
for (const String &E : late_update_files) {
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 8c508494c0..c1d6e505db 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -30,9 +30,10 @@
#include "editor_folding.h"
+#include "core/io/config_file.h"
#include "core/io/file_access.h"
#include "editor/editor_inspector.h"
-#include "editor/editor_settings.h"
+#include "editor/editor_paths.h"
Vector<String> EditorFolding::_get_unfolds(const Object *p_object) {
Vector<String> sections;
@@ -55,7 +56,7 @@ void EditorFolding::save_resource_folding(const Ref<Resource> &p_resource, const
config->set_value("folding", "sections_unfolded", unfolds);
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
- file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
+ file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(file);
config->save(file);
}
@@ -73,7 +74,7 @@ void EditorFolding::load_resource_folding(Ref<Resource> p_resource, const String
config.instantiate();
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
- file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
+ file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(file);
if (config->load(file) != OK) {
return;
@@ -149,7 +150,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path
config->set_value("folding", "nodes_folded", nodes_folded);
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
- file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
+ file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(file);
config->save(file);
}
@@ -157,9 +158,9 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
Ref<ConfigFile> config;
config.instantiate();
- String path = EditorSettings::get_singleton()->get_project_settings_dir();
+ String path = EditorPaths::get_singleton()->get_project_settings_dir();
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
- file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
+ file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(file);
if (config->load(file) != OK) {
return;
@@ -213,7 +214,7 @@ void EditorFolding::load_scene_folding(Node *p_scene, const String &p_path) {
bool EditorFolding::has_folding_data(const String &p_path) {
String file = p_path.get_file() + "-folding-" + p_path.md5_text() + ".cfg";
- file = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(file);
+ file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(file);
return FileAccess::exists(file);
}
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 68141dd4a3..5c3038c468 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -2089,7 +2089,7 @@ EditorHelp::EditorHelp() {
class_desc->connect("finished", callable_mp(this, &EditorHelp::_class_desc_finished));
class_desc->connect("meta_clicked", callable_mp(this, &EditorHelp::_class_desc_select));
class_desc->connect("gui_input", callable_mp(this, &EditorHelp::_class_desc_input));
- class_desc->connect("resized", callable_mp(this, &EditorHelp::_class_desc_resized), varray(false));
+ class_desc->connect("resized", callable_mp(this, &EditorHelp::_class_desc_resized).bind(false));
_class_desc_resized(false);
// Added second so it opens at the bottom so it won't offset the entire widget.
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index c48b443a0b..297d1226e3 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -34,6 +34,7 @@
#include "editor/editor_feature_profile.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
void EditorHelpSearch::_update_icons() {
search_box->set_right_icon(results_tree->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
@@ -250,7 +251,7 @@ EditorHelpSearch::EditorHelpSearch() {
results_tree->set_hide_root(true);
results_tree->set_select_mode(Tree::SELECT_ROW);
results_tree->connect("item_activated", callable_mp(this, &EditorHelpSearch::_confirmed));
- results_tree->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled), varray(false));
+ results_tree->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled).bind(false));
vbox->add_child(results_tree, true);
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index b610e09545..e06e3cbc5f 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -471,6 +471,9 @@ void EditorProperty::update_revert_and_pin_status() {
bool new_can_revert = EditorPropertyRevert::can_property_revert(object, property, &current) && !is_read_only();
if (new_can_revert != can_revert || new_pinned != pinned) {
+ 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;
update();
@@ -554,7 +557,7 @@ void EditorProperty::_focusable_focused(int p_index) {
}
void EditorProperty::add_focusable(Control *p_control) {
- p_control->connect("focus_entered", callable_mp(this, &EditorProperty::_focusable_focused), varray(focusables.size()));
+ p_control->connect("focus_entered", callable_mp(this, &EditorProperty::_focusable_focused).bind(focusables.size()));
focusables.push_back(p_control);
}
@@ -784,6 +787,9 @@ void EditorProperty::expand_all_folding() {
void EditorProperty::collapse_all_folding() {
}
+void EditorProperty::expand_revertable() {
+}
+
void EditorProperty::set_selectable(bool p_selectable) {
selectable = p_selectable;
}
@@ -966,6 +972,7 @@ void EditorProperty::_bind_methods() {
ADD_SIGNAL(MethodInfo("property_keyed_with_value", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT)));
ADD_SIGNAL(MethodInfo("property_checked", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "checked")));
ADD_SIGNAL(MethodInfo("property_pinned", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "pinned")));
+ ADD_SIGNAL(MethodInfo("property_can_revert_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "can_revert")));
ADD_SIGNAL(MethodInfo("resource_selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx")));
@@ -1225,12 +1232,15 @@ void EditorInspectorSection::_notification(int p_what) {
// 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"));
@@ -1274,28 +1284,71 @@ void EditorInspectorSection::_notification(int p_what) {
}
draw_rect(header_rect, c);
- // Draw header title and folding arrow.
- const int arrow_margin = 2;
- const int arrow_width = arrow.is_valid() ? arrow->get_width() : 0;
- Color color = get_theme_color(SNAME("font_color"));
- float text_width = get_size().width - Math::round(arrow_width + arrow_margin * EDSCALE) - section_indent;
- Point2 text_offset = Point2(0, font->get_ascent(font_size) + (header_height - font->get_height(font_size)) / 2);
- HorizontalAlignment text_align = HORIZONTAL_ALIGNMENT_LEFT;
- if (rtl) {
- text_align = HORIZONTAL_ALIGNMENT_RIGHT;
- } else {
- text_offset.x = section_indent + Math::round(arrow_width + arrow_margin * EDSCALE);
- }
- draw_string(font, text_offset.floor(), label, text_align, text_width, font_size, color);
+ // Draw header title, folding arrow and coutn of revertable properties.
+ {
+ int separation = Math::round(2 * EDSCALE);
- if (arrow.is_valid()) {
- Point2 arrow_position = Point2(0, (header_height - arrow->get_height()) / 2);
+ int margin_start = section_indent + separation;
+ int margin_end = separation;
+
+ // - Arrow.
+ if (arrow.is_valid()) {
+ Point2 arrow_position;
+ if (rtl) {
+ arrow_position.x = get_size().width - (margin_start + arrow->get_width());
+ } else {
+ arrow_position.x = margin_start;
+ }
+ arrow_position.y = (header_height - arrow->get_height()) / 2;
+ draw_texture(arrow, arrow_position);
+ margin_start += arrow->get_width();
+ }
+
+ int available = get_size().width - (margin_start + margin_end);
+
+ // - Count of revertable properties.
+ String num_revertable_str;
+ int num_revertable_width = 0;
+ 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;
+
+ Ref<Font> light_font = get_theme_font(SNAME("main"), SNAME("EditorFonts"));
+ int light_font_size = get_theme_font_size(SNAME("main_size"), SNAME("EditorFonts"));
+ Color light_font_color = get_theme_color(SNAME("disabled_font_color"), SNAME("Editor"));
+
+ // Can we fit the long version of the revertable count text?
+ if (revertable_properties.size() == 1) {
+ num_revertable_str = "(1 change)";
+ } else {
+ num_revertable_str = vformat("(%d changes)", revertable_properties.size());
+ }
+ num_revertable_width = light_font->get_string_size(num_revertable_str, HORIZONTAL_ALIGNMENT_LEFT, -1.0f, light_font_size, TextServer::JUSTIFICATION_NONE).x;
+ if (label_width + separation + num_revertable_width > available) {
+ // We'll have to use the short version.
+ num_revertable_str = vformat("(%d)", revertable_properties.size());
+ num_revertable_width = light_font->get_string_size(num_revertable_str, HORIZONTAL_ALIGNMENT_LEFT, -1.0f, light_font_size, TextServer::JUSTIFICATION_NONE).x;
+ }
+
+ Point2 text_offset = Point2(
+ margin_end,
+ light_font->get_ascent(light_font_size) + (header_height - light_font->get_height(light_font_size)) / 2);
+ if (!rtl) {
+ text_offset.x = get_size().width - (text_offset.x + num_revertable_width);
+ }
+ draw_string(light_font, text_offset, num_revertable_str, HORIZONTAL_ALIGNMENT_LEFT, -1.0f, light_font_size, light_font_color, TextServer::JUSTIFICATION_NONE);
+ margin_end += num_revertable_width + separation;
+ available -= num_revertable_width + separation;
+ }
+
+ // - Label.
+ Point2 text_offset = Point2(
+ margin_start,
+ font->get_ascent(font_size) + (header_height - font->get_height(font_size)) / 2);
if (rtl) {
- arrow_position.x = get_size().width - section_indent - arrow->get_width() - Math::round(arrow_margin * EDSCALE);
- } else {
- arrow_position.x = section_indent + Math::round(arrow_margin * EDSCALE);
+ text_offset.x = margin_end;
}
- draw_texture(arrow, arrow_position.floor());
+ HorizontalAlignment text_align = rtl ? HORIZONTAL_ALIGNMENT_RIGHT : HORIZONTAL_ALIGNMENT_LEFT;
+ draw_string(font, text_offset, label, text_align, available, font_size, font_color, TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_CONSTRAIN_ELLIPSIS);
}
// Draw dropping highlight.
@@ -1471,6 +1524,22 @@ void EditorInspectorSection::fold() {
update();
}
+bool EditorInspectorSection::has_revertable_properties() const {
+ return !revertable_properties.is_empty();
+}
+
+void EditorInspectorSection::property_can_revert_changed(const String &p_path, bool p_can_revert) {
+ bool had_revertable_properties = has_revertable_properties();
+ if (p_can_revert) {
+ revertable_properties.insert(p_path);
+ } else {
+ revertable_properties.erase(p_path);
+ }
+ if (has_revertable_properties() != had_revertable_properties) {
+ update();
+ }
+}
+
void EditorInspectorSection::_bind_methods() {
ClassDB::bind_method(D_METHOD("setup", "section", "label", "object", "bg_color", "foldable"), &EditorInspectorSection::setup);
ClassDB::bind_method(D_METHOD("get_vbox"), &EditorInspectorSection::get_vbox);
@@ -1637,7 +1706,7 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
- move_function.call(args_p, 5, return_value, call_error);
+ move_function.callp(args_p, 5, return_value, call_error);
} else {
WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
}
@@ -1712,7 +1781,7 @@ void EditorInspectorArray::_clear_array() {
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
- move_function.call(args_p, 5, return_value, call_error);
+ move_function.callp(args_p, 5, return_value, call_error);
} else {
WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
}
@@ -1765,7 +1834,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
- move_function.call(args_p, 5, return_value, call_error);
+ move_function.callp(args_p, 5, return_value, call_error);
} else {
WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
}
@@ -1784,7 +1853,7 @@ void EditorInspectorArray::_resize_array(int p_size) {
const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
Variant return_value;
Callable::CallError call_error;
- move_function.call(args_p, 5, return_value, call_error);
+ move_function.callp(args_p, 5, return_value, call_error);
} else {
WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
}
@@ -1931,8 +2000,8 @@ void EditorInspectorArray::_setup() {
ae.panel->set_tooltip(vformat(TTR("Element %d: %s%d*"), i, array_element_prefix, i));
ae.panel->connect("focus_entered", callable_mp((CanvasItem *)ae.panel, &PanelContainer::update));
ae.panel->connect("focus_exited", callable_mp((CanvasItem *)ae.panel, &PanelContainer::update));
- ae.panel->connect("draw", callable_bind(callable_mp(this, &EditorInspectorArray::_panel_draw), i));
- ae.panel->connect("gui_input", callable_bind(callable_mp(this, &EditorInspectorArray::_panel_gui_input), i));
+ ae.panel->connect("draw", callable_mp(this, &EditorInspectorArray::_panel_draw).bind(i));
+ ae.panel->connect("gui_input", callable_mp(this, &EditorInspectorArray::_panel_gui_input).bind(i));
ae.panel->add_theme_style_override(SNAME("panel"), i % 2 ? odd_style : even_style);
elements_vbox->add_child(ae.panel);
@@ -2026,8 +2095,8 @@ void EditorInspectorArray::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
Color color = get_theme_color(SNAME("dark_color_1"), SNAME("Editor"));
- odd_style->set_bg_color(color.lightened(0.15));
- even_style->set_bg_color(color.darkened(0.15));
+ odd_style->set_bg_color(color.darkened(-0.08));
+ even_style->set_bg_color(color.darkened(0.08));
for (int i = 0; i < (int)array_elements.size(); i++) {
ArrayElement &ae = array_elements[i];
@@ -2330,7 +2399,7 @@ String EditorInspector::get_selected_path() const {
return property_selected;
}
-void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<EditorInspectorPlugin> ped) {
+void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, EditorInspectorSection *p_section, Ref<EditorInspectorPlugin> ped) {
for (const EditorInspectorPlugin::AddedEditor &F : ped->added_editors) {
EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor);
current_vbox->add_child(F.property_editor);
@@ -2339,14 +2408,14 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
ep->object = object;
ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
- ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED);
+ 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));
ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked));
ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned));
ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected));
ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed));
- ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED);
- ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), varray(), CONNECT_DEFERRED);
+ ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), CONNECT_DEFERRED);
+ ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), CONNECT_DEFERRED);
if (F.properties.size()) {
if (F.properties.size() == 1) {
@@ -2370,6 +2439,10 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
}
}
+ if (p_section) {
+ ep->connect("property_can_revert_changed", callable_mp(p_section, &EditorInspectorSection::property_can_revert_changed));
+ }
+
ep->set_read_only(read_only);
ep->update_property();
ep->_update_pin_flags();
@@ -2476,9 +2549,11 @@ void EditorInspector::update_tree() {
// Get the lists of editors to add the beginning.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_begin(object);
- _parse_added_editors(main_vbox, ped);
+ _parse_added_editors(main_vbox, nullptr, ped);
}
+ StringName type_name;
+
// Get the lists of editors for properties.
for (List<PropertyInfo>::Element *E_property = plist.front(); E_property; E_property = E_property->next()) {
PropertyInfo &p = E_property->get();
@@ -2549,6 +2624,7 @@ void EditorInspector::update_tree() {
category_vbox = nullptr; //reset
String type = p.name;
+ type_name = p.name;
// Set the category icon.
if (!ClassDB::class_exists(type) && !ScriptServer::is_global_class(type) && p.hint_string.length() && FileAccess::exists(p.hint_string)) {
@@ -2582,24 +2658,23 @@ void EditorInspector::update_tree() {
if (use_doc_hints) {
// Sets the category tooltip to show documentation.
- StringName type2 = p.name;
- if (!class_descr_cache.has(type2)) {
+ if (!class_descr_cache.has(type_name)) {
String descr;
DocTools *dd = EditorHelp::get_doc_data();
- HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(type2);
+ HashMap<String, DocData::ClassDoc>::Iterator E = dd->class_list.find(type_name);
if (E) {
descr = DTR(E->value.brief_description);
}
- class_descr_cache[type2] = descr;
+ class_descr_cache[type_name] = descr;
}
- category->set_tooltip(p.name + "::" + (class_descr_cache[type2].is_empty() ? "" : class_descr_cache[type2]));
+ category->set_tooltip(p.name + "::" + (class_descr_cache[type_name].is_empty() ? "" : class_descr_cache[type_name]));
}
// Add editors at the start of a category.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_category(object, p.name);
- _parse_added_editors(main_vbox, ped);
+ _parse_added_editors(main_vbox, nullptr, ped);
}
continue;
@@ -2791,7 +2866,7 @@ void EditorInspector::update_tree() {
// Add editors at the start of a group.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_group(object, path);
- _parse_added_editors(section->get_vbox(), ped);
+ _parse_added_editors(section->get_vbox(), section, ped);
}
vbox_per_path[root_vbox][acc_path] = section->get_vbox();
@@ -2821,7 +2896,7 @@ void EditorInspector::update_tree() {
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), varray(array_element_prefix));
+ 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.
@@ -2831,7 +2906,7 @@ void EditorInspector::update_tree() {
editor_inspector_array = memnew(EditorInspectorArray);
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, use_folding);
- editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request), varray(array_element_prefix));
+ 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);
}
}
@@ -2864,7 +2939,7 @@ void EditorInspector::update_tree() {
// Build the doc hint, to use as tooltip.
// Get the class name.
- StringName classname = object->get_class_name();
+ StringName classname = type_name == "" ? object->get_class_name() : type_name;
if (!object_class.is_empty()) {
classname = object_class;
}
@@ -2973,6 +3048,12 @@ void EditorInspector::update_tree() {
editor_property_map[prop].push_back(ep);
}
}
+
+ EditorInspectorSection *section = Object::cast_to<EditorInspectorSection>(current_vbox->get_parent());
+ if (section) {
+ ep->connect("property_can_revert_changed", callable_mp(section, &EditorInspectorSection::property_can_revert_changed));
+ }
+
ep->set_draw_warning(draw_warning);
ep->set_use_folding(use_folding);
ep->set_checkable(checkable);
@@ -2987,16 +3068,16 @@ void EditorInspector::update_tree() {
if (ep) {
// Eventually, set other properties/signals after the property editor got added to the tree.
bool update_all = (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED);
- ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed), varray(update_all));
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed).bind(update_all));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
- ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED);
+ 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));
ep->connect("property_checked", callable_mp(this, &EditorInspector::_property_checked));
ep->connect("property_pinned", callable_mp(this, &EditorInspector::_property_pinned));
ep->connect("selected", callable_mp(this, &EditorInspector::_property_selected));
ep->connect("multiple_properties_changed", callable_mp(this, &EditorInspector::_multiple_properties_changed));
- ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), varray(), CONNECT_DEFERRED);
- ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), varray(), CONNECT_DEFERRED);
+ ep->connect("resource_selected", callable_mp(this, &EditorInspector::_resource_selected), CONNECT_DEFERRED);
+ ep->connect("object_id_selected", callable_mp(this, &EditorInspector::_object_id_selected), CONNECT_DEFERRED);
if (!doc_info.description.is_empty()) {
ep->set_tooltip(property_prefix + p.name + "::" + doc_info.description);
} else {
@@ -3025,7 +3106,7 @@ void EditorInspector::update_tree() {
// Get the lists of to add at the end.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_end(object);
- _parse_added_editors(main_vbox, ped);
+ _parse_added_editors(main_vbox, nullptr, ped);
}
}
@@ -3178,6 +3259,44 @@ void EditorInspector::expand_all_folding() {
}
}
+void EditorInspector::expand_revertable() {
+ HashSet<EditorInspectorSection *> sections_to_unfold[2];
+ for (EditorInspectorSection *E : sections) {
+ if (E->has_revertable_properties()) {
+ sections_to_unfold[0].insert(E);
+ }
+ }
+
+ // Climb up the hierachy doing double buffering with the sets.
+ int a = 0;
+ int b = 1;
+ while (sections_to_unfold[a].size()) {
+ for (EditorInspectorSection *E : sections_to_unfold[a]) {
+ E->unfold();
+
+ Node *n = E->get_parent();
+ while (n) {
+ if (Object::cast_to<EditorInspector>(n)) {
+ break;
+ }
+ if (Object::cast_to<EditorInspectorSection>(n) && !sections_to_unfold[a].has((EditorInspectorSection *)n)) {
+ sections_to_unfold[b].insert((EditorInspectorSection *)n);
+ }
+ n = n->get_parent();
+ }
+ }
+
+ sections_to_unfold[a].clear();
+ SWAP(a, b);
+ }
+
+ for (const KeyValue<StringName, List<EditorProperty *>> &F : editor_property_map) {
+ for (EditorProperty *E : F.value) {
+ E->expand_revertable();
+ }
+ }
+}
+
void EditorInspector::set_scroll_offset(int p_offset) {
set_v_scroll(p_offset);
}
@@ -3298,7 +3417,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
Variant return_value;
Callable::CallError call_error;
- callback.call(p_arguments, 4, return_value, call_error);
+ callback.callp(p_arguments, 4, return_value, call_error);
if (call_error.error != Callable::CallError::CALL_OK) {
ERR_PRINT("Invalid UndoRedo callback.");
}
@@ -3704,20 +3823,25 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
added.insert(pi.name);
r_list.insert_before(insert_here, pi);
+
+ List<PropertyInfo>::Element *prop_below = bottom->next();
+ while (prop_below) {
+ if (prop_below->get() == pi) {
+ List<PropertyInfo>::Element *to_delete = prop_below;
+ prop_below = prop_below->next();
+ r_list.erase(to_delete);
+ } else {
+ prop_below = prop_below->next();
+ }
+ }
}
// Script Variables -> NodeA (insert_here) -> A props... -> bottom
insert_here = category;
}
- // NodeC -> C props... -> NodeB..C..
if (script_variables) {
r_list.erase(script_variables);
- List<PropertyInfo>::Element *to_delete = bottom->next();
- while (to_delete && !(to_delete->get().usage & PROPERTY_USAGE_CATEGORY)) {
- r_list.erase(to_delete);
- to_delete = bottom->next();
- }
r_list.erase(bottom);
}
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 4ec3513da5..54533de960 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -184,6 +184,7 @@ public:
virtual void expand_all_folding();
virtual void collapse_all_folding();
+ virtual void expand_revertable();
virtual Variant get_drag_data(const Point2 &p_point) override;
virtual void update_cache();
@@ -281,6 +282,8 @@ class EditorInspectorSection : public Container {
Timer *dropping_unfold_timer = nullptr;
bool dropping = false;
+ HashSet<StringName> revertable_properties;
+
void _test_unfold();
protected:
@@ -299,6 +302,9 @@ public:
void unfold();
void fold();
+ bool has_revertable_properties() const;
+ void property_can_revert_changed(const String &p_path, bool p_can_revert);
+
EditorInspectorSection();
~EditorInspectorSection();
};
@@ -517,7 +523,7 @@ class EditorInspector : public ScrollContainer {
void _edit_request_change(Object *p_object, const String &p_prop);
void _filter_changed(const String &p_text);
- void _parse_added_editors(VBoxContainer *current_vbox, Ref<EditorInspectorPlugin> ped);
+ void _parse_added_editors(VBoxContainer *current_vbox, EditorInspectorSection *p_section, Ref<EditorInspectorPlugin> ped);
void _vscroll_changed(double);
@@ -579,6 +585,7 @@ public:
void collapse_all_folding();
void expand_all_folding();
+ void expand_revertable();
void set_scroll_offset(int p_offset);
int get_scroll_offset() const;
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index f26f47dbc7..38cc85bb4e 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -33,8 +33,11 @@
#include "core/os/keyboard.h"
#include "core/version.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/center_container.h"
+#include "scene/gui/separator.h"
#include "scene/resources/font.h"
void EditorLog::_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) {
@@ -122,7 +125,7 @@ void EditorLog::_save_state() {
Ref<ConfigFile> config;
config.instantiate();
// Load and amend existing config if it exists.
- config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
const String section = "editor_log";
for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) {
@@ -132,7 +135,7 @@ void EditorLog::_save_state() {
config->set_value(section, "collapse", collapse);
config->set_value(section, "show_search", search_box->is_visible());
- config->save(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ config->save(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
}
void EditorLog::_load_state() {
@@ -140,7 +143,7 @@ void EditorLog::_load_state() {
Ref<ConfigFile> config;
config.instantiate();
- config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
// Run the below code even if config->load returns an error, since we want the defaults to be set even if the file does not exist yet.
const String section = "editor_log";
diff --git a/editor/editor_log.h b/editor/editor_log.h
index 653fba9524..003a148b9b 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -88,7 +88,7 @@ private:
toggle_button->add_theme_color_override("icon_color_pressed", Color(1, 1, 1, 1));
toggle_button->set_focus_mode(FOCUS_NONE);
// When toggled call the callback and pass the MessageType this button is for.
- toggle_button->connect("toggled", p_toggled_callback, varray(type));
+ toggle_button->connect("toggled", p_toggled_callback.bind(type));
}
int get_message_count() {
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index e7957b6fd1..e9aceb684f 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -49,6 +49,7 @@
#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"
@@ -78,7 +79,6 @@
#include "editor/editor_build_profile.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_data.h"
-#include "editor/editor_export.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
@@ -104,7 +104,9 @@
#include "editor/editor_themes.h"
#include "editor/editor_toaster.h"
#include "editor/editor_translation_parser.h"
-#include "editor/export_template_manager.h"
+#include "editor/export/editor_export.h"
+#include "editor/export/export_template_manager.h"
+#include "editor/export/project_export.h"
#include "editor/filesystem_dock.h"
#include "editor/import/audio_stream_import_settings.h"
#include "editor/import/dynamic_font_import_settings.h"
@@ -148,6 +150,7 @@
#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"
@@ -174,7 +177,6 @@
#include "editor/plugins/polygon_2d_editor_plugin.h"
#include "editor/plugins/polygon_3d_editor_plugin.h"
#include "editor/plugins/ray_cast_2d_editor_plugin.h"
-#include "editor/plugins/replication_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"
@@ -199,7 +201,6 @@
#include "editor/plugins/visual_shader_editor_plugin.h"
#include "editor/plugins/voxel_gi_editor_plugin.h"
#include "editor/progress_dialog.h"
-#include "editor/project_export.h"
#include "editor/project_settings_editor.h"
#include "editor/register_exporters.h"
#include "editor/scene_tree_dock.h"
@@ -553,6 +554,19 @@ void EditorNode::_update_from_settings() {
tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color"));
tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color"));
tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_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"));
+#endif // DEBUG_ENABLED
}
void EditorNode::_select_default_main_screen_plugin() {
@@ -1035,7 +1049,7 @@ void EditorNode::_sources_changed(bool p_exist) {
// Reload the global shader variables, but this time
// loading textures, as they are now properly imported.
- RenderingServer::get_singleton()->global_variables_load_settings(true);
+ RenderingServer::get_singleton()->global_shader_uniforms_load_settings(true);
// Start preview thread now that it's safe.
if (!singleton->cmdline_export_mode) {
@@ -1213,7 +1227,7 @@ void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const St
}
String path = ProjectSettings::get_singleton()->localize_path(p_path);
- Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
+ Error err = ResourceSaver::save(p_resource, path, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
if (ResourceLoader::is_imported(p_resource->get_path())) {
@@ -1364,7 +1378,7 @@ void EditorNode::_get_scene_metadata(const String &p_file) {
return;
}
- String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
+ String path = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
Ref<ConfigFile> cf;
cf.instantiate();
@@ -1396,7 +1410,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
return;
}
- String path = EditorSettings::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
+ String path = EditorPaths::get_singleton()->get_project_settings_dir().plus_file(p_file.get_file() + "-editstate-" + p_file.md5_text() + ".cfg");
Ref<ConfigFile> cf;
cf.instantiate();
@@ -1436,7 +1450,7 @@ bool EditorNode::_find_and_save_resource(Ref<Resource> p_res, HashMap<Ref<Resour
if (p_res->get_path().is_resource_file()) {
if (changed || subchanged) {
- ResourceSaver::save(p_res->get_path(), p_res, flags);
+ ResourceSaver::save(p_res, p_res->get_path(), flags);
}
processed[p_res] = false; // Because it's a file.
return false;
@@ -1667,7 +1681,7 @@ int EditorNode::_save_external_resources() {
if (ps.is_valid()) {
continue; // Do not save PackedScenes, this will mess up the editor.
}
- ResourceSaver::save(res->get_path(), res, flg);
+ ResourceSaver::save(res, res->get_path(), flg);
saved++;
}
@@ -1738,7 +1752,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
}
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
- err = ResourceSaver::save(p_file, sdata, flg);
+ err = ResourceSaver::save(sdata, p_file, flg);
// This needs to be emitted before saving external resources.
emit_signal(SNAME("scene_saved"), p_file);
@@ -1945,7 +1959,7 @@ void EditorNode::_dialog_action(String p_file) {
MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(), ml, true, file_export_lib_apply_xforms->is_pressed());
- Error err = ResourceSaver::save(p_file, ml);
+ Error err = ResourceSaver::save(ml, p_file);
if (err) {
show_accept(TTR("Error saving MeshLibrary!"), TTR("OK"));
return;
@@ -3010,7 +3024,7 @@ void EditorNode::_tool_menu_option(int p_idx) {
Callable callback = tool_menu->get_item_metadata(p_idx);
Callable::CallError ce;
Variant result;
- callback.call(nullptr, 0, result, ce);
+ callback.callp(nullptr, 0, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_callable_error_text(callback, nullptr, 0, ce);
@@ -3045,7 +3059,7 @@ void EditorNode::_export_as_menu_option(int p_idx) {
Callable callback = export_as_menu->get_item_metadata(p_idx);
Callable::CallError ce;
Variant result;
- callback.call(nullptr, 0, result, ce);
+ callback.callp(nullptr, 0, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_callable_error_text(callback, nullptr, 0, ce);
@@ -3250,7 +3264,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), varray(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());
@@ -4375,7 +4389,7 @@ void EditorNode::_dock_make_float() {
window->set_size(dock_size);
window->set_position(dock_screen_pos);
window->set_transient(true);
- window->connect("close_requested", callable_mp(this, &EditorNode::_dock_floating_close_request), varray(dock));
+ window->connect("close_requested", callable_mp(this, &EditorNode::_dock_floating_close_request).bind(dock));
window->set_meta("dock_slot", dock_popup_selected_idx);
window->set_meta("dock_index", dock_index);
gui_base->add_child(window);
@@ -4596,13 +4610,13 @@ void EditorNode::_save_docks() {
Ref<ConfigFile> config;
config.instantiate();
// Load and amend existing config if it exists.
- config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
_save_docks_to_config(config, "docks");
_save_open_scenes_to_config(config, "EditorNode");
editor_data.get_plugin_window_layout(config);
- config->save(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ config->save(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
}
void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section) {
@@ -4666,7 +4680,7 @@ void EditorNode::_dock_split_dragged(int ofs) {
void EditorNode::_load_docks() {
Ref<ConfigFile> config;
config.instantiate();
- Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ Error err = config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
if (err != OK) {
// No config.
if (overridden_default_layout >= 0) {
@@ -4899,7 +4913,7 @@ bool EditorNode::has_scenes_in_session() {
}
Ref<ConfigFile> config;
config.instantiate();
- Error err = config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
+ Error err = config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
if (err != OK) {
return false;
}
@@ -5234,7 +5248,7 @@ void EditorNode::_scene_tab_changed(int p_tab) {
Button *EditorNode::add_bottom_panel_item(String p_text, Control *p_item) {
Button *tb = memnew(Button);
tb->set_flat(true);
- tb->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(bottom_panel_items.size()));
+ tb->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch).bind(bottom_panel_items.size()));
tb->set_text(p_text);
tb->set_toggle_mode(true);
tb->set_focus_mode(Control::FOCUS_NONE);
@@ -5281,7 +5295,7 @@ void EditorNode::raise_bottom_panel_item(Control *p_item) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->disconnect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch));
- bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(i));
+ bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch).bind(i));
}
}
@@ -5301,7 +5315,7 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
bottom_panel_items[i].button->disconnect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch));
- bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch), varray(i));
+ bottom_panel_items[i].button->connect("toggled", callable_mp(this, &EditorNode::_bottom_panel_switch).bind(i));
}
}
@@ -5929,7 +5943,11 @@ EditorNode::EditorNode() {
AudioServer::get_singleton()->set_enable_tagging_used_audio_streams(true);
// No navigation server by default if in editor.
- NavigationServer3D::get_singleton()->set_active(false);
+ if (NavigationServer3D::get_singleton()->get_debug_enabled()) {
+ NavigationServer3D::get_singleton()->set_active(true);
+ } else {
+ NavigationServer3D::get_singleton()->set_active(false);
+ }
// No physics by default if in editor.
PhysicsServer3D::get_singleton()->set_active(false);
@@ -6156,7 +6174,14 @@ EditorNode::EditorNode() {
EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false);
EDITOR_DEF("interface/inspector/horizontal_vector_types_editing", true);
EDITOR_DEF("interface/inspector/open_resources_in_current_inspector", true);
- EDITOR_DEF("interface/inspector/resources_to_open_in_new_inspector", "Script,MeshLibrary");
+
+ PackedStringArray open_in_new_inspector_defaults;
+ // Required for the script editor to work.
+ open_in_new_inspector_defaults.push_back("Script");
+ // Required for the GridMap editor to work.
+ open_in_new_inspector_defaults.push_back("MeshLibrary");
+ EDITOR_DEF("interface/inspector/resources_to_open_in_new_inspector", open_in_new_inspector_defaults);
+
EDITOR_DEF("interface/inspector/default_color_picker_mode", 0);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_mode", PROPERTY_HINT_ENUM, "RGB,HSV,RAW,OKHSL", PROPERTY_USAGE_DEFAULT));
EDITOR_DEF("interface/inspector/default_color_picker_shape", (int32_t)ColorPicker::SHAPE_OKHSL_CIRCLE);
@@ -6322,7 +6347,7 @@ EditorNode::EditorNode() {
dock_slot[i]->set_custom_minimum_size(Size2(170, 0) * EDSCALE);
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_slot[i]->set_popup(dock_select_popup);
- dock_slot[i]->connect("pre_popup_pressed", callable_mp(this, &EditorNode::_dock_pre_popup), varray(i));
+ dock_slot[i]->connect("pre_popup_pressed", callable_mp(this, &EditorNode::_dock_pre_popup).bind(i));
dock_slot[i]->set_drag_to_rearrange_enabled(true);
dock_slot[i]->set_tabs_rearrange_group(1);
dock_slot[i]->connect("tab_changed", callable_mp(this, &EditorNode::_dock_tab_changed));
@@ -6370,7 +6395,7 @@ EditorNode::EditorNode() {
scene_tabs->set_drag_to_rearrange_enabled(true);
scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed));
scene_tabs->connect("tab_button_pressed", callable_mp(this, &EditorNode::_scene_tab_script_edited));
- scene_tabs->connect("tab_close_pressed", callable_mp(this, &EditorNode::_scene_tab_closed), varray(SCENE_TAB_CLOSE));
+ scene_tabs->connect("tab_close_pressed", callable_mp(this, &EditorNode::_scene_tab_closed).bind(SCENE_TAB_CLOSE));
scene_tabs->connect("tab_hovered", callable_mp(this, &EditorNode::_scene_tab_hovered));
scene_tabs->connect("mouse_exited", callable_mp(this, &EditorNode::_scene_tab_exit));
scene_tabs->connect("gui_input", callable_mp(this, &EditorNode::_scene_tab_input));
@@ -6389,7 +6414,7 @@ EditorNode::EditorNode() {
scene_tab_add->set_icon(gui_base->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
scene_tab_add->add_theme_color_override("icon_normal_color", Color(0.6f, 0.6f, 0.6f, 0.8f));
scene_tabs->add_child(scene_tab_add);
- scene_tab_add->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(FILE_NEW_SCENE));
+ scene_tab_add->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(FILE_NEW_SCENE));
scene_tab_add_ph = memnew(Control);
scene_tab_add_ph->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
@@ -6441,7 +6466,7 @@ EditorNode::EditorNode() {
prev_scene->set_icon(gui_base->get_theme_icon(SNAME("PrevScene"), SNAME("EditorIcons")));
prev_scene->set_tooltip(TTR("Go to previously opened scene."));
prev_scene->set_disabled(true);
- prev_scene->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(FILE_OPEN_PREV));
+ prev_scene->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(FILE_OPEN_PREV));
gui_base->add_child(prev_scene);
prev_scene->set_position(Point2(3, 24));
prev_scene->hide();
@@ -6452,7 +6477,7 @@ EditorNode::EditorNode() {
save_accept = memnew(AcceptDialog);
gui_base->add_child(save_accept);
- save_accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), make_binds((int)MenuOptions::FILE_SAVE_AS_SCENE));
+ save_accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind((int)MenuOptions::FILE_SAVE_AS_SCENE));
project_export = memnew(ProjectExportDialog);
gui_base->add_child(project_export);
@@ -6695,7 +6720,7 @@ EditorNode::EditorNode() {
play_button->set_toggle_mode(true);
play_button->set_icon(gui_base->get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
play_button->set_focus_mode(Control::FOCUS_NONE);
- play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY));
+ play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY));
play_button->set_tooltip(TTR("Play the project."));
ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), Key::F5);
@@ -6720,7 +6745,7 @@ EditorNode::EditorNode() {
play_hb->add_child(stop_button);
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), make_binds(RUN_STOP));
+ stop_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_STOP));
stop_button->set_tooltip(TTR("Stop the scene."));
stop_button->set_disabled(true);
@@ -6738,7 +6763,7 @@ EditorNode::EditorNode() {
play_scene_button->set_toggle_mode(true);
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")));
- play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_SCENE));
+ play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_SCENE));
play_scene_button->set_tooltip(TTR("Play the edited scene."));
ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), Key::F6);
@@ -6751,7 +6776,7 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_toggle_mode(true);
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayCustom"), SNAME("EditorIcons")));
- play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_CUSTOM_SCENE));
+ play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(RUN_PLAY_CUSTOM_SCENE));
play_custom_scene_button->set_tooltip(TTR("Play custom scene"));
ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::F5);
@@ -6818,7 +6843,7 @@ EditorNode::EditorNode() {
video_restart_dialog = memnew(ConfirmationDialog);
video_restart_dialog->set_text(TTR("Changing the video driver 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), varray(SET_RENDERING_DRIVER_SAVE_AND_RESTART));
+ video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SET_RENDERING_DRIVER_SAVE_AND_RESTART));
gui_base->add_child(video_restart_dialog);
progress_hb = memnew(BackgroundProgress);
@@ -6987,8 +7012,8 @@ EditorNode::EditorNode() {
custom_build_manage_templates = memnew(ConfirmationDialog);
custom_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
custom_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
- custom_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
- custom_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_MANAGE_EXPORT_TEMPLATES));
+ custom_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
+ custom_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
gui_base->add_child(custom_build_manage_templates);
file_android_build_source = memnew(EditorFileDialog);
@@ -7008,7 +7033,7 @@ EditorNode::EditorNode() {
remove_android_build_template = memnew(ConfirmationDialog);
remove_android_build_template->set_text(TTR("The Android build template is already installed in this project and it won't be overwritten.\nRemove the \"res://android/build\" directory manually before attempting this operation again."));
remove_android_build_template->set_ok_button_text(TTR("Show in File Manager"));
- remove_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES));
+ remove_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES));
gui_base->add_child(remove_android_build_template);
file_templates = memnew(EditorFileDialog);
@@ -7142,7 +7167,6 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(Path3DEditorPlugin));
add_editor_plugin(memnew(PhysicalBone3DEditorPlugin));
add_editor_plugin(memnew(Polygon3DEditorPlugin));
- add_editor_plugin(memnew(ReplicationEditorPlugin));
add_editor_plugin(memnew(ResourcePreloaderEditorPlugin));
add_editor_plugin(memnew(ShaderEditorPlugin));
add_editor_plugin(memnew(ShaderFileEditorPlugin));
@@ -7301,7 +7325,7 @@ EditorNode::EditorNode() {
pick_main_scene = memnew(ConfirmationDialog);
gui_base->add_child(pick_main_scene);
pick_main_scene->set_ok_button_text(TTR("Select"));
- pick_main_scene->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), varray(SETTINGS_PICK_MAIN_SCENE));
+ pick_main_scene->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_PICK_MAIN_SCENE));
select_current_scene_button = pick_main_scene->add_button(TTR("Select Current"), true, "select_current");
pick_main_scene->connect("custom_action", callable_mp(this, &EditorNode::_pick_main_scene_custom_action));
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 53c2312022..0201e84eaf 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -32,12 +32,11 @@
#define EDITOR_NODE_H
#include "core/templates/safe_refcount.h"
-#include "editor/editor_export.h"
#include "editor/editor_folding.h"
#include "editor/editor_native_shader_source_visualizer.h"
#include "editor/editor_run.h"
+#include "editor/export/editor_export.h"
#include "editor/inspector_dock.h"
-#include "editor/property_editor.h"
typedef void (*EditorNodeInitCallback)();
typedef void (*EditorPluginInitializeCallback)();
@@ -48,6 +47,7 @@ class AudioStreamPreviewGenerator;
class BackgroundProgress;
class Button;
class CenterContainer;
+class ColorPicker;
class ConfirmationDialog;
class Control;
class DependencyEditor;
@@ -67,6 +67,7 @@ class EditorPlugin;
class EditorPluginList;
class EditorQuickOpen;
class EditorResourcePreview;
+class EditorResourceConversionPlugin;
class EditorRun;
class EditorRunNative;
class EditorSettingsDialog;
diff --git a/editor/editor_paths.cpp b/editor/editor_paths.cpp
index a5c2fe093c..b6364e1ab7 100644
--- a/editor/editor_paths.cpp
+++ b/editor/editor_paths.cpp
@@ -66,6 +66,30 @@ String EditorPaths::get_self_contained_file() const {
return self_contained_file;
}
+String EditorPaths::get_export_templates_dir() const {
+ return get_data_dir().plus_file(export_templates_folder);
+}
+
+String EditorPaths::get_project_settings_dir() const {
+ return get_project_data_dir().plus_file("editor");
+}
+
+String EditorPaths::get_text_editor_themes_dir() const {
+ return get_config_dir().plus_file(text_editor_themes_folder);
+}
+
+String EditorPaths::get_script_templates_dir() const {
+ return get_config_dir().plus_file(script_templates_folder);
+}
+
+String EditorPaths::get_project_script_templates_dir() const {
+ return ProjectSettings::get_singleton()->get("editor/script/templates_search_path");
+}
+
+String EditorPaths::get_feature_profiles_dir() const {
+ return get_config_dir().plus_file(feature_profiles_folder);
+}
+
void EditorPaths::create() {
ERR_FAIL_COND(singleton != nullptr);
memnew(EditorPaths());
@@ -82,6 +106,8 @@ void EditorPaths::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cache_dir"), &EditorPaths::get_cache_dir);
ClassDB::bind_method(D_METHOD("is_self_contained"), &EditorPaths::is_self_contained);
ClassDB::bind_method(D_METHOD("get_self_contained_file"), &EditorPaths::get_self_contained_file);
+
+ ClassDB::bind_method(D_METHOD("get_project_settings_dir"), &EditorPaths::get_project_settings_dir);
}
EditorPaths::EditorPaths() {
@@ -153,8 +179,8 @@ EditorPaths::EditorPaths() {
}
}
- if (!dir->dir_exists("templates")) {
- dir->make_dir("templates");
+ if (!dir->dir_exists(export_templates_folder)) {
+ dir->make_dir(export_templates_folder);
}
}
@@ -168,14 +194,14 @@ EditorPaths::EditorPaths() {
}
}
- if (!dir->dir_exists("text_editor_themes")) {
- dir->make_dir("text_editor_themes");
+ if (!dir->dir_exists(text_editor_themes_folder)) {
+ dir->make_dir(text_editor_themes_folder);
}
- if (!dir->dir_exists("script_templates")) {
- dir->make_dir("script_templates");
+ if (!dir->dir_exists(script_templates_folder)) {
+ dir->make_dir(script_templates_folder);
}
- if (!dir->dir_exists("feature_profiles")) {
- dir->make_dir("feature_profiles");
+ if (!dir->dir_exists(feature_profiles_folder)) {
+ dir->make_dir(feature_profiles_folder);
}
}
@@ -192,7 +218,6 @@ EditorPaths::EditorPaths() {
// Validate or create project-specific editor data dir,
// including shader cache subdir.
-
if (Engine::get_singleton()->is_project_manager_hint() || Main::is_cmdline_tool()) {
// Nothing to create, use shared editor data dir for shader cache.
Engine::get_singleton()->set_shader_cache_path(data_dir);
diff --git a/editor/editor_paths.h b/editor/editor_paths.h
index 7d863a7c6c..9cff1063c5 100644
--- a/editor/editor_paths.h
+++ b/editor/editor_paths.h
@@ -45,6 +45,10 @@ class EditorPaths : public Object {
String project_data_dir; // Project-specific data (metadata, shader cache, etc.).
bool self_contained = false; // Self-contained means everything goes to `editor_data` dir.
String self_contained_file; // Self-contained file with configuration.
+ String export_templates_folder = "export_templates";
+ String text_editor_themes_folder = "text_editor_themes";
+ String script_templates_folder = "script_templates";
+ String feature_profiles_folder = "feature_profiles";
static EditorPaths *singleton;
@@ -58,6 +62,12 @@ public:
String get_config_dir() const;
String get_cache_dir() const;
String get_project_data_dir() const;
+ String get_export_templates_dir() const;
+ String get_project_settings_dir() const;
+ String get_text_editor_themes_dir() const;
+ String get_script_templates_dir() const;
+ String get_project_script_templates_dir() const;
+ String get_feature_profiles_dir() const;
bool is_self_contained() const;
String get_self_contained_file() const;
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index d9c2a42114..566c22f5a9 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -31,11 +31,11 @@
#include "editor_plugin.h"
#include "editor/editor_command_palette.h"
-#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export.h"
#include "editor/filesystem_dock.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 3a0b875b8c..5a010a66c1 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -37,6 +37,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/margin_container.h"
+#include "scene/gui/tree.h"
void EditorPluginSettings::_notification(int p_what) {
switch (p_what) {
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 7c6d93e6f4..9c619066f2 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -34,8 +34,8 @@
#include "core/object/undo_redo.h"
#include "editor/editor_data.h"
#include "editor/plugin_config_dialog.h"
-#include "property_editor.h"
-#include "scene/gui/dialogs.h"
+
+class Tree;
class EditorPluginSettings : public VBoxContainer {
GDCLASS(EditorPluginSettings, VBoxContainer);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index d145a1e820..09c55d5d24 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -774,7 +774,7 @@ void EditorPropertyFlags::setup(const Vector<String> &p_options) {
CheckBox *cb = memnew(CheckBox);
cb->set_text(option);
cb->set_clip_text(true);
- cb->connect("pressed", callable_mp(this, &EditorPropertyFlags::_flag_toggled), varray(i));
+ cb->connect("pressed", callable_mp(this, &EditorPropertyFlags::_flag_toggled).bind(i));
add_focusable(cb);
vbox->add_child(cb);
flags.push_back(cb);
@@ -1236,7 +1236,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
add_child(layers);
layers->set_hide_on_checkable_item_selection(false);
layers->connect("id_pressed", callable_mp(this, &EditorPropertyLayers::_menu_pressed));
- layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed), varray(false));
+ layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed).bind(false));
EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPropertyLayers::_refresh_names));
}
@@ -1755,7 +1755,7 @@ EditorPropertyVector2::EditorPropertyVector2(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector2::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector2::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -1865,7 +1865,7 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
}
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2037,7 +2037,7 @@ EditorPropertyVector3::EditorPropertyVector3(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector3::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector3::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2168,7 +2168,7 @@ EditorPropertyVector2i::EditorPropertyVector2i(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector2i::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector2i::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2278,7 +2278,7 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
}
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2i::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2i::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2420,7 +2420,7 @@ EditorPropertyVector3i::EditorPropertyVector3i(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector3i::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector3i::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2521,7 +2521,7 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyPlane::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyPlane::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2613,7 +2613,7 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2704,7 +2704,7 @@ EditorPropertyVector4::EditorPropertyVector4() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector4::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector4::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2793,7 +2793,7 @@ EditorPropertyVector4i::EditorPropertyVector4i() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector4i::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyVector4i::_value_changed).bind(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2882,7 +2882,7 @@ EditorPropertyAABB::EditorPropertyAABB() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyAABB::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyAABB::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -2973,7 +2973,7 @@ EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {
}
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -3063,7 +3063,7 @@ EditorPropertyBasis::EditorPropertyBasis() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyBasis::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyBasis::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -3161,7 +3161,7 @@ EditorPropertyTransform3D::EditorPropertyTransform3D() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -3267,7 +3267,7 @@ EditorPropertyProjection::EditorPropertyProjection() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyProjection::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyProjection::_value_changed).bind(desc[i]));
}
set_bottom_editor(g);
}
@@ -3336,7 +3336,7 @@ EditorPropertyColor::EditorPropertyColor() {
picker->set_flat(true);
picker->connect("color_changed", callable_mp(this, &EditorPropertyColor::_color_changed));
picker->connect("popup_closed", callable_mp(this, &EditorPropertyColor::_popup_closed));
- picker->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(picker->get_picker()));
+ picker->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(picker->get_picker()));
picker->get_popup()->connect("about_to_popup", callable_mp(this, &EditorPropertyColor::_picker_opening));
}
@@ -3603,7 +3603,10 @@ void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource,
void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource) {
// Make visual script the correct type.
Ref<Script> s = p_resource;
+ bool is_script = false;
if (get_edited_object() && s.is_valid()) {
+ is_script = true;
+ InspectorDock::get_singleton()->store_script_properties(get_edited_object());
s->call("set_instance_base_type", get_edited_object()->get_class());
}
@@ -3629,6 +3632,11 @@ void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource)
emit_changed(get_edited_property(), p_resource);
update_property();
+ if (is_script) {
+ // Restore properties if script was changed.
+ InspectorDock::get_singleton()->apply_script_properties(get_edited_object());
+ }
+
// Automatically suggest setting up the path for a ViewportTexture.
if (vpt.is_valid() && vpt->get_viewport_path_in_scene().is_empty()) {
if (!scene_tree) {
@@ -3910,6 +3918,12 @@ void EditorPropertyResource::expand_all_folding() {
}
}
+void EditorPropertyResource::expand_revertable() {
+ if (sub_inspector) {
+ sub_inspector->expand_revertable();
+ }
+}
+
void EditorPropertyResource::set_use_sub_inspector(bool p_enable) {
use_sub_inspector = p_enable;
}
@@ -4348,11 +4362,11 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
editor->setup(p_object, p_path, p_hint == PROPERTY_HINT_RESOURCE_TYPE ? p_hint_text : "Resource");
if (p_hint == PROPERTY_HINT_RESOURCE_TYPE) {
- String open_in_new = EDITOR_GET("interface/inspector/resources_to_open_in_new_inspector");
- for (int i = 0; i < open_in_new.get_slice_count(","); i++) {
- String type = open_in_new.get_slicec(',', i).strip_edges();
+ const PackedStringArray open_in_new_inspector = EDITOR_GET("interface/inspector/resources_to_open_in_new_inspector");
+
+ for (const String &type : open_in_new_inspector) {
for (int j = 0; j < p_hint_text.get_slice_count(","); j++) {
- String inherits = p_hint_text.get_slicec(',', j);
+ const String inherits = p_hint_text.get_slicec(',', j);
if (ClassDB::is_parent_class(inherits, type)) {
editor->set_use_sub_inspector(false);
}
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index b3aac6e8ca..cfe0c2f38c 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -856,6 +856,7 @@ public:
void collapse_all_folding() override;
void expand_all_folding() override;
+ void expand_revertable() override;
void set_use_sub_inspector(bool p_enable);
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index e83b070f6b..9a83082d1e 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -329,7 +329,7 @@ void EditorPropertyArray::update_property() {
reorder_button->set_icon(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
reorder_button->set_default_cursor_shape(Control::CURSOR_MOVE);
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), varray(i + offset));
+ 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));
hbox->add_child(reorder_button);
@@ -366,11 +366,11 @@ void EditorPropertyArray::update_property() {
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), varray(edit, i + offset));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyArray::_change_type).bind(edit, 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), varray(i + offset));
+ remove->connect("pressed", callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(i + offset));
hbox->add_child(remove);
}
@@ -1136,7 +1136,7 @@ void EditorPropertyDictionary::update_property() {
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), varray(edit, change_index));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit, change_index));
prop->update_property();
@@ -1375,7 +1375,7 @@ void EditorPropertyLocalizableString::update_property() {
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), varray(edit, remove_index));
+ edit->connect("pressed", callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit, remove_index));
prop->update_property();
}
diff --git a/editor/editor_properties_array_dict.h b/editor/editor_properties_array_dict.h
index 44623149d0..82aeebe14a 100644
--- a/editor/editor_properties_array_dict.h
+++ b/editor/editor_properties_array_dict.h
@@ -81,10 +81,7 @@ class EditorPropertyArray : public EditorProperty {
GDCLASS(EditorPropertyArray, EditorProperty);
PopupMenu *change_type = nullptr;
- bool updating = false;
- bool dropping = false;
- Ref<EditorPropertyArrayObject> object;
int page_length = 20;
int page_index = 0;
int changing_type_index;
@@ -106,29 +103,35 @@ class EditorPropertyArray : public EditorProperty {
Button *reorder_selected_button = nullptr;
void _page_changed(int p_page);
- void _length_changed(double p_page);
- void _add_element();
- void _edit_pressed();
- void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false);
- void _change_type(Object *p_button, int p_index);
- void _change_type_menu(int p_index);
-
- void _object_id_selected(const StringName &p_property, ObjectID p_id);
- void _remove_pressed(int p_index);
-
- void _button_draw();
- bool _is_drop_valid(const Dictionary &p_drag_data) const;
- 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 _reorder_button_gui_input(const Ref<InputEvent> &p_event);
void _reorder_button_down(int p_index);
void _reorder_button_up();
protected:
+ Ref<EditorPropertyArrayObject> object;
+
+ bool updating = false;
+ bool dropping = false;
+
static void _bind_methods();
void _notification(int p_what);
+ virtual void _add_element();
+ virtual void _length_changed(double p_page);
+ virtual void _edit_pressed();
+ virtual void _property_changed(const String &p_property, Variant p_value, const String &p_name = "", bool p_changing = false);
+ virtual void _change_type(Object *p_button, int p_index);
+ virtual void _change_type_menu(int p_index);
+
+ virtual void _object_id_selected(const StringName &p_property, ObjectID p_id);
+ virtual void _remove_pressed(int p_index);
+
+ virtual void _button_draw();
+ virtual bool _is_drop_valid(const Dictionary &p_drag_data) const;
+ virtual bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
+ virtual void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
+
public:
void setup(Variant::Type p_array_type, const String &p_hint_string = "");
virtual void update_property() override;
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index e0903ea5ce..d850773a6d 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
+#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/scene_tree_dock.h"
@@ -871,7 +872,7 @@ void EditorResourcePicker::_ensure_resource_menu() {
edit_menu = memnew(PopupMenu);
add_child(edit_menu);
edit_menu->connect("id_pressed", callable_mp(this, &EditorResourcePicker::_edit_menu_cbk));
- edit_menu->connect("popup_hide", callable_mp((BaseButton *)edit_button, &BaseButton::set_pressed), varray(false));
+ edit_menu->connect("popup_hide", callable_mp((BaseButton *)edit_button, &BaseButton::set_pressed).bind(false));
}
EditorResourcePicker::EditorResourcePicker(bool p_hide_assign_button_controls) {
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index b84e654d42..c0ea2b743e 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -195,9 +195,9 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
if (r_texture.is_valid()) {
//wow it generated a preview... save cache
bool has_small_texture = r_small_texture.is_valid();
- ResourceSaver::save(cache_base + ".png", r_texture);
+ ResourceSaver::save(r_texture, cache_base + ".png");
if (has_small_texture) {
- ResourceSaver::save(cache_base + "_small.png", r_small_texture);
+ ResourceSaver::save(r_small_texture, cache_base + "_small.png");
}
Ref<FileAccess> f = FileAccess::open(cache_base + ".txt", FileAccess::WRITE);
ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + cache_base + ".txt'. Check user write permissions.");
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 854885c707..d8b738be17 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -30,9 +30,10 @@
#include "editor_run_native.h"
-#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/export/editor_export_platform.h"
void EditorRunNative::_notification(int p_what) {
switch (p_what) {
@@ -51,8 +52,8 @@ void EditorRunNative::_notification(int p_what) {
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), varray(i));
- mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native), varray(-1, i));
+ 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;
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index c73caa78f3..4846fd6478 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -867,7 +867,6 @@ void EditorSettings::create() {
}
singleton->save_changed_setting = true;
- singleton->config_file_path = config_file_path;
print_verbose("EditorSettings: Load OK!");
@@ -892,8 +891,8 @@ fail:
}
singleton = Ref<EditorSettings>(memnew(EditorSettings));
+ singleton->set_path(config_file_path, true);
singleton->save_changed_setting = true;
- singleton->config_file_path = config_file_path;
singleton->_load_defaults(extra_config);
singleton->setup_language();
singleton->setup_network();
@@ -953,15 +952,10 @@ void EditorSettings::save() {
return;
}
- if (singleton->config_file_path.is_empty()) {
- ERR_PRINT("Cannot save EditorSettings config, no valid path");
- return;
- }
-
- Error err = ResourceSaver::save(singleton->config_file_path, singleton);
+ Error err = ResourceSaver::save(singleton);
if (err != OK) {
- ERR_PRINT("Error saving editor settings to " + singleton->config_file_path);
+ ERR_PRINT("Error saving editor settings to " + singleton->get_path());
} else {
singleton->changed_settings.clear();
print_verbose("EditorSettings: Save OK!");
@@ -1057,6 +1051,8 @@ void EditorSettings::set_initial_value(const StringName &p_setting, const Varian
}
Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_restart_if_changed) {
+ ERR_FAIL_NULL_V_MSG(EditorSettings::get_singleton(), p_default, "EditorSettings not instantiated yet.");
+
Variant ret = p_default;
if (EditorSettings::get_singleton()->has_setting(p_setting)) {
ret = EditorSettings::get_singleton()->get(p_setting);
@@ -1073,7 +1069,7 @@ Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_re
}
Variant _EDITOR_GET(const String &p_setting) {
- ERR_FAIL_COND_V(!EditorSettings::get_singleton()->has_setting(p_setting), Variant());
+ ERR_FAIL_COND_V(!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting), Variant());
return EditorSettings::get_singleton()->get(p_setting);
}
@@ -1103,38 +1099,11 @@ void EditorSettings::add_property_hint(const PropertyInfo &p_hint) {
hints[p_hint.name] = p_hint;
}
-// Editor data and config directories
-// EditorPaths::create() is responsible for the creation of these directories.
-
-String EditorSettings::get_export_templates_dir() const {
- return EditorPaths::get_singleton()->get_data_dir().plus_file("export_templates");
-}
-
-String EditorSettings::get_project_settings_dir() const {
- return EditorPaths::get_singleton()->get_project_data_dir().plus_file("editor");
-}
-
-String EditorSettings::get_text_editor_themes_dir() const {
- return EditorPaths::get_singleton()->get_config_dir().plus_file("text_editor_themes");
-}
-
-String EditorSettings::get_script_templates_dir() const {
- return EditorPaths::get_singleton()->get_config_dir().plus_file("script_templates");
-}
-
-String EditorSettings::get_project_script_templates_dir() const {
- return ProjectSettings::get_singleton()->get("editor/script/templates_search_path");
-}
-
-String EditorSettings::get_feature_profiles_dir() const {
- return EditorPaths::get_singleton()->get_config_dir().plus_file("feature_profiles");
-}
-
// Metadata
void EditorSettings::set_project_metadata(const String &p_section, const String &p_key, Variant p_data) {
Ref<ConfigFile> cf = memnew(ConfigFile);
- String path = get_project_settings_dir().plus_file("project_metadata.cfg");
+ String path = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("project_metadata.cfg");
Error err;
err = cf->load(path);
ERR_FAIL_COND_MSG(err != OK && err != ERR_FILE_NOT_FOUND, "Cannot load editor settings from file '" + path + "'.");
@@ -1145,7 +1114,7 @@ void EditorSettings::set_project_metadata(const String &p_section, const String
Variant EditorSettings::get_project_metadata(const String &p_section, const String &p_key, Variant p_default) const {
Ref<ConfigFile> cf = memnew(ConfigFile);
- String path = get_project_settings_dir().plus_file("project_metadata.cfg");
+ String path = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("project_metadata.cfg");
Error err = cf->load(path);
if (err != OK) {
return p_default;
@@ -1159,7 +1128,7 @@ void EditorSettings::set_favorites(const Vector<String> &p_favorites) {
if (Engine::get_singleton()->is_project_manager_hint()) {
favorites_file = EditorPaths::get_singleton()->get_config_dir().plus_file("favorite_dirs");
} else {
- favorites_file = get_project_settings_dir().plus_file("favorites");
+ favorites_file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("favorites");
}
Ref<FileAccess> f = FileAccess::open(favorites_file, FileAccess::WRITE);
if (f.is_valid()) {
@@ -1179,7 +1148,7 @@ void EditorSettings::set_recent_dirs(const Vector<String> &p_recent_dirs) {
if (Engine::get_singleton()->is_project_manager_hint()) {
recent_dirs_file = EditorPaths::get_singleton()->get_config_dir().plus_file("recent_dirs");
} else {
- recent_dirs_file = get_project_settings_dir().plus_file("recent_dirs");
+ recent_dirs_file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("recent_dirs");
}
Ref<FileAccess> f = FileAccess::open(recent_dirs_file, FileAccess::WRITE);
if (f.is_valid()) {
@@ -1200,8 +1169,8 @@ void EditorSettings::load_favorites_and_recent_dirs() {
favorites_file = EditorPaths::get_singleton()->get_config_dir().plus_file("favorite_dirs");
recent_dirs_file = EditorPaths::get_singleton()->get_config_dir().plus_file("recent_dirs");
} else {
- favorites_file = get_project_settings_dir().plus_file("favorites");
- recent_dirs_file = get_project_settings_dir().plus_file("recent_dirs");
+ favorites_file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("favorites");
+ recent_dirs_file = EditorPaths::get_singleton()->get_project_settings_dir().plus_file("recent_dirs");
}
Ref<FileAccess> f = FileAccess::open(favorites_file, FileAccess::READ);
if (f.is_valid()) {
@@ -1233,7 +1202,7 @@ bool EditorSettings::is_dark_theme() {
void EditorSettings::list_text_editor_themes() {
String themes = "Default,Godot 2,Custom";
- Ref<DirAccess> d = DirAccess::open(get_text_editor_themes_dir());
+ Ref<DirAccess> d = DirAccess::open(EditorPaths::get_singleton()->get_text_editor_themes_dir());
if (d.is_valid()) {
List<String> custom_themes;
d->list_dir_begin();
@@ -1264,7 +1233,7 @@ void EditorSettings::load_text_editor_theme() {
return; // sorry for "Settings changed" console spam
}
- String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
+ String theme_path = EditorPaths::get_singleton()->get_text_editor_themes_dir().plus_file(p_file + ".tet");
Ref<ConfigFile> cf = memnew(ConfigFile);
Error err = cf->load(theme_path);
@@ -1299,9 +1268,9 @@ bool EditorSettings::import_text_editor_theme(String p_file) {
return false;
}
- Ref<DirAccess> d = DirAccess::open(get_text_editor_themes_dir());
+ Ref<DirAccess> d = DirAccess::open(EditorPaths::get_singleton()->get_text_editor_themes_dir());
if (d.is_valid()) {
- d->copy(p_file, get_text_editor_themes_dir().plus_file(p_file.get_file()));
+ d->copy(p_file, EditorPaths::get_singleton()->get_text_editor_themes_dir().plus_file(p_file.get_file()));
return true;
}
}
@@ -1314,7 +1283,7 @@ bool EditorSettings::save_text_editor_theme() {
if (_is_default_text_editor_theme(p_file.get_file().to_lower())) {
return false;
}
- String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
+ String theme_path = EditorPaths::get_singleton()->get_text_editor_themes_dir().plus_file(p_file + ".tet");
return _save_text_editor_theme(theme_path);
}
@@ -1331,7 +1300,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
list_text_editor_themes();
String theme_name = p_file.substr(0, p_file.length() - 4).get_file();
- if (p_file.get_base_dir() == get_text_editor_themes_dir()) {
+ if (p_file.get_base_dir() == EditorPaths::get_singleton()->get_text_editor_themes_dir()) {
_initial_set("text_editor/theme/color_theme", theme_name);
load_text_editor_theme();
}
@@ -1347,7 +1316,7 @@ bool EditorSettings::is_default_text_editor_theme() {
Vector<String> EditorSettings::get_script_templates(const String &p_extension, const String &p_custom_path) {
Vector<String> templates;
- String template_dir = get_script_templates_dir();
+ String template_dir = EditorPaths::get_singleton()->get_script_templates_dir();
if (!p_custom_path.is_empty()) {
template_dir = p_custom_path;
}
@@ -1455,9 +1424,7 @@ void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
}
Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path) {
- if (!EditorSettings::get_singleton()) {
- return nullptr;
- }
+ ERR_FAIL_NULL_V_MSG(EditorSettings::get_singleton(), nullptr, "EditorSettings not instantiated yet.");
Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
@@ -1467,6 +1434,8 @@ Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path) {
}
void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_keycode) {
+ ERR_FAIL_NULL_MSG(EditorSettings::get_singleton(), "EditorSettings not instantiated yet.");
+
Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path + ".");
@@ -1477,6 +1446,8 @@ void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_k
}
void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, const PackedInt32Array &p_keycodes) {
+ ERR_FAIL_NULL_MSG(EditorSettings::get_singleton(), "EditorSettings not instantiated yet.");
+
Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE_ARRAY with invalid shortcut: " + p_path + ".");
@@ -1654,8 +1625,6 @@ void EditorSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &EditorSettings::property_get_revert);
ClassDB::bind_method(D_METHOD("add_property_info", "info"), &EditorSettings::_add_property_info_bind);
- ClassDB::bind_method(D_METHOD("get_project_settings_dir"), &EditorSettings::get_project_settings_dir);
-
ClassDB::bind_method(D_METHOD("set_project_metadata", "section", "key", "data"), &EditorSettings::set_project_metadata);
ClassDB::bind_method(D_METHOD("get_project_metadata", "section", "key", "default"), &EditorSettings::get_project_metadata, DEFVAL(Variant()));
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 56c73685bb..5faeec88c8 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -88,8 +88,6 @@ private:
mutable HashMap<String, Ref<Shortcut>> shortcuts;
HashMap<String, List<Ref<InputEvent>>> builtin_action_overrides;
- String config_file_path;
-
Vector<String> favorites;
Vector<String> recent_dirs;
@@ -150,14 +148,6 @@ public:
void set_resource_clipboard(const Ref<Resource> &p_resource) { clipboard = p_resource; }
Ref<Resource> get_resource_clipboard() const { return clipboard; }
- String get_data_dir() const;
- String get_export_templates_dir() const;
- String get_project_settings_dir() const;
- String get_text_editor_themes_dir() const;
- String get_script_templates_dir() const;
- String get_project_script_templates_dir() const;
- String get_feature_profiles_dir() const;
-
void set_project_metadata(const String &p_section, const String &p_key, Variant p_data);
Variant get_project_metadata(const String &p_section, const String &p_key, Variant p_default) const;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 5d60baf202..da7105c94c 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1669,17 +1669,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color alpha2 = Color(mono_value, mono_value, mono_value, 0.14);
const Color alpha3 = Color(mono_value, mono_value, mono_value, 0.27);
- // editor main color
- const Color main_color = dark_theme ? Color(0.34, 0.7, 1.0) : Color(0.02, 0.5, 1.0);
-
- const Color symbol_color = Color(0.34, 0.57, 1.0).lerp(mono_color, dark_theme ? 0.5 : 0.3);
- const Color keyword_color = Color(1.0, 0.44, 0.52);
- const Color control_flow_keyword_color = dark_theme ? Color(1.0, 0.55, 0.8) : Color(0.8, 0.4, 0.6);
- const Color basetype_color = dark_theme ? Color(0.26, 1.0, 0.76) : Color(0.0, 0.76, 0.38);
- const Color type_color = basetype_color.lerp(mono_color, dark_theme ? 0.4 : 0.3);
- const Color usertype_color = basetype_color.lerp(mono_color, dark_theme ? 0.7 : 0.5);
- const Color comment_color = dim_color;
- const Color string_color = (dark_theme ? Color(1.0, 0.85, 0.26) : Color(1.0, 0.82, 0.09)).lerp(mono_color, dark_theme ? 0.5 : 0.3);
+ const Color symbol_color = dark_theme ? Color(0.67, 0.79, 1) : Color(0, 0, 0.61);
+ const Color keyword_color = dark_theme ? Color(1.0, 0.44, 0.52) : Color(0.9, 0.135, 0.51);
+ const Color control_flow_keyword_color = dark_theme ? Color(1.0, 0.55, 0.8) : Color(0.743, 0.12, 0.8);
+ const Color base_type_color = dark_theme ? Color(0.26, 1.0, 0.76) : Color(0, 0.6, 0.2);
+ const Color engine_type_color = dark_theme ? Color(0.56, 1, 0.86) : Color(0.11, 0.55, 0.4);
+ const Color user_type_color = dark_theme ? Color(0.78, 1, 0.93) : Color(0.18, 0.45, 0.4);
+ const Color comment_color = dark_theme ? dim_color : Color(0.08, 0.08, 0.08, 0.5);
+ const Color string_color = dark_theme ? Color(1, 0.93, 0.63) : Color(0.6, 0.42, 0);
// Use the brightest background color on a light theme (which generally uses a negative contrast rate).
const Color te_background_color = dark_theme ? background_color : dark_color_3;
@@ -1692,24 +1689,24 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color completion_font_color = font_color;
const Color text_color = font_color;
const Color line_number_color = dim_color;
- const Color safe_line_number_color = dim_color * Color(1, 1.2, 1, 1.5);
+ 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 brace_mismatch_color = error_color;
+ 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;
const Color word_highlighted_color = alpha1;
- const Color number_color = basetype_color.lerp(mono_color, dark_theme ? 0.5 : 0.3);
- const Color function_color = main_color;
- const Color member_variable_color = main_color.lerp(mono_color, 0.6);
+ const Color number_color = dark_theme ? Color(0.63, 1, 0.88) : Color(0, 0.55, 0.28, 1);
+ const Color function_color = dark_theme ? Color(0.34, 0.7, 1.0) : Color(0, 0.225, 0.9, 1);
+ const Color member_variable_color = dark_theme ? Color(0.34, 0.7, 1.0).lerp(mono_color, 0.6) : Color(0, 0.4, 0.68, 1);
const Color mark_color = Color(error_color.r, error_color.g, error_color.b, 0.3);
const Color bookmark_color = Color(0.08, 0.49, 0.98);
- const Color breakpoint_color = error_color;
+ const Color breakpoint_color = dark_theme ? error_color : Color(1, 0.27, 0.2, 1);
const Color executing_line_color = Color(0.98, 0.89, 0.27);
const Color code_folding_color = alpha3;
const Color search_result_color = alpha1;
- const Color search_result_border_color = Color(0.41, 0.61, 0.91, 0.38);
+ const Color search_result_border_color = dark_theme ? Color(0.41, 0.61, 0.91, 0.38) : Color(0, 0.4, 1, 0.38);
EditorSettings *setting = EditorSettings::get_singleton();
String text_editor_color_theme = setting->get("text_editor/theme/color_theme");
@@ -1717,9 +1714,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
setting->set_initial_value("text_editor/theme/highlighting/symbol_color", symbol_color, true);
setting->set_initial_value("text_editor/theme/highlighting/keyword_color", keyword_color, true);
setting->set_initial_value("text_editor/theme/highlighting/control_flow_keyword_color", control_flow_keyword_color, true);
- setting->set_initial_value("text_editor/theme/highlighting/base_type_color", basetype_color, true);
- setting->set_initial_value("text_editor/theme/highlighting/engine_type_color", type_color, true);
- setting->set_initial_value("text_editor/theme/highlighting/user_type_color", usertype_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/base_type_color", base_type_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/engine_type_color", engine_type_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/user_type_color", user_type_color, true);
setting->set_initial_value("text_editor/theme/highlighting/comment_color", comment_color, true);
setting->set_initial_value("text_editor/theme/highlighting/string_color", string_color, true);
setting->set_initial_value("text_editor/theme/highlighting/background_color", te_background_color, true);
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index 4986bccc35..050cde6069 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -356,7 +356,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
break;
}
panel->set_modulate(Color(1, 1, 1, 0));
- panel->connect("draw", callable_bind(callable_mp(this, &EditorToaster::_draw_progress), panel));
+ panel->connect("draw", callable_mp(this, &EditorToaster::_draw_progress).bind(panel));
// Horizontal container.
HBoxContainer *hbox_container = memnew(HBoxContainer);
@@ -372,8 +372,8 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
Button *close_button = memnew(Button);
close_button->set_flat(true);
close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
- close_button->connect("pressed", callable_bind(callable_mp(this, &EditorToaster::close), panel));
- close_button->connect("theme_changed", callable_bind(callable_mp(this, &EditorToaster::_close_button_theme_changed), close_button));
+ close_button->connect("pressed", callable_mp(this, &EditorToaster::close).bind(panel));
+ close_button->connect("theme_changed", callable_mp(this, &EditorToaster::_close_button_theme_changed).bind(close_button));
hbox_container->add_child(close_button);
}
@@ -522,7 +522,7 @@ EditorToaster::EditorToaster() {
main_button->set_modulate(Color(0.5, 0.5, 0.5));
main_button->set_disabled(true);
main_button->set_flat(true);
- main_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled), varray(true));
+ main_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(true));
main_button->connect("pressed", callable_mp(this, &EditorToaster::_repop_old));
main_button->connect("draw", callable_mp(this, &EditorToaster::_draw_button));
add_child(main_button);
@@ -536,7 +536,7 @@ EditorToaster::EditorToaster() {
disable_notifications_button = memnew(Button);
disable_notifications_button->set_tooltip(TTR("Silence the notifications."));
disable_notifications_button->set_flat(true);
- disable_notifications_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled), varray(false));
+ disable_notifications_button->connect("pressed", callable_mp(this, &EditorToaster::_set_notifications_enabled).bind(false));
disable_notifications_panel->add_child(disable_notifications_button);
// Other
diff --git a/editor/export/SCsub b/editor/export/SCsub
new file mode 100644
index 0000000000..359d04e5df
--- /dev/null
+++ b/editor/export/SCsub
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+
+Import("env")
+
+env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp
new file mode 100644
index 0000000000..31f408eedb
--- /dev/null
+++ b/editor/export/editor_export.cpp
@@ -0,0 +1,355 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#include "editor_export.h"
+
+#include "core/config/project_settings.h"
+#include "core/io/config_file.h"
+
+EditorExport *EditorExport::singleton = nullptr;
+
+void EditorExport::_save() {
+ Ref<ConfigFile> config;
+ config.instantiate();
+ for (int i = 0; i < export_presets.size(); i++) {
+ Ref<EditorExportPreset> preset = export_presets[i];
+ String section = "preset." + itos(i);
+
+ config->set_value(section, "name", preset->get_name());
+ config->set_value(section, "platform", preset->get_platform()->get_name());
+ config->set_value(section, "runnable", preset->is_runnable());
+ config->set_value(section, "custom_features", preset->get_custom_features());
+
+ bool save_files = false;
+ switch (preset->get_export_filter()) {
+ case EditorExportPreset::EXPORT_ALL_RESOURCES: {
+ config->set_value(section, "export_filter", "all_resources");
+ } break;
+ case EditorExportPreset::EXPORT_SELECTED_SCENES: {
+ config->set_value(section, "export_filter", "scenes");
+ save_files = true;
+ } break;
+ case EditorExportPreset::EXPORT_SELECTED_RESOURCES: {
+ config->set_value(section, "export_filter", "resources");
+ save_files = true;
+ } break;
+ case EditorExportPreset::EXCLUDE_SELECTED_RESOURCES: {
+ config->set_value(section, "export_filter", "exclude");
+ save_files = true;
+ } break;
+ }
+
+ if (save_files) {
+ Vector<String> export_files = preset->get_files_to_export();
+ config->set_value(section, "export_files", export_files);
+ }
+ config->set_value(section, "include_filter", preset->get_include_filter());
+ config->set_value(section, "exclude_filter", preset->get_exclude_filter());
+ config->set_value(section, "export_path", preset->get_export_path());
+ config->set_value(section, "encryption_include_filters", preset->get_enc_in_filter());
+ 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";
+
+ for (const PropertyInfo &E : preset->get_properties()) {
+ config->set_value(option_section, E.name, preset->get(E.name));
+ }
+ }
+
+ config->save("res://export_presets.cfg");
+}
+
+void EditorExport::save_presets() {
+ if (block_save) {
+ return;
+ }
+ save_timer->start();
+}
+
+void EditorExport::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("export_presets_updated"));
+}
+
+void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
+ export_platforms.push_back(p_platform);
+}
+
+int EditorExport::get_export_platform_count() {
+ return export_platforms.size();
+}
+
+Ref<EditorExportPlatform> EditorExport::get_export_platform(int p_idx) {
+ ERR_FAIL_INDEX_V(p_idx, export_platforms.size(), Ref<EditorExportPlatform>());
+
+ return export_platforms[p_idx];
+}
+
+void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos) {
+ if (p_at_pos < 0) {
+ export_presets.push_back(p_preset);
+ } else {
+ export_presets.insert(p_at_pos, p_preset);
+ }
+}
+
+String EditorExportPlatform::test_etc2() const {
+ const bool etc2_supported = ProjectSettings::get_singleton()->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.");
+ }
+
+ return String();
+}
+
+int EditorExport::get_export_preset_count() const {
+ return export_presets.size();
+}
+
+Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
+ ERR_FAIL_INDEX_V(p_idx, export_presets.size(), Ref<EditorExportPreset>());
+ return export_presets[p_idx];
+}
+
+void EditorExport::remove_export_preset(int p_idx) {
+ export_presets.remove_at(p_idx);
+ save_presets();
+}
+
+void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
+ if (!export_plugins.has(p_plugin)) {
+ export_plugins.push_back(p_plugin);
+ }
+}
+
+void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
+ export_plugins.erase(p_plugin);
+}
+
+Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() {
+ return export_plugins;
+}
+
+void EditorExport::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ load_config();
+ } break;
+
+ case NOTIFICATION_PROCESS: {
+ update_export_presets();
+ } break;
+ }
+}
+
+void EditorExport::load_config() {
+ Ref<ConfigFile> config;
+ config.instantiate();
+ Error err = config->load("res://export_presets.cfg");
+ if (err != OK) {
+ return;
+ }
+
+ block_save = true;
+
+ int index = 0;
+ while (true) {
+ String section = "preset." + itos(index);
+ if (!config->has_section(section)) {
+ break;
+ }
+
+ String platform = config->get_value(section, "platform");
+
+ Ref<EditorExportPreset> preset;
+
+ for (int i = 0; i < export_platforms.size(); i++) {
+ if (export_platforms[i]->get_name() == platform) {
+ preset = export_platforms.write[i]->create_preset();
+ break;
+ }
+ }
+
+ if (!preset.is_valid()) {
+ index++;
+ ERR_CONTINUE(!preset.is_valid());
+ }
+
+ preset->set_name(config->get_value(section, "name"));
+ preset->set_runnable(config->get_value(section, "runnable"));
+
+ if (config->has_section_key(section, "custom_features")) {
+ preset->set_custom_features(config->get_value(section, "custom_features"));
+ }
+
+ String export_filter = config->get_value(section, "export_filter");
+
+ bool get_files = false;
+
+ if (export_filter == "all_resources") {
+ preset->set_export_filter(EditorExportPreset::EXPORT_ALL_RESOURCES);
+ } else if (export_filter == "scenes") {
+ preset->set_export_filter(EditorExportPreset::EXPORT_SELECTED_SCENES);
+ get_files = true;
+ } else if (export_filter == "resources") {
+ preset->set_export_filter(EditorExportPreset::EXPORT_SELECTED_RESOURCES);
+ get_files = true;
+ } else if (export_filter == "exclude") {
+ preset->set_export_filter(EditorExportPreset::EXCLUDE_SELECTED_RESOURCES);
+ get_files = true;
+ }
+
+ if (get_files) {
+ Vector<String> files = config->get_value(section, "export_files");
+
+ for (int i = 0; i < files.size(); i++) {
+ if (!FileAccess::exists(files[i])) {
+ preset->remove_export_file(files[i]);
+ } else {
+ preset->add_export_file(files[i]);
+ }
+ }
+ }
+
+ preset->set_include_filter(config->get_value(section, "include_filter"));
+ preset->set_exclude_filter(config->get_value(section, "exclude_filter"));
+ preset->set_export_path(config->get_value(section, "export_path", ""));
+
+ if (config->has_section_key(section, "encrypt_pck")) {
+ preset->set_enc_pck(config->get_value(section, "encrypt_pck"));
+ }
+ if (config->has_section_key(section, "encrypt_directory")) {
+ preset->set_enc_directory(config->get_value(section, "encrypt_directory"));
+ }
+ if (config->has_section_key(section, "encryption_include_filters")) {
+ preset->set_enc_in_filter(config->get_value(section, "encryption_include_filters"));
+ }
+ 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"));
+ }
+
+ String option_section = "preset." + itos(index) + ".options";
+
+ List<String> options;
+
+ config->get_section_keys(option_section, &options);
+
+ for (const String &E : options) {
+ Variant value = config->get_value(option_section, E);
+
+ preset->set(E, value);
+ }
+
+ add_export_preset(preset);
+ index++;
+ }
+
+ block_save = false;
+}
+
+void EditorExport::update_export_presets() {
+ HashMap<StringName, List<EditorExportPlatform::ExportOption>> platform_options;
+
+ for (int i = 0; i < export_platforms.size(); i++) {
+ Ref<EditorExportPlatform> platform = export_platforms[i];
+
+ if (platform->should_update_export_options()) {
+ List<EditorExportPlatform::ExportOption> options;
+ platform->get_export_options(&options);
+
+ platform_options[platform->get_name()] = options;
+ }
+ }
+
+ bool export_presets_updated = false;
+ for (int i = 0; i < export_presets.size(); i++) {
+ Ref<EditorExportPreset> preset = export_presets[i];
+ if (platform_options.has(preset->get_platform()->get_name())) {
+ export_presets_updated = true;
+
+ List<EditorExportPlatform::ExportOption> options = platform_options[preset->get_platform()->get_name()];
+
+ // Copy the previous preset values
+ HashMap<StringName, Variant> previous_values = preset->values;
+
+ // Clear the preset properties and values prior to reloading
+ preset->properties.clear();
+ preset->values.clear();
+
+ for (const EditorExportPlatform::ExportOption &E : options) {
+ preset->properties.push_back(E.option);
+
+ StringName option_name = E.option.name;
+ preset->values[option_name] = previous_values.has(option_name) ? previous_values[option_name] : E.default_value;
+ }
+ }
+ }
+
+ if (export_presets_updated) {
+ emit_signal(_export_presets_updated);
+ }
+}
+
+bool EditorExport::poll_export_platforms() {
+ bool changed = false;
+ for (int i = 0; i < export_platforms.size(); i++) {
+ if (export_platforms.write[i]->poll_export()) {
+ changed = true;
+ }
+ }
+
+ return changed;
+}
+
+EditorExport::EditorExport() {
+ save_timer = memnew(Timer);
+ add_child(save_timer);
+ save_timer->set_wait_time(0.8);
+ save_timer->set_one_shot(true);
+ save_timer->connect("timeout", callable_mp(this, &EditorExport::_save));
+
+ _export_presets_updated = "export_presets_updated";
+
+ singleton = this;
+ set_process(true);
+}
+
+EditorExport::~EditorExport() {
+}
diff --git a/editor/export/editor_export.h b/editor/export/editor_export.h
new file mode 100644
index 0000000000..13c3c34cea
--- /dev/null
+++ b/editor/export/editor_export.h
@@ -0,0 +1,84 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_H
+#define EDITOR_EXPORT_H
+
+#include "editor_export_platform.h"
+#include "editor_export_plugin.h"
+
+class EditorExport : public Node {
+ GDCLASS(EditorExport, Node);
+
+ Vector<Ref<EditorExportPlatform>> export_platforms;
+ Vector<Ref<EditorExportPreset>> export_presets;
+ Vector<Ref<EditorExportPlugin>> export_plugins;
+
+ StringName _export_presets_updated;
+
+ Timer *save_timer = nullptr;
+ bool block_save = false;
+
+ static EditorExport *singleton;
+
+ void _save();
+
+protected:
+ friend class EditorExportPreset;
+ void save_presets();
+
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ static EditorExport *get_singleton() { return singleton; }
+
+ void add_export_platform(const Ref<EditorExportPlatform> &p_platform);
+ int get_export_platform_count();
+ Ref<EditorExportPlatform> get_export_platform(int p_idx);
+
+ void add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos = -1);
+ int get_export_preset_count() const;
+ Ref<EditorExportPreset> get_export_preset(int p_idx);
+ void remove_export_preset(int p_idx);
+
+ void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
+ void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
+ Vector<Ref<EditorExportPlugin>> get_export_plugins();
+
+ void load_config();
+ void update_export_presets();
+ bool poll_export_platforms();
+
+ EditorExport();
+ ~EditorExport();
+};
+
+#endif // EDITOR_EXPORT_H
diff --git a/editor/editor_export.cpp b/editor/export/editor_export_platform.cpp
index b09339ce3a..34b407779e 100644
--- a/editor/editor_export.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* editor_export.cpp */
+/* editor_export_platform.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,20 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "editor_export.h"
+#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/io/config_file.h"
-#include "core/io/dir_access.h"
-#include "core/io/file_access.h"
#include "core/io/file_access_encrypted.h"
#include "core/io/file_access_pack.h" // PACK_HEADER_MAGIC, PACK_FORMAT_VERSION
-#include "core/io/resource_loader.h"
-#include "core/io/resource_saver.h"
#include "core/io/zip_io.h"
-#include "core/object/script_language.h"
#include "core/version.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
@@ -49,7 +43,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "scene/resources/resource_format_text.h"
+#include "editor_export_plugin.h"
static int _get_pad(int p_alignment, int p_n) {
int rest = p_n % p_alignment;
@@ -63,196 +57,6 @@ static int _get_pad(int p_alignment, int p_n) {
#define PCK_PADDING 16
-bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value) {
- if (values.has(p_name)) {
- values[p_name] = p_value;
- EditorExport::singleton->save_presets();
- return true;
- }
-
- return false;
-}
-
-bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
- if (values.has(p_name)) {
- r_ret = values[p_name];
- return true;
- }
-
- return false;
-}
-
-void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
- for (const PropertyInfo &E : properties) {
- if (platform->get_export_option_visibility(E.name, values)) {
- p_list->push_back(E);
- }
- }
-}
-
-Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
- return platform;
-}
-
-void EditorExportPreset::update_files_to_export() {
- Vector<String> to_remove;
- for (const String &E : selected_files) {
- if (!FileAccess::exists(E)) {
- to_remove.push_back(E);
- }
- }
- for (int i = 0; i < to_remove.size(); ++i) {
- selected_files.erase(to_remove[i]);
- }
-}
-
-Vector<String> EditorExportPreset::get_files_to_export() const {
- Vector<String> files;
- for (const String &E : selected_files) {
- files.push_back(E);
- }
- return files;
-}
-
-void EditorExportPreset::set_name(const String &p_name) {
- name = p_name;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_name() const {
- return name;
-}
-
-void EditorExportPreset::set_runnable(bool p_enable) {
- runnable = p_enable;
- EditorExport::singleton->save_presets();
-}
-
-bool EditorExportPreset::is_runnable() const {
- return runnable;
-}
-
-void EditorExportPreset::set_export_filter(ExportFilter p_filter) {
- export_filter = p_filter;
- EditorExport::singleton->save_presets();
-}
-
-EditorExportPreset::ExportFilter EditorExportPreset::get_export_filter() const {
- return export_filter;
-}
-
-void EditorExportPreset::set_include_filter(const String &p_include) {
- include_filter = p_include;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_include_filter() const {
- return include_filter;
-}
-
-void EditorExportPreset::set_export_path(const String &p_path) {
- export_path = p_path;
- /* NOTE(SonerSound): if there is a need to implement a PropertyHint that specifically indicates a relative path,
- * this should be removed. */
- if (export_path.is_absolute_path()) {
- String res_path = OS::get_singleton()->get_resource_dir();
- export_path = res_path.path_to_file(export_path);
- }
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_export_path() const {
- return export_path;
-}
-
-void EditorExportPreset::set_exclude_filter(const String &p_exclude) {
- exclude_filter = p_exclude;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_exclude_filter() const {
- return exclude_filter;
-}
-
-void EditorExportPreset::add_export_file(const String &p_path) {
- selected_files.insert(p_path);
- EditorExport::singleton->save_presets();
-}
-
-void EditorExportPreset::remove_export_file(const String &p_path) {
- selected_files.erase(p_path);
- EditorExport::singleton->save_presets();
-}
-
-bool EditorExportPreset::has_export_file(const String &p_path) {
- return selected_files.has(p_path);
-}
-
-void EditorExportPreset::set_custom_features(const String &p_custom_features) {
- custom_features = p_custom_features;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_custom_features() const {
- return custom_features;
-}
-
-void EditorExportPreset::set_enc_in_filter(const String &p_filter) {
- enc_in_filters = p_filter;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_enc_in_filter() const {
- return enc_in_filters;
-}
-
-void EditorExportPreset::set_enc_ex_filter(const String &p_filter) {
- enc_ex_filters = p_filter;
- EditorExport::singleton->save_presets();
-}
-
-String EditorExportPreset::get_enc_ex_filter() const {
- return enc_ex_filters;
-}
-
-void EditorExportPreset::set_enc_pck(bool p_enabled) {
- enc_pck = p_enabled;
- EditorExport::singleton->save_presets();
-}
-
-bool EditorExportPreset::get_enc_pck() const {
- return enc_pck;
-}
-
-void EditorExportPreset::set_enc_directory(bool p_enabled) {
- enc_directory = p_enabled;
- EditorExport::singleton->save_presets();
-}
-
-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();
-}
-
-String EditorExportPreset::get_script_encryption_key() const {
- return script_key;
-}
-
-///////////////////////////////////
-
bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err) {
bool has_messages = false;
@@ -267,12 +71,12 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
if (get_worst_message_type() >= EditorExportPlatform::EXPORT_MESSAGE_WARNING) {
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("StatusWarning"), 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 with errors."));
+ p_log->add_text(TTR("Completed with warnings."));
has_messages = true;
} 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 successfully."));
+ p_log->add_text(TTR("Completed sucessfully."));
if (msg_count > 0) {
has_messages = true;
}
@@ -491,7 +295,7 @@ Ref<ImageTexture> EditorExportPlatform::get_option_icon(int p_index) const {
String EditorExportPlatform::find_export_template(String template_file_name, String *err) const {
String current_version = VERSION_FULL_CONFIG;
- String template_path = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(current_version).plus_file(template_file_name);
+ String template_path = EditorPaths::get_singleton()->get_export_templates_dir().plus_file(current_version).plus_file(template_file_name);
if (FileAccess::exists(template_path)) {
return template_path;
@@ -625,139 +429,7 @@ void EditorExportPlatform::_edit_filter_list(HashSet<String> &r_list, const Stri
_edit_files_with_filter(da, filters, r_list, exclude);
}
-void EditorExportPlugin::set_export_preset(const Ref<EditorExportPreset> &p_preset) {
- if (p_preset.is_valid()) {
- export_preset = p_preset;
- }
-}
-
-Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
- return export_preset;
-}
-
-void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
- ExtraFile ef;
- ef.data = p_file;
- ef.path = p_path;
- ef.remap = p_remap;
- extra_files.push_back(ef);
-}
-
-void EditorExportPlugin::add_shared_object(const String &p_path, const Vector<String> &p_tags, const String &p_target) {
- shared_objects.push_back(SharedObject(p_path, p_tags, p_target));
-}
-
-void EditorExportPlugin::add_ios_framework(const String &p_path) {
- ios_frameworks.push_back(p_path);
-}
-
-void EditorExportPlugin::add_ios_embedded_framework(const String &p_path) {
- ios_embedded_frameworks.push_back(p_path);
-}
-
-Vector<String> EditorExportPlugin::get_ios_frameworks() const {
- return ios_frameworks;
-}
-
-Vector<String> EditorExportPlugin::get_ios_embedded_frameworks() const {
- return ios_embedded_frameworks;
-}
-
-void EditorExportPlugin::add_ios_plist_content(const String &p_plist_content) {
- ios_plist_content += p_plist_content + "\n";
-}
-
-String EditorExportPlugin::get_ios_plist_content() const {
- return ios_plist_content;
-}
-
-void EditorExportPlugin::add_ios_linker_flags(const String &p_flags) {
- if (ios_linker_flags.length() > 0) {
- ios_linker_flags += ' ';
- }
- ios_linker_flags += p_flags;
-}
-
-String EditorExportPlugin::get_ios_linker_flags() const {
- return ios_linker_flags;
-}
-
-void EditorExportPlugin::add_ios_bundle_file(const String &p_path) {
- ios_bundle_files.push_back(p_path);
-}
-
-Vector<String> EditorExportPlugin::get_ios_bundle_files() const {
- return ios_bundle_files;
-}
-
-void EditorExportPlugin::add_ios_cpp_code(const String &p_code) {
- ios_cpp_code += p_code;
-}
-
-String EditorExportPlugin::get_ios_cpp_code() const {
- return ios_cpp_code;
-}
-
-void EditorExportPlugin::add_macos_plugin_file(const String &p_path) {
- macos_plugin_files.push_back(p_path);
-}
-
-const Vector<String> &EditorExportPlugin::get_macos_plugin_files() const {
- return macos_plugin_files;
-}
-
-void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
- ios_project_static_libs.push_back(p_path);
-}
-
-Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
- return ios_project_static_libs;
-}
-
-void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
- GDVIRTUAL_CALL(_export_file, p_path, p_type, p_features);
-}
-
-void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
- GDVIRTUAL_CALL(_export_begin, p_features, p_debug, p_path, p_flags);
-}
-
-void EditorExportPlugin::_export_end_script() {
- GDVIRTUAL_CALL(_export_end);
-}
-
-void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
-}
-
-void EditorExportPlugin::_export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
-}
-
-void EditorExportPlugin::skip() {
- skipped = true;
-}
-
-void EditorExportPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_shared_object", "path", "tags", "target"), &EditorExportPlugin::add_shared_object);
- ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
- ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
- ClassDB::bind_method(D_METHOD("add_ios_framework", "path"), &EditorExportPlugin::add_ios_framework);
- ClassDB::bind_method(D_METHOD("add_ios_embedded_framework", "path"), &EditorExportPlugin::add_ios_embedded_framework);
- ClassDB::bind_method(D_METHOD("add_ios_plist_content", "plist_content"), &EditorExportPlugin::add_ios_plist_content);
- ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
- ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
- ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
- ClassDB::bind_method(D_METHOD("add_macos_plugin_file", "path"), &EditorExportPlugin::add_macos_plugin_file);
- ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
-
- GDVIRTUAL_BIND(_export_file, "path", "type", "features");
- GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
- GDVIRTUAL_BIND(_export_end);
-}
-
-EditorExportPlugin::EditorExportPlugin() {
-}
-
-EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) {
+EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const {
Ref<EditorExportPlatform> platform = p_preset->get_platform();
List<String> feature_list;
platform->get_platform_features(&feature_list);
@@ -1504,573 +1176,3 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
EditorExportPlatform::EditorExportPlatform() {
}
-
-////
-
-EditorExport *EditorExport::singleton = nullptr;
-
-void EditorExport::_save() {
- Ref<ConfigFile> config;
- config.instantiate();
- for (int i = 0; i < export_presets.size(); i++) {
- Ref<EditorExportPreset> preset = export_presets[i];
- String section = "preset." + itos(i);
-
- config->set_value(section, "name", preset->get_name());
- config->set_value(section, "platform", preset->get_platform()->get_name());
- config->set_value(section, "runnable", preset->is_runnable());
- config->set_value(section, "custom_features", preset->get_custom_features());
-
- bool save_files = false;
- switch (preset->get_export_filter()) {
- case EditorExportPreset::EXPORT_ALL_RESOURCES: {
- config->set_value(section, "export_filter", "all_resources");
- } break;
- case EditorExportPreset::EXPORT_SELECTED_SCENES: {
- config->set_value(section, "export_filter", "scenes");
- save_files = true;
- } break;
- case EditorExportPreset::EXPORT_SELECTED_RESOURCES: {
- config->set_value(section, "export_filter", "resources");
- save_files = true;
- } break;
- case EditorExportPreset::EXCLUDE_SELECTED_RESOURCES: {
- config->set_value(section, "export_filter", "exclude");
- save_files = true;
- } break;
- }
-
- if (save_files) {
- Vector<String> export_files = preset->get_files_to_export();
- config->set_value(section, "export_files", export_files);
- }
- config->set_value(section, "include_filter", preset->get_include_filter());
- config->set_value(section, "exclude_filter", preset->get_exclude_filter());
- config->set_value(section, "export_path", preset->get_export_path());
- config->set_value(section, "encryption_include_filters", preset->get_enc_in_filter());
- 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";
-
- for (const PropertyInfo &E : preset->get_properties()) {
- config->set_value(option_section, E.name, preset->get(E.name));
- }
- }
-
- config->save("res://export_presets.cfg");
-}
-
-void EditorExport::save_presets() {
- if (block_save) {
- return;
- }
- save_timer->start();
-}
-
-void EditorExport::_bind_methods() {
- ADD_SIGNAL(MethodInfo("export_presets_updated"));
-}
-
-void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
- export_platforms.push_back(p_platform);
-}
-
-int EditorExport::get_export_platform_count() {
- return export_platforms.size();
-}
-
-Ref<EditorExportPlatform> EditorExport::get_export_platform(int p_idx) {
- ERR_FAIL_INDEX_V(p_idx, export_platforms.size(), Ref<EditorExportPlatform>());
-
- return export_platforms[p_idx];
-}
-
-void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos) {
- if (p_at_pos < 0) {
- export_presets.push_back(p_preset);
- } else {
- export_presets.insert(p_at_pos, p_preset);
- }
-}
-
-String EditorExportPlatform::test_etc2() const {
- const bool etc2_supported = ProjectSettings::get_singleton()->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.");
- }
-
- return String();
-}
-
-int EditorExport::get_export_preset_count() const {
- return export_presets.size();
-}
-
-Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
- ERR_FAIL_INDEX_V(p_idx, export_presets.size(), Ref<EditorExportPreset>());
- return export_presets[p_idx];
-}
-
-void EditorExport::remove_export_preset(int p_idx) {
- export_presets.remove_at(p_idx);
- save_presets();
-}
-
-void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
- if (!export_plugins.has(p_plugin)) {
- export_plugins.push_back(p_plugin);
- }
-}
-
-void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
- export_plugins.erase(p_plugin);
-}
-
-Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() {
- return export_plugins;
-}
-
-void EditorExport::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
- load_config();
- } break;
-
- case NOTIFICATION_PROCESS: {
- update_export_presets();
- } break;
- }
-}
-
-void EditorExport::load_config() {
- Ref<ConfigFile> config;
- config.instantiate();
- Error err = config->load("res://export_presets.cfg");
- if (err != OK) {
- return;
- }
-
- block_save = true;
-
- int index = 0;
- while (true) {
- String section = "preset." + itos(index);
- if (!config->has_section(section)) {
- break;
- }
-
- String platform = config->get_value(section, "platform");
-
- Ref<EditorExportPreset> preset;
-
- for (int i = 0; i < export_platforms.size(); i++) {
- if (export_platforms[i]->get_name() == platform) {
- preset = export_platforms.write[i]->create_preset();
- break;
- }
- }
-
- if (!preset.is_valid()) {
- index++;
- ERR_CONTINUE(!preset.is_valid());
- }
-
- preset->set_name(config->get_value(section, "name"));
- preset->set_runnable(config->get_value(section, "runnable"));
-
- if (config->has_section_key(section, "custom_features")) {
- preset->set_custom_features(config->get_value(section, "custom_features"));
- }
-
- String export_filter = config->get_value(section, "export_filter");
-
- bool get_files = false;
-
- if (export_filter == "all_resources") {
- preset->set_export_filter(EditorExportPreset::EXPORT_ALL_RESOURCES);
- } else if (export_filter == "scenes") {
- preset->set_export_filter(EditorExportPreset::EXPORT_SELECTED_SCENES);
- get_files = true;
- } else if (export_filter == "resources") {
- preset->set_export_filter(EditorExportPreset::EXPORT_SELECTED_RESOURCES);
- get_files = true;
- } else if (export_filter == "exclude") {
- preset->set_export_filter(EditorExportPreset::EXCLUDE_SELECTED_RESOURCES);
- get_files = true;
- }
-
- if (get_files) {
- Vector<String> files = config->get_value(section, "export_files");
-
- for (int i = 0; i < files.size(); i++) {
- if (!FileAccess::exists(files[i])) {
- preset->remove_export_file(files[i]);
- } else {
- preset->add_export_file(files[i]);
- }
- }
- }
-
- preset->set_include_filter(config->get_value(section, "include_filter"));
- preset->set_exclude_filter(config->get_value(section, "exclude_filter"));
- preset->set_export_path(config->get_value(section, "export_path", ""));
-
- if (config->has_section_key(section, "encrypt_pck")) {
- preset->set_enc_pck(config->get_value(section, "encrypt_pck"));
- }
- if (config->has_section_key(section, "encrypt_directory")) {
- preset->set_enc_directory(config->get_value(section, "encrypt_directory"));
- }
- if (config->has_section_key(section, "encryption_include_filters")) {
- preset->set_enc_in_filter(config->get_value(section, "encryption_include_filters"));
- }
- 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"));
- }
-
- String option_section = "preset." + itos(index) + ".options";
-
- List<String> options;
-
- config->get_section_keys(option_section, &options);
-
- for (const String &E : options) {
- Variant value = config->get_value(option_section, E);
-
- preset->set(E, value);
- }
-
- add_export_preset(preset);
- index++;
- }
-
- block_save = false;
-}
-
-void EditorExport::update_export_presets() {
- HashMap<StringName, List<EditorExportPlatform::ExportOption>> platform_options;
-
- for (int i = 0; i < export_platforms.size(); i++) {
- Ref<EditorExportPlatform> platform = export_platforms[i];
-
- if (platform->should_update_export_options()) {
- List<EditorExportPlatform::ExportOption> options;
- platform->get_export_options(&options);
-
- platform_options[platform->get_name()] = options;
- }
- }
-
- bool export_presets_updated = false;
- for (int i = 0; i < export_presets.size(); i++) {
- Ref<EditorExportPreset> preset = export_presets[i];
- if (platform_options.has(preset->get_platform()->get_name())) {
- export_presets_updated = true;
-
- List<EditorExportPlatform::ExportOption> options = platform_options[preset->get_platform()->get_name()];
-
- // Copy the previous preset values
- HashMap<StringName, Variant> previous_values = preset->values;
-
- // Clear the preset properties and values prior to reloading
- preset->properties.clear();
- preset->values.clear();
-
- for (const EditorExportPlatform::ExportOption &E : options) {
- preset->properties.push_back(E.option);
-
- StringName option_name = E.option.name;
- preset->values[option_name] = previous_values.has(option_name) ? previous_values[option_name] : E.default_value;
- }
- }
- }
-
- if (export_presets_updated) {
- emit_signal(_export_presets_updated);
- }
-}
-
-bool EditorExport::poll_export_platforms() {
- bool changed = false;
- for (int i = 0; i < export_platforms.size(); i++) {
- if (export_platforms.write[i]->poll_export()) {
- changed = true;
- }
- }
-
- return changed;
-}
-
-EditorExport::EditorExport() {
- save_timer = memnew(Timer);
- add_child(save_timer);
- save_timer->set_wait_time(0.8);
- save_timer->set_one_shot(true);
- save_timer->connect("timeout", callable_mp(this, &EditorExport::_save));
-
- _export_presets_updated = "export_presets_updated";
-
- singleton = this;
- set_process(true);
-}
-
-EditorExport::~EditorExport() {
-}
-
-//////////
-
-void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- if (p_preset->get("texture_format/s3tc")) {
- r_features->push_back("s3tc");
- }
- if (p_preset->get("texture_format/etc")) {
- r_features->push_back("etc");
- }
- if (p_preset->get("texture_format/etc2")) {
- r_features->push_back("etc2");
- }
-
- if (p_preset->get("binary_format/64_bits")) {
- r_features->push_back("64");
- } else {
- r_features->push_back("32");
- }
-}
-
-void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
- String ext_filter = (get_os_name() == "Windows") ? "*.exe" : "";
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/64_bits"), true));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/embed_pck"), false));
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/no_bptc_fallbacks"), true));
-}
-
-String EditorExportPlatformPC::get_name() const {
- return name;
-}
-
-String EditorExportPlatformPC::get_os_name() const {
- return os_name;
-}
-
-Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
- return logo;
-}
-
-bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
- String err;
- bool valid = false;
-
- // Look for export templates (first official, and if defined custom templates).
-
- bool use64 = p_preset->get("binary_format/64_bits");
- bool dvalid = exists_export_template(get_template_file_name("debug", use64 ? "x86_64" : "x86_32"), &err);
- bool rvalid = exists_export_template(get_template_file_name("release", use64 ? "x86_64" : "x86_32"), &err);
-
- if (p_preset->get("custom_template/debug") != "") {
- dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
- if (!dvalid) {
- err += TTR("Custom debug template not found.") + "\n";
- }
- }
- if (p_preset->get("custom_template/release") != "") {
- rvalid = FileAccess::exists(p_preset->get("custom_template/release"));
- if (!rvalid) {
- err += TTR("Custom release template not found.") + "\n";
- }
- }
-
- valid = dvalid || rvalid;
- r_missing_templates = !valid;
-
- if (!err.is_empty()) {
- r_error = err;
- }
- return valid;
-}
-
-Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
- ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
-
- Error err = prepare_template(p_preset, p_debug, p_path, p_flags);
- if (err == OK) {
- err = modify_template(p_preset, p_debug, p_path, p_flags);
- }
- if (err == OK) {
- err = export_project_data(p_preset, p_debug, p_path, p_flags);
- }
-
- return err;
-}
-
-Error EditorExportPlatformPC::prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
- if (!DirAccess::exists(p_path.get_base_dir())) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("The given export path doesn't exist."));
- return ERR_FILE_BAD_PATH;
- }
-
- String custom_debug = p_preset->get("custom_template/debug");
- String custom_release = p_preset->get("custom_template/release");
-
- String template_path = p_debug ? custom_debug : custom_release;
-
- template_path = template_path.strip_edges();
-
- if (template_path.is_empty()) {
- template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", p_preset->get("binary_format/64_bits") ? "64" : "32"));
- }
-
- if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), vformat(TTR("Template file not found: \"%s\"."), template_path));
- return ERR_FILE_NOT_FOUND;
- }
-
- 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) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("Failed to copy export template."));
- }
-
- return err;
-}
-
-Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
- String pck_path;
- if (p_preset->get("binary_format/embed_pck")) {
- pck_path = p_path;
- } else {
- pck_path = p_path.get_basename() + ".pck";
- }
-
- Vector<SharedObject> so_files;
-
- int64_t embedded_pos;
- int64_t embedded_size;
- Error err = save_pack(p_preset, p_debug, pck_path, &so_files, p_preset->get("binary_format/embed_pck"), &embedded_pos, &embedded_size);
- if (err == OK && p_preset->get("binary_format/embed_pck")) {
- if (embedded_size >= 0x100000000 && !p_preset->get("binary_format/64_bits")) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."));
- return ERR_INVALID_PARAMETER;
- }
-
- err = fixup_embedded_pck(p_path, embedded_pos, embedded_size);
- }
-
- if (err == OK && !so_files.is_empty()) {
- // If shared object files, copy them.
- Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- for (int i = 0; i < so_files.size() && err == OK; i++) {
- 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().plus_file(src_path.get_file());
- } else {
- target_path = p_path.get_base_dir().plus_file(so_files[i].target).plus_file(src_path.get_file());
- }
-
- if (da->dir_exists(src_path)) {
- err = da->make_dir_recursive(target_path);
- if (err == OK) {
- err = da->copy_dir(src_path, target_path, -1, true);
- }
- } else {
- err = da->copy(src_path, target_path);
- if (err == OK) {
- err = sign_shared_object(p_preset, p_debug, target_path);
- }
- }
- }
- }
-
- return err;
-}
-
-Error EditorExportPlatformPC::sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
- return OK;
-}
-
-void EditorExportPlatformPC::set_name(const String &p_name) {
- name = p_name;
-}
-
-void EditorExportPlatformPC::set_os_name(const String &p_name) {
- os_name = p_name;
-}
-
-void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
- logo = p_logo;
-}
-
-void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
- r_features->push_back("pc"); //all pcs support "pc"
- r_features->push_back("s3tc"); //all pcs support "s3tc" compression
- r_features->push_back(get_os_name().to_lower()); //OS name is a feature
-}
-
-void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) {
- if (p_features.has("bptc")) {
- if (p_preset->has("texture_format/no_bptc_fallbacks")) {
- p_features.erase("s3tc");
- }
- }
-}
-
-int EditorExportPlatformPC::get_chmod_flags() const {
- return chmod_flags;
-}
-
-void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
- chmod_flags = p_flags;
-}
-
-///////////////////////
-
-void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
- String extension = p_path.get_extension().to_lower();
- if (extension != "tres" && extension != "tscn") {
- return;
- }
-
- bool convert = GLOBAL_GET("editor/export/convert_text_resources_to_binary");
- if (!convert) {
- return;
- }
- String tmp_path = EditorPaths::get_singleton()->get_cache_dir().plus_file("tmpfile.res");
- Error err = ResourceFormatLoaderText::convert_file_to_binary(p_path, tmp_path);
- if (err != OK) {
- DirAccess::remove_file_or_error(tmp_path);
- ERR_FAIL();
- }
- Vector<uint8_t> data = FileAccess::get_file_as_array(tmp_path);
- if (data.size() == 0) {
- DirAccess::remove_file_or_error(tmp_path);
- ERR_FAIL();
- }
- DirAccess::remove_file_or_error(tmp_path);
- add_file(p_path + ".converted.res", data, true);
-}
-
-EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() {
- GLOBAL_DEF("editor/export/convert_text_resources_to_binary", false);
-}
diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h
new file mode 100644
index 0000000000..832a0cf846
--- /dev/null
+++ b/editor/export/editor_export_platform.h
@@ -0,0 +1,221 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_PLATFORM_H
+#define EDITOR_EXPORT_PLATFORM_H
+
+class EditorFileSystemDirectory;
+struct EditorProgress;
+
+#include "core/io/dir_access.h"
+#include "editor_export_preset.h"
+#include "editor_export_shared_object.h"
+#include "scene/gui/rich_text_label.h"
+#include "scene/main/node.h"
+
+class EditorExportPlatform : public RefCounted {
+ GDCLASS(EditorExportPlatform, RefCounted);
+
+public:
+ typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
+ typedef Error (*EditorExportSaveSharedObject)(void *p_userdata, const SharedObject &p_so);
+
+ enum ExportMessageType {
+ EXPORT_MESSAGE_NONE,
+ EXPORT_MESSAGE_INFO,
+ EXPORT_MESSAGE_WARNING,
+ EXPORT_MESSAGE_ERROR,
+ };
+
+ struct ExportMessage {
+ ExportMessageType msg_type;
+ String category;
+ String text;
+ };
+
+private:
+ struct SavedData {
+ uint64_t ofs = 0;
+ uint64_t size = 0;
+ bool encrypted = false;
+ Vector<uint8_t> md5;
+ CharString path_utf8;
+
+ bool operator<(const SavedData &p_data) const {
+ return path_utf8 < p_data.path_utf8;
+ }
+ };
+
+ struct PackData {
+ Ref<FileAccess> f;
+ Vector<SavedData> file_ofs;
+ EditorProgress *ep = nullptr;
+ Vector<SharedObject> *so_files = nullptr;
+ };
+
+ struct ZipData {
+ void *zip = nullptr;
+ EditorProgress *ep = nullptr;
+ };
+
+ struct FeatureContainers {
+ HashSet<String> features;
+ Vector<String> features_pv;
+ };
+
+ Vector<ExportMessage> messages;
+
+ 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);
+
+ void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, HashSet<String> &r_list, bool exclude);
+ void _edit_filter_list(HashSet<String> &r_list, const String &p_filter, bool exclude);
+
+ static Error _add_shared_object(void *p_userdata, const SharedObject &p_so);
+
+protected:
+ struct ExportNotifier {
+ ExportNotifier(EditorExportPlatform &p_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
+ ~ExportNotifier();
+ };
+
+ FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const;
+
+ 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);
+
+public:
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const = 0;
+
+ struct ExportOption {
+ PropertyInfo option;
+ Variant default_value;
+
+ ExportOption(const PropertyInfo &p_info, const Variant &p_default) :
+ option(p_info),
+ default_value(p_default) {
+ }
+ ExportOption() {}
+ };
+
+ virtual Ref<EditorExportPreset> create_preset();
+
+ virtual void clear_messages() { messages.clear(); }
+ virtual void add_message(ExportMessageType p_type, const String &p_category, const String &p_message) {
+ ExportMessage msg;
+ msg.category = p_category;
+ msg.text = p_message;
+ msg.msg_type = p_type;
+ messages.push_back(msg);
+ switch (p_type) {
+ case EXPORT_MESSAGE_INFO: {
+ print_line(vformat("%s: %s\n", msg.category, msg.text));
+ } break;
+ case EXPORT_MESSAGE_WARNING: {
+ WARN_PRINT(vformat("%s: %s\n", msg.category, msg.text));
+ } break;
+ case EXPORT_MESSAGE_ERROR: {
+ ERR_PRINT(vformat("%s: %s\n", msg.category, msg.text));
+ } break;
+ default:
+ break;
+ }
+ }
+
+ virtual int get_message_count() const {
+ return messages.size();
+ }
+
+ virtual ExportMessage get_message(int p_index) const {
+ ERR_FAIL_INDEX_V(p_index, messages.size(), ExportMessage());
+ return messages[p_index];
+ }
+
+ virtual ExportMessageType get_worst_message_type() const {
+ ExportMessageType worst_type = EXPORT_MESSAGE_NONE;
+ for (int i = 0; i < messages.size(); i++) {
+ worst_type = MAX(worst_type, messages[i].msg_type);
+ }
+ return worst_type;
+ }
+
+ virtual bool fill_log_messages(RichTextLabel *p_log, Error p_err);
+
+ virtual void get_export_options(List<ExportOption> *r_options) = 0;
+ virtual bool should_update_export_options() { return false; }
+ virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const { return true; }
+
+ virtual String get_os_name() const = 0;
+ virtual String get_name() const = 0;
+ virtual Ref<Texture2D> get_logo() const = 0;
+
+ Error export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func = nullptr);
+
+ Error save_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, Vector<SharedObject> *p_so_files = nullptr, bool p_embed = false, int64_t *r_embedded_start = nullptr, int64_t *r_embedded_size = nullptr);
+ Error save_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
+
+ virtual bool poll_export() { return false; }
+ virtual int get_options_count() const { return 0; }
+ virtual String get_options_tooltip() const { return ""; }
+ virtual Ref<ImageTexture> get_option_icon(int p_index) const;
+ virtual String get_option_label(int p_device) const { return ""; }
+ virtual String get_option_tooltip(int p_device) const { return ""; }
+
+ enum DebugFlags {
+ DEBUG_FLAG_DUMB_CLIENT = 1,
+ DEBUG_FLAG_REMOTE_DEBUG = 2,
+ DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST = 4,
+ DEBUG_FLAG_VIEW_COLLISONS = 8,
+ DEBUG_FLAG_VIEW_NAVIGATION = 16,
+ };
+
+ virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, int p_debug_flags) { return OK; }
+ virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
+
+ String test_etc2() const;
+ virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
+
+ virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0;
+ virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) = 0;
+ virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
+ virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
+ virtual void get_platform_features(List<String> *r_features) const = 0;
+ virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) = 0;
+ virtual String get_debug_protocol() const { return "tcp://"; }
+
+ EditorExportPlatform();
+};
+
+#endif // EDITOR_EXPORT_PLATFORM_H
diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp
new file mode 100644
index 0000000000..5e0044f2ae
--- /dev/null
+++ b/editor/export/editor_export_platform_pc.cpp
@@ -0,0 +1,242 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#include "editor_export_platform_pc.h"
+
+#include "core/config/project_settings.h"
+
+void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
+ if (p_preset->get("texture_format/s3tc")) {
+ r_features->push_back("s3tc");
+ }
+ if (p_preset->get("texture_format/etc")) {
+ r_features->push_back("etc");
+ }
+ if (p_preset->get("texture_format/etc2")) {
+ r_features->push_back("etc2");
+ }
+ // PC platforms only have one architecture per export, since
+ // we export a single executable instead of a bundle.
+ r_features->push_back(p_preset->get("binary_format/architecture"));
+}
+
+void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
+ String ext_filter = (get_os_name() == "Windows") ? "*.exe" : "";
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/embed_pck"), false));
+
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/no_bptc_fallbacks"), true));
+}
+
+String EditorExportPlatformPC::get_name() const {
+ return name;
+}
+
+String EditorExportPlatformPC::get_os_name() const {
+ return os_name;
+}
+
+Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
+ return logo;
+}
+
+bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
+ String err;
+ bool valid = false;
+
+ // Look for export templates (first official, and if defined custom templates).
+ String arch = p_preset->get("binary_format/architecture");
+ bool dvalid = exists_export_template(get_template_file_name("debug", arch), &err);
+ bool rvalid = exists_export_template(get_template_file_name("release", arch), &err);
+
+ if (p_preset->get("custom_template/debug") != "") {
+ dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
+ if (!dvalid) {
+ err += TTR("Custom debug template not found.") + "\n";
+ }
+ }
+ if (p_preset->get("custom_template/release") != "") {
+ rvalid = FileAccess::exists(p_preset->get("custom_template/release"));
+ if (!rvalid) {
+ err += TTR("Custom release template not found.") + "\n";
+ }
+ }
+
+ valid = dvalid || rvalid;
+ r_missing_templates = !valid;
+
+ if (!err.is_empty()) {
+ r_error = err;
+ }
+ return valid;
+}
+
+Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
+ ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
+
+ Error err = prepare_template(p_preset, p_debug, p_path, p_flags);
+ if (err == OK) {
+ err = modify_template(p_preset, p_debug, p_path, p_flags);
+ }
+ if (err == OK) {
+ err = export_project_data(p_preset, p_debug, p_path, p_flags);
+ }
+
+ return err;
+}
+
+Error EditorExportPlatformPC::prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
+ if (!DirAccess::exists(p_path.get_base_dir())) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("The given export path doesn't exist."));
+ return ERR_FILE_BAD_PATH;
+ }
+
+ String custom_debug = p_preset->get("custom_template/debug");
+ String custom_release = p_preset->get("custom_template/release");
+
+ String template_path = p_debug ? custom_debug : custom_release;
+
+ template_path = template_path.strip_edges();
+
+ if (template_path.is_empty()) {
+ template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", p_preset->get("binary_format/architecture")));
+ }
+
+ if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), vformat(TTR("Template file not found: \"%s\"."), template_path));
+ return ERR_FILE_NOT_FOUND;
+ }
+
+ 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) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("Failed to copy export template."));
+ }
+
+ return err;
+}
+
+Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
+ String pck_path;
+ if (p_preset->get("binary_format/embed_pck")) {
+ pck_path = p_path;
+ } else {
+ pck_path = p_path.get_basename() + ".pck";
+ }
+
+ Vector<SharedObject> so_files;
+
+ int64_t embedded_pos;
+ int64_t embedded_size;
+ Error err = save_pack(p_preset, p_debug, pck_path, &so_files, p_preset->get("binary_format/embed_pck"), &embedded_pos, &embedded_size);
+ if (err == OK && p_preset->get("binary_format/embed_pck")) {
+ if (embedded_size >= 0x100000000 && String(p_preset->get("binary_format/architecture")).contains("32")) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."));
+ return ERR_INVALID_PARAMETER;
+ }
+
+ err = fixup_embedded_pck(p_path, embedded_pos, embedded_size);
+ }
+
+ if (err == OK && !so_files.is_empty()) {
+ // If shared object files, copy them.
+ Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ for (int i = 0; i < so_files.size() && err == OK; i++) {
+ 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().plus_file(src_path.get_file());
+ } else {
+ target_path = p_path.get_base_dir().plus_file(so_files[i].target).plus_file(src_path.get_file());
+ }
+
+ if (da->dir_exists(src_path)) {
+ err = da->make_dir_recursive(target_path);
+ if (err == OK) {
+ err = da->copy_dir(src_path, target_path, -1, true);
+ }
+ } else {
+ err = da->copy(src_path, target_path);
+ if (err == OK) {
+ err = sign_shared_object(p_preset, p_debug, target_path);
+ }
+ }
+ }
+ }
+
+ return err;
+}
+
+Error EditorExportPlatformPC::sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
+ return OK;
+}
+
+void EditorExportPlatformPC::set_name(const String &p_name) {
+ name = p_name;
+}
+
+void EditorExportPlatformPC::set_os_name(const String &p_name) {
+ os_name = p_name;
+}
+
+void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
+ logo = p_logo;
+}
+
+void EditorExportPlatformPC::get_platform_features(List<String> *r_features) const {
+ r_features->push_back("pc"); //all pcs support "pc"
+ r_features->push_back("s3tc"); //all pcs support "s3tc" compression
+ r_features->push_back(get_os_name().to_lower()); //OS name is a feature
+}
+
+void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) {
+ if (p_features.has("bptc")) {
+ if (p_preset->has("texture_format/no_bptc_fallbacks")) {
+ p_features.erase("s3tc");
+ }
+ }
+}
+
+int EditorExportPlatformPC::get_chmod_flags() const {
+ return chmod_flags;
+}
+
+void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
+ chmod_flags = p_flags;
+}
diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h
new file mode 100644
index 0000000000..bdb86e924a
--- /dev/null
+++ b/editor/export/editor_export_platform_pc.h
@@ -0,0 +1,82 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_PLATFORM_PC_H
+#define EDITOR_EXPORT_PLATFORM_PC_H
+
+#include "editor_export_platform.h"
+
+class EditorExportPlatformPC : public EditorExportPlatform {
+ GDCLASS(EditorExportPlatformPC, EditorExportPlatform);
+
+private:
+ Ref<ImageTexture> logo;
+ String name;
+ String os_name;
+
+ int chmod_flags = -1;
+
+public:
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
+
+ virtual void get_export_options(List<ExportOption> *r_options) override;
+
+ virtual String get_name() const override;
+ virtual String get_os_name() const override;
+ virtual Ref<Texture2D> get_logo() const override;
+
+ virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
+ virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
+ virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
+ virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0;
+
+ virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
+ 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);
+
+ void set_logo(const Ref<Texture2D> &p_logo);
+
+ void add_platform_feature(const String &p_feature);
+ virtual void get_platform_features(List<String> *r_features) const override;
+ virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
+
+ int get_chmod_flags() const;
+ void set_chmod_flags(int p_flags);
+
+ virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
+ return Error::OK;
+ }
+};
+
+#endif // EDITOR_EXPORT_PLATFORM_PC_H
diff --git a/editor/export/editor_export_plugin.cpp b/editor/export/editor_export_plugin.cpp
new file mode 100644
index 0000000000..cf3a9b0810
--- /dev/null
+++ b/editor/export/editor_export_plugin.cpp
@@ -0,0 +1,201 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#include "editor_export_plugin.h"
+
+#include "core/config/project_settings.h"
+#include "core/io/dir_access.h"
+#include "core/io/file_access.h"
+#include "editor/editor_paths.h"
+#include "editor/export/editor_export_platform.h"
+#include "scene/resources/resource_format_text.h"
+
+void EditorExportPlugin::set_export_preset(const Ref<EditorExportPreset> &p_preset) {
+ if (p_preset.is_valid()) {
+ export_preset = p_preset;
+ }
+}
+
+Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
+ return export_preset;
+}
+
+void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
+ ExtraFile ef;
+ ef.data = p_file;
+ ef.path = p_path;
+ ef.remap = p_remap;
+ extra_files.push_back(ef);
+}
+
+void EditorExportPlugin::add_shared_object(const String &p_path, const Vector<String> &p_tags, const String &p_target) {
+ shared_objects.push_back(SharedObject(p_path, p_tags, p_target));
+}
+
+void EditorExportPlugin::add_ios_framework(const String &p_path) {
+ ios_frameworks.push_back(p_path);
+}
+
+void EditorExportPlugin::add_ios_embedded_framework(const String &p_path) {
+ ios_embedded_frameworks.push_back(p_path);
+}
+
+Vector<String> EditorExportPlugin::get_ios_frameworks() const {
+ return ios_frameworks;
+}
+
+Vector<String> EditorExportPlugin::get_ios_embedded_frameworks() const {
+ return ios_embedded_frameworks;
+}
+
+void EditorExportPlugin::add_ios_plist_content(const String &p_plist_content) {
+ ios_plist_content += p_plist_content + "\n";
+}
+
+String EditorExportPlugin::get_ios_plist_content() const {
+ return ios_plist_content;
+}
+
+void EditorExportPlugin::add_ios_linker_flags(const String &p_flags) {
+ if (ios_linker_flags.length() > 0) {
+ ios_linker_flags += ' ';
+ }
+ ios_linker_flags += p_flags;
+}
+
+String EditorExportPlugin::get_ios_linker_flags() const {
+ return ios_linker_flags;
+}
+
+void EditorExportPlugin::add_ios_bundle_file(const String &p_path) {
+ ios_bundle_files.push_back(p_path);
+}
+
+Vector<String> EditorExportPlugin::get_ios_bundle_files() const {
+ return ios_bundle_files;
+}
+
+void EditorExportPlugin::add_ios_cpp_code(const String &p_code) {
+ ios_cpp_code += p_code;
+}
+
+String EditorExportPlugin::get_ios_cpp_code() const {
+ return ios_cpp_code;
+}
+
+void EditorExportPlugin::add_macos_plugin_file(const String &p_path) {
+ macos_plugin_files.push_back(p_path);
+}
+
+const Vector<String> &EditorExportPlugin::get_macos_plugin_files() const {
+ return macos_plugin_files;
+}
+
+void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
+ ios_project_static_libs.push_back(p_path);
+}
+
+Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
+ return ios_project_static_libs;
+}
+
+void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
+ GDVIRTUAL_CALL(_export_file, p_path, p_type, p_features);
+}
+
+void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
+ GDVIRTUAL_CALL(_export_begin, p_features, p_debug, p_path, p_flags);
+}
+
+void EditorExportPlugin::_export_end_script() {
+ GDVIRTUAL_CALL(_export_end);
+}
+
+void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
+}
+
+void EditorExportPlugin::_export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
+}
+
+void EditorExportPlugin::skip() {
+ skipped = true;
+}
+
+void EditorExportPlugin::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("add_shared_object", "path", "tags", "target"), &EditorExportPlugin::add_shared_object);
+ ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
+ ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
+ ClassDB::bind_method(D_METHOD("add_ios_framework", "path"), &EditorExportPlugin::add_ios_framework);
+ ClassDB::bind_method(D_METHOD("add_ios_embedded_framework", "path"), &EditorExportPlugin::add_ios_embedded_framework);
+ ClassDB::bind_method(D_METHOD("add_ios_plist_content", "plist_content"), &EditorExportPlugin::add_ios_plist_content);
+ ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
+ ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
+ ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
+ ClassDB::bind_method(D_METHOD("add_macos_plugin_file", "path"), &EditorExportPlugin::add_macos_plugin_file);
+ ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
+
+ GDVIRTUAL_BIND(_export_file, "path", "type", "features");
+ GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
+ GDVIRTUAL_BIND(_export_end);
+}
+
+EditorExportPlugin::EditorExportPlugin() {
+}
+
+///////////////////////
+
+void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
+ String extension = p_path.get_extension().to_lower();
+ if (extension != "tres" && extension != "tscn") {
+ return;
+ }
+
+ bool convert = GLOBAL_GET("editor/export/convert_text_resources_to_binary");
+ if (!convert) {
+ return;
+ }
+ String tmp_path = EditorPaths::get_singleton()->get_cache_dir().plus_file("tmpfile.res");
+ Error err = ResourceFormatLoaderText::convert_file_to_binary(p_path, tmp_path);
+ if (err != OK) {
+ DirAccess::remove_file_or_error(tmp_path);
+ ERR_FAIL();
+ }
+ Vector<uint8_t> data = FileAccess::get_file_as_array(tmp_path);
+ if (data.size() == 0) {
+ DirAccess::remove_file_or_error(tmp_path);
+ ERR_FAIL();
+ }
+ DirAccess::remove_file_or_error(tmp_path);
+ add_file(p_path + ".converted.res", data, true);
+}
+
+EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() {
+ GLOBAL_DEF("editor/export/convert_text_resources_to_binary", false);
+}
diff --git a/editor/export/editor_export_plugin.h b/editor/export/editor_export_plugin.h
new file mode 100644
index 0000000000..04ebc1dfed
--- /dev/null
+++ b/editor/export/editor_export_plugin.h
@@ -0,0 +1,132 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_PLUGIN_H
+#define EDITOR_EXPORT_PLUGIN_H
+
+#include "core/extension/native_extension.h"
+#include "editor_export_preset.h"
+#include "editor_export_shared_object.h"
+
+class EditorExportPlugin : public RefCounted {
+ GDCLASS(EditorExportPlugin, RefCounted);
+
+ friend class EditorExportPlatform;
+
+ Ref<EditorExportPreset> export_preset;
+
+ Vector<SharedObject> shared_objects;
+ struct ExtraFile {
+ String path;
+ Vector<uint8_t> data;
+ bool remap = false;
+ };
+ Vector<ExtraFile> extra_files;
+ bool skipped = false;
+
+ Vector<String> ios_frameworks;
+ Vector<String> ios_embedded_frameworks;
+ Vector<String> ios_project_static_libs;
+ String ios_plist_content;
+ String ios_linker_flags;
+ Vector<String> ios_bundle_files;
+ String ios_cpp_code;
+
+ Vector<String> macos_plugin_files;
+
+ _FORCE_INLINE_ void _clear() {
+ shared_objects.clear();
+ extra_files.clear();
+ skipped = false;
+ }
+
+ _FORCE_INLINE_ void _export_end() {
+ ios_frameworks.clear();
+ ios_embedded_frameworks.clear();
+ ios_bundle_files.clear();
+ ios_plist_content = "";
+ ios_linker_flags = "";
+ ios_cpp_code = "";
+ macos_plugin_files.clear();
+ }
+
+ void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
+ void _export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags);
+ void _export_end_script();
+
+protected:
+ void set_export_preset(const Ref<EditorExportPreset> &p_preset);
+ Ref<EditorExportPreset> get_export_preset() const;
+
+ void add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap);
+ void add_shared_object(const String &p_path, const Vector<String> &tags, const String &p_target = String());
+
+ void add_ios_framework(const String &p_path);
+ void add_ios_embedded_framework(const String &p_path);
+ void add_ios_project_static_lib(const String &p_path);
+ void add_ios_plist_content(const String &p_plist_content);
+ void add_ios_linker_flags(const String &p_flags);
+ void add_ios_bundle_file(const String &p_path);
+ void add_ios_cpp_code(const String &p_code);
+ void add_macos_plugin_file(const String &p_path);
+
+ void skip();
+
+ virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features);
+ virtual void _export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags);
+
+ static void _bind_methods();
+
+ GDVIRTUAL3(_export_file, String, String, Vector<String>)
+ GDVIRTUAL4(_export_begin, Vector<String>, bool, String, uint32_t)
+ GDVIRTUAL0(_export_end)
+
+public:
+ Vector<String> get_ios_frameworks() const;
+ Vector<String> get_ios_embedded_frameworks() const;
+ Vector<String> get_ios_project_static_libs() const;
+ String get_ios_plist_content() const;
+ String get_ios_linker_flags() const;
+ Vector<String> get_ios_bundle_files() const;
+ String get_ios_cpp_code() const;
+ const Vector<String> &get_macos_plugin_files() const;
+
+ EditorExportPlugin();
+};
+
+class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin {
+ GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin);
+
+public:
+ virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) override;
+ EditorExportTextSceneToBinaryPlugin();
+};
+
+#endif // EDITOR_EXPORT_PLUGIN_H
diff --git a/editor/export/editor_export_preset.cpp b/editor/export/editor_export_preset.cpp
new file mode 100644
index 0000000000..cdf69e727d
--- /dev/null
+++ b/editor/export/editor_export_preset.cpp
@@ -0,0 +1,221 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#include "editor_export.h"
+
+bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value) {
+ if (values.has(p_name)) {
+ values[p_name] = p_value;
+ EditorExport::singleton->save_presets();
+ return true;
+ }
+
+ return false;
+}
+
+bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
+ if (values.has(p_name)) {
+ r_ret = values[p_name];
+ return true;
+ }
+
+ return false;
+}
+
+void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
+ for (const PropertyInfo &E : properties) {
+ if (platform->get_export_option_visibility(E.name, values)) {
+ p_list->push_back(E);
+ }
+ }
+}
+
+Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
+ return platform;
+}
+
+void EditorExportPreset::update_files_to_export() {
+ Vector<String> to_remove;
+ for (const String &E : selected_files) {
+ if (!FileAccess::exists(E)) {
+ to_remove.push_back(E);
+ }
+ }
+ for (int i = 0; i < to_remove.size(); ++i) {
+ selected_files.erase(to_remove[i]);
+ }
+}
+
+Vector<String> EditorExportPreset::get_files_to_export() const {
+ Vector<String> files;
+ for (const String &E : selected_files) {
+ files.push_back(E);
+ }
+ return files;
+}
+
+void EditorExportPreset::set_name(const String &p_name) {
+ name = p_name;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_name() const {
+ return name;
+}
+
+void EditorExportPreset::set_runnable(bool p_enable) {
+ runnable = p_enable;
+ EditorExport::singleton->save_presets();
+}
+
+bool EditorExportPreset::is_runnable() const {
+ return runnable;
+}
+
+void EditorExportPreset::set_export_filter(ExportFilter p_filter) {
+ export_filter = p_filter;
+ EditorExport::singleton->save_presets();
+}
+
+EditorExportPreset::ExportFilter EditorExportPreset::get_export_filter() const {
+ return export_filter;
+}
+
+void EditorExportPreset::set_include_filter(const String &p_include) {
+ include_filter = p_include;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_include_filter() const {
+ return include_filter;
+}
+
+void EditorExportPreset::set_export_path(const String &p_path) {
+ export_path = p_path;
+ /* NOTE(SonerSound): if there is a need to implement a PropertyHint that specifically indicates a relative path,
+ * this should be removed. */
+ if (export_path.is_absolute_path()) {
+ String res_path = OS::get_singleton()->get_resource_dir();
+ export_path = res_path.path_to_file(export_path);
+ }
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_export_path() const {
+ return export_path;
+}
+
+void EditorExportPreset::set_exclude_filter(const String &p_exclude) {
+ exclude_filter = p_exclude;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_exclude_filter() const {
+ return exclude_filter;
+}
+
+void EditorExportPreset::add_export_file(const String &p_path) {
+ selected_files.insert(p_path);
+ EditorExport::singleton->save_presets();
+}
+
+void EditorExportPreset::remove_export_file(const String &p_path) {
+ selected_files.erase(p_path);
+ EditorExport::singleton->save_presets();
+}
+
+bool EditorExportPreset::has_export_file(const String &p_path) {
+ return selected_files.has(p_path);
+}
+
+void EditorExportPreset::set_custom_features(const String &p_custom_features) {
+ custom_features = p_custom_features;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_custom_features() const {
+ return custom_features;
+}
+
+void EditorExportPreset::set_enc_in_filter(const String &p_filter) {
+ enc_in_filters = p_filter;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_enc_in_filter() const {
+ return enc_in_filters;
+}
+
+void EditorExportPreset::set_enc_ex_filter(const String &p_filter) {
+ enc_ex_filters = p_filter;
+ EditorExport::singleton->save_presets();
+}
+
+String EditorExportPreset::get_enc_ex_filter() const {
+ return enc_ex_filters;
+}
+
+void EditorExportPreset::set_enc_pck(bool p_enabled) {
+ enc_pck = p_enabled;
+ EditorExport::singleton->save_presets();
+}
+
+bool EditorExportPreset::get_enc_pck() const {
+ return enc_pck;
+}
+
+void EditorExportPreset::set_enc_directory(bool p_enabled) {
+ enc_directory = p_enabled;
+ EditorExport::singleton->save_presets();
+}
+
+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();
+}
+
+String EditorExportPreset::get_script_encryption_key() const {
+ return script_key;
+}
+
+EditorExportPreset::EditorExportPreset() {}
diff --git a/editor/export/editor_export_preset.h b/editor/export/editor_export_preset.h
new file mode 100644
index 0000000000..00109396b0
--- /dev/null
+++ b/editor/export/editor_export_preset.h
@@ -0,0 +1,145 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_PRESET_H
+#define EDITOR_EXPORT_PRESET_H
+
+class EditorExportPlatform;
+
+#include "core/object/ref_counted.h"
+
+class EditorExportPreset : public RefCounted {
+ GDCLASS(EditorExportPreset, RefCounted);
+
+public:
+ enum ExportFilter {
+ EXPORT_ALL_RESOURCES,
+ EXPORT_SELECTED_SCENES,
+ EXPORT_SELECTED_RESOURCES,
+ EXCLUDE_SELECTED_RESOURCES,
+ };
+
+ enum ScriptExportMode {
+ MODE_SCRIPT_TEXT,
+ MODE_SCRIPT_COMPILED,
+ };
+
+private:
+ Ref<EditorExportPlatform> platform;
+ ExportFilter export_filter = EXPORT_ALL_RESOURCES;
+ String include_filter;
+ String exclude_filter;
+ String export_path;
+
+ String exporter;
+ HashSet<String> selected_files;
+ bool runnable = false;
+
+ friend class EditorExport;
+ friend class EditorExportPlatform;
+
+ List<PropertyInfo> properties;
+ HashMap<StringName, Variant> values;
+
+ String name;
+
+ String custom_features;
+
+ String enc_in_filters;
+ String enc_ex_filters;
+ bool enc_pck = false;
+ bool enc_directory = false;
+
+ int script_mode = MODE_SCRIPT_COMPILED;
+ String script_key;
+
+protected:
+ 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:
+ Ref<EditorExportPlatform> get_platform() const;
+
+ bool has(const StringName &p_property) const { return values.has(p_property); }
+
+ void update_files_to_export();
+
+ Vector<String> get_files_to_export() const;
+
+ void add_export_file(const String &p_path);
+ void remove_export_file(const String &p_path);
+ bool has_export_file(const String &p_path);
+
+ void set_name(const String &p_name);
+ String get_name() const;
+
+ void set_runnable(bool p_enable);
+ bool is_runnable() const;
+
+ void set_export_filter(ExportFilter p_filter);
+ ExportFilter get_export_filter() const;
+
+ void set_include_filter(const String &p_include);
+ String get_include_filter() const;
+
+ void set_exclude_filter(const String &p_exclude);
+ String get_exclude_filter() const;
+
+ void set_custom_features(const String &p_custom_features);
+ String get_custom_features() const;
+
+ void set_export_path(const String &p_path);
+ String get_export_path() const;
+
+ void set_enc_in_filter(const String &p_filter);
+ String get_enc_in_filter() const;
+
+ void set_enc_ex_filter(const String &p_filter);
+ String get_enc_ex_filter() const;
+
+ void set_enc_pck(bool p_enabled);
+ bool get_enc_pck() const;
+
+ 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;
+
+ const List<PropertyInfo> &get_properties() const { return properties; }
+
+ EditorExportPreset();
+};
+
+#endif // EDITOR_EXPORT_PRESET_H
diff --git a/editor/export/editor_export_shared_object.h b/editor/export/editor_export_shared_object.h
new file mode 100644
index 0000000000..558f403ca1
--- /dev/null
+++ b/editor/export/editor_export_shared_object.h
@@ -0,0 +1,51 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_EXPORT_SHARED_OBJECT_H
+#define EDITOR_EXPORT_SHARED_OBJECT_H
+
+#include "core/string/ustring.h"
+#include "core/templates/vector.h"
+
+struct SharedObject {
+ String path;
+ Vector<String> tags;
+ String target;
+
+ SharedObject(const String &p_path, const Vector<String> &p_tags, const String &p_target) :
+ path(p_path),
+ tags(p_tags),
+ target(p_target) {
+ }
+
+ SharedObject() {}
+};
+
+#endif // EDITOR_EXPORT_SHARED_OBJECT_H
diff --git a/editor/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index 9f9b8374ce..a7d9d7f068 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -30,23 +30,24 @@
#include "export_template_manager.h"
-#include "core/input/input.h"
#include "core/io/dir_access.h"
#include "core/io/json.h"
#include "core/io/zip_io.h"
-#include "core/os/keyboard.h"
-#include "core/templates/rb_set.h"
#include "core/version.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
-#include "progress_dialog.h"
-#include "scene/gui/link_button.h"
+#include "editor/editor_settings.h"
+#include "editor/progress_dialog.h"
+#include "scene/gui/file_dialog.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/tree.h"
+#include "scene/main/http_request.h"
void ExportTemplateManager::_update_template_status() {
// Fetch installed templates from the file system.
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
+ const String &templates_dir = EditorPaths::get_singleton()->get_export_templates_dir();
Error err = da->change_dir(templates_dir);
ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'.");
@@ -439,7 +440,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
}
Ref<DirAccess> d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- String template_path = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(version);
+ String template_path = EditorPaths::get_singleton()->get_export_templates_dir().plus_file(version);
Error err = d->make_dir_recursive(template_path);
if (err != OK) {
EditorNode::get_singleton()->show_warning(TTR("Error creating path for extracting templates:") + "\n" + template_path);
@@ -538,7 +539,7 @@ void ExportTemplateManager::_uninstall_template(const String &p_version) {
void ExportTemplateManager::_uninstall_template_confirmed() {
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
+ const String &templates_dir = EditorPaths::get_singleton()->get_export_templates_dir();
Error err = da->change_dir(templates_dir);
ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'.");
@@ -616,7 +617,7 @@ void ExportTemplateManager::_installed_table_button_cbk(Object *p_item, int p_co
}
void ExportTemplateManager::_open_template_folder(const String &p_version) {
- const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
+ const String &templates_dir = EditorPaths::get_singleton()->get_export_templates_dir();
OS::get_singleton()->shell_open("file://" + templates_dir.plus_file(p_version));
}
@@ -640,12 +641,12 @@ void ExportTemplateManager::_hide_dialog() {
}
bool ExportTemplateManager::can_install_android_template() {
- const String templates_dir = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
+ const String templates_dir = EditorPaths::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
return FileAccess::exists(templates_dir.plus_file("android_source.zip"));
}
Error ExportTemplateManager::install_android_template() {
- const String &templates_path = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
+ const String &templates_path = EditorPaths::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
const String &source_zip = templates_path.plus_file("android_source.zip");
ERR_FAIL_COND_V(!FileAccess::exists(source_zip), ERR_CANT_OPEN);
return install_android_template_from_file(source_zip);
@@ -869,13 +870,13 @@ ExportTemplateManager::ExportTemplateManager() {
current_open_button->set_text(TTR("Open Folder"));
current_open_button->set_tooltip(TTR("Open the folder containing installed templates for the current version."));
current_installed_hb->add_child(current_open_button);
- current_open_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_open_template_folder), varray(VERSION_FULL_CONFIG));
+ current_open_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_open_template_folder).bind(VERSION_FULL_CONFIG));
current_uninstall_button = memnew(Button);
current_uninstall_button->set_text(TTR("Uninstall"));
current_uninstall_button->set_tooltip(TTR("Uninstall templates for the current version."));
current_installed_hb->add_child(current_uninstall_button);
- current_uninstall_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template), varray(VERSION_FULL_CONFIG));
+ current_uninstall_button->connect("pressed", callable_mp(this, &ExportTemplateManager::_uninstall_template).bind(VERSION_FULL_CONFIG));
main_vb->add_child(memnew(HSeparator));
@@ -991,7 +992,7 @@ ExportTemplateManager::ExportTemplateManager() {
install_file_dialog->set_access(FileDialog::ACCESS_FILESYSTEM);
install_file_dialog->set_file_mode(FileDialog::FILE_MODE_OPEN_FILE);
install_file_dialog->add_filter("*.tpz", TTR("Godot Export Templates"));
- install_file_dialog->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_file_selected), varray(false));
+ install_file_dialog->connect("file_selected", callable_mp(this, &ExportTemplateManager::_install_file_selected).bind(false));
add_child(install_file_dialog);
hide_dialog_accept = memnew(AcceptDialog);
diff --git a/editor/export_template_manager.h b/editor/export/export_template_manager.h
index 3494e11d5e..f01da15832 100644
--- a/editor/export_template_manager.h
+++ b/editor/export/export_template_manager.h
@@ -31,15 +31,15 @@
#ifndef EXPORT_TEMPLATE_MANAGER_H
#define EXPORT_TEMPLATE_MANAGER_H
-#include "editor/editor_settings.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/progress_bar.h"
-#include "scene/gui/scroll_container.h"
-#include "scene/main/http_request.h"
class ExportTemplateVersion;
+class FileDialog;
+class HTTPRequest;
+class MenuButton;
+class OptionButton;
+class ProgressBar;
+class Tree;
class ExportTemplateManager : public AcceptDialog {
GDCLASS(ExportTemplateManager, AcceptDialog);
diff --git a/editor/project_export.cpp b/editor/export/project_export.cpp
index 209c997d58..a20f19efc8 100644
--- a/editor/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -31,23 +31,15 @@
#include "project_export.h"
#include "core/config/project_settings.h"
-#include "core/io/dir_access.h"
-#include "core/io/file_access.h"
-#include "core/io/image_loader.h"
-#include "core/io/resource_loader.h"
-#include "core/io/resource_saver.h"
-#include "core/os/os.h"
-#include "core/string/optimized_translation.h"
-#include "core/version_generated.gen.h"
+#include "core/version.h"
#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
+#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
-#include "editor/editor_settings.h"
-#include "scene/gui/box_container.h"
-#include "scene/gui/margin_container.h"
-#include "scene/gui/scroll_container.h"
-#include "scene/gui/tab_container.h"
-#include "servers/display_server.h"
+#include "editor/export/editor_export.h"
+#include "scene/gui/link_button.h"
+#include "scene/gui/tree.h"
void ProjectExportDialog::_theme_changed() {
duplicate_preset->set_icon(presets->get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")));
diff --git a/editor/project_export.h b/editor/export/project_export.h
index 5503d5aa47..96dd765a2c 100644
--- a/editor/project_export.h
+++ b/editor/export/project_export.h
@@ -31,28 +31,22 @@
#ifndef PROJECT_EXPORT_H
#define PROJECT_EXPORT_H
-#include "core/io/dir_access.h"
-#include "core/os/thread.h"
-#include "editor/editor_export.h"
-#include "editor/editor_file_system.h"
-#include "editor/editor_inspector.h"
-#include "editor/editor_properties.h"
-#include "scene/gui/button.h"
-#include "scene/gui/check_button.h"
-#include "scene/gui/control.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/label.h"
-#include "scene/gui/link_button.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/rich_text_label.h"
-#include "scene/gui/slider.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/tree.h"
-#include "scene/main/timer.h"
+class CheckBox;
+class CheckButton;
+class EditorExportPreset;
class EditorFileDialog;
+class EditorFileSystemDirectory;
+class EditorInspector;
+class EditorPropertyPath;
+class ItemList;
+class MenuButton;
+class OptionButton;
+class RichTextLabel;
+class TabContainer;
+class Tree;
+class TreeItem;
class ProjectExportDialog : public ConfirmationDialog {
GDCLASS(ProjectExportDialog, ConfirmationDialog);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index e025cedf02..6638e2f42f 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -381,7 +381,7 @@ void FileSystemDock::_notification(int p_what) {
file_list_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_list_rmb_option));
tree_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
- current_path->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path), make_binds(false));
+ 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"));
@@ -3079,7 +3079,7 @@ FileSystemDock::FileSystemDock() {
tree_search_box = memnew(LineEdit);
tree_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
tree_search_box->set_placeholder(TTR("Filter Files"));
- tree_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed), varray(tree_search_box));
+ tree_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed).bind(tree_search_box));
toolbar2_hbc->add_child(tree_search_box);
tree_button_sort = _create_file_menu_button();
@@ -3124,7 +3124,7 @@ FileSystemDock::FileSystemDock() {
file_list_search_box = memnew(LineEdit);
file_list_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
file_list_search_box->set_placeholder(TTR("Filter Files"));
- file_list_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed), varray(file_list_search_box));
+ file_list_search_box->connect("text_changed", callable_mp(this, &FileSystemDock::_search_changed).bind(file_list_search_box));
path_hb->add_child(file_list_search_box);
file_list_button_sort = _create_file_menu_button();
@@ -3172,7 +3172,7 @@ FileSystemDock::FileSystemDock() {
move_dialog = memnew(EditorDirDialog);
move_dialog->set_ok_button_text(TTR("Move"));
add_child(move_dialog);
- move_dialog->connect("dir_selected", callable_mp(this, &FileSystemDock::_move_operation_confirm), make_binds(false));
+ move_dialog->connect("dir_selected", callable_mp(this, &FileSystemDock::_move_operation_confirm).bind(false));
rename_dialog = memnew(ConfirmationDialog);
VBoxContainer *rename_dialog_vb = memnew(VBoxContainer);
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index f1d08783ad..f16097f109 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -473,7 +473,7 @@ GroupDialog::GroupDialog() {
add_group_button = memnew(Button);
add_group_button->set_text(TTR("Add"));
chbc->add_child(add_group_button);
- add_group_button->connect("pressed", callable_mp(this, &GroupDialog::_add_group_pressed), varray(String()));
+ add_group_button->connect("pressed", callable_mp(this, &GroupDialog::_add_group_pressed).bind(String()));
VBoxContainer *vbc_add = memnew(VBoxContainer);
hbc->add_child(vbc_add);
@@ -737,7 +737,7 @@ GroupsEditor::GroupsEditor() {
add = memnew(Button);
add->set_text(TTR("Add"));
hbc->add_child(add);
- add->connect("pressed", callable_mp(this, &GroupsEditor::_add_group), varray(String()));
+ add->connect("pressed", callable_mp(this, &GroupsEditor::_add_group).bind(String()));
tree = memnew(Tree);
tree->set_hide_root(true);
diff --git a/editor/icons/AudioStreamOGGVorbis.svg b/editor/icons/AudioStreamOggVorbis.svg
index 2e54de9faa..2e54de9faa 100644
--- a/editor/icons/AudioStreamOGGVorbis.svg
+++ b/editor/icons/AudioStreamOggVorbis.svg
diff --git a/editor/icons/AudioStreamSample.svg b/editor/icons/AudioStreamWAV.svg
index 2e54de9faa..2e54de9faa 100644
--- a/editor/icons/AudioStreamSample.svg
+++ b/editor/icons/AudioStreamWAV.svg
diff --git a/editor/icons/FontFile.svg b/editor/icons/FontFile.svg
index 4b94fd0d74..c014299783 100644
--- a/editor/icons/FontFile.svg
+++ b/editor/icons/FontFile.svg
@@ -1 +1 @@
-<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 1v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V3h2a1 1 0 0 1 1 1h1V1h-6Z" fill="#e0e0e0"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6Z" fill="#ff5f5f"/></svg>
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 7.5h-1a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5h-.5V9a1 1 0 0 1-1 1v1H8V9.854A1 1 0 0 1 7.5 9V7.5zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" style="fill:#e0e0e0;fill-opacity:1"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/icons/FontVariation.svg b/editor/icons/FontVariation.svg
index eaad049fce..39917bcba9 100644
--- a/editor/icons/FontVariation.svg
+++ b/editor/icons/FontVariation.svg
@@ -1 +1 @@
-<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M2.437 1 1.379 4h1A.84 1.192 50 0 1 3.73 3h2L3.615 9a.84 1.192 50 0 1-1.352 1l-.353 1h4l.353-1a.84 1.192 50 0 1-.648-1l2.116-6h2a.84 1.192 50 0 1 .648 1h1l1.058-3h-6Z" fill="#e0e0e0"/><path d="m4.621 5-.705 2-.353 1h1a.84 1.192 49.998 0 1 1.353-1h2L5.8 13a.84 1.192 49.998 0 1-1.353 1l-.353 1h4l.353-1a.84 1.192 49.998 0 1-.647-1l2.116-6h2a.84 1.192 49.998 0 1 .647 1h1l.353-1 .705-2h-6Z" fill="#ff5f5f"/></svg>
+<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M5.975 11 7.21 7.5H5.916a.478.478 0 0 0-.113.016.837.837 0 0 0-.127.043c-.044.018-.089.04-.133.066l-.043.027V9a1 1 0 0 1-1 1v1h1.475zM1.5 1v3h1a1 1 0 0 1 1-1h2v1.5h2V3h2a1 1 0 0 1 1 1h1V1h-10z" style="fill:#e0e0e0;fill-opacity:1"/><path d="m4.621 5-.705 2-.353 1h1a.84 1.192 49.998 0 1 1.353-1h2L5.8 13a.84 1.192 49.998 0 1-1.353 1l-.353 1h4l.353-1a.84 1.192 49.998 0 1-.647-1l2.116-6h2a.84 1.192 49.998 0 1 .647 1h1l.353-1 .705-2h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/icons/ShapeCast3D.svg b/editor/icons/ShapeCast3D.svg
new file mode 100644
index 0000000000..c9f24a59b4
--- /dev/null
+++ b/editor/icons/ShapeCast3D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f"><path d="m7 1v9h-3l4 5 4-5h-3v-9z"/><circle cx="7.990566" cy="4.8202" r="4.009434"/></g></svg>
diff --git a/editor/icons/SystemFont.svg b/editor/icons/SystemFont.svg
new file mode 100644
index 0000000000..a6f62d56d3
--- /dev/null
+++ b/editor/icons/SystemFont.svg
@@ -0,0 +1 @@
+<svg height="16" width="16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path style="fill:#e0e0e0;fill-opacity:1;stroke-width:.714755" d="m5.787 1-.402 1.613c-.352.265-.71.122-1.012-.111l-.904-.541L2.46 2.973l.853 1.425c-.058.438-.412.586-.79.635-.343.065-.674.216-1.024.213V6.72c.367 0 .715.157 1.074.224.371.032.716.243.727.65l-.84 1.4 1.008 1.01c.443-.266.895-.53 1.33-.802.349-.044.675.139.674.506l.314 1.258c.459-.059 1.099.115 1.45-.082.117-.475.242-.954.35-1.428A.67.67 0 0 1 8 9.195V7.5H6.5a.519.519 0 0 0-.281.084A.491.491 0 0 0 6 8v.5H4v-4h5.75c-.005-.22.107-.434.254-.625l.543-.902L9.535 1.96l-1.426.853c-.437-.058-.588-.412-.636-.79L7.217 1h-1.43z"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg>
diff --git a/editor/import/post_import_plugin_skeleton_renamer.cpp b/editor/import/post_import_plugin_skeleton_renamer.cpp
index bf84348ac3..69c0a047e4 100644
--- a/editor/import/post_import_plugin_skeleton_renamer.cpp
+++ b/editor/import/post_import_plugin_skeleton_renamer.cpp
@@ -154,16 +154,28 @@ void PostImportPluginSkeletonRenamer::internal_process(InternalImportCategory p_
Ref<Animation> anim = ap->get_animation(name);
int track_len = anim->get_track_count();
for (int i = 0; i < track_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 *orig_node = (ap->get_node(ap->get_root()))->get_node(NodePath(track_path));
Node *node = (ap->get_node(ap->get_root()))->get_node(NodePath(track_path));
- if (node) {
+ while (node) {
Skeleton3D *track_skeleton = Object::cast_to<Skeleton3D>(node);
if (track_skeleton && track_skeleton == skeleton) {
- anim->track_set_path(i, String("%") + unique_name + String(":") + anim->track_get_path(i).get_concatenated_subnames());
+ if (node == orig_node) {
+ if (anim->track_get_path(i).get_subname_count() > 0) {
+ anim->track_set_path(i, UNIQUE_NODE_PREFIX + unique_name + String(":") + anim->track_get_path(i).get_concatenated_subnames());
+ } else {
+ anim->track_set_path(i, UNIQUE_NODE_PREFIX + unique_name);
+ }
+ } else {
+ if (anim->track_get_path(i).get_subname_count() > 0) {
+ anim->track_set_path(i, UNIQUE_NODE_PREFIX + unique_name + "/" + node->get_path_to(orig_node) + String(":") + anim->track_get_path(i).get_concatenated_subnames());
+ } else {
+ anim->track_set_path(i, UNIQUE_NODE_PREFIX + unique_name + "/" + node->get_path_to(orig_node));
+ }
+ }
+ break;
}
+ node = node->get_parent();
}
}
}
diff --git a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
index 01e145e766..4f00bd120a 100644
--- a/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
+++ b/editor/import/post_import_plugin_skeleton_rest_fixer.cpp
@@ -34,11 +34,11 @@
#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/3d/skeleton_3d.h"
#include "scene/animation/animation_player.h"
-#include "scene/resources/animation.h"
#include "scene/resources/bone_map.h"
void PostImportPluginSkeletonRestFixer::get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options) {
if (p_category == INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE) {
+ r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/rest_fixer/normalize_position_tracks"), true));
r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/rest_fixer/overwrite_axis"), true));
r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/rest_fixer/fix_silhouette/enable"), false));
@@ -89,6 +89,53 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
}
}
+ // Set motion scale to Skeleton if normalize position tracks.
+ if (bool(p_options["retarget/rest_fixer/normalize_position_tracks"])) {
+ int src_bone_idx = src_skeleton->find_bone(profile->get_scale_base_bone());
+ if (src_bone_idx >= 0) {
+ real_t motion_scale = abs(src_skeleton->get_bone_global_rest(src_bone_idx).origin.y);
+ if (motion_scale > 0) {
+ src_skeleton->set_motion_scale(motion_scale);
+ }
+ }
+
+ 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 track_len = anim->get_track_count();
+ for (int i = 0; i < track_len; i++) {
+ if (anim->track_get_path(i).get_subname_count() != 1 || anim->track_get_type(i) != Animation::TYPE_POSITION_3D) {
+ continue;
+ }
+
+ if (anim->track_is_compressed(i)) {
+ continue; // Shouldn't occur in internal_process().
+ }
+
+ 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) {
+ if (track_skeleton && track_skeleton == src_skeleton) {
+ real_t mlt = 1 / src_skeleton->get_motion_scale();
+ int key_len = anim->track_get_key_count(i);
+ for (int j = 0; j < key_len; j++) {
+ Vector3 pos = static_cast<Vector3>(anim->track_get_key_value(i, j));
+ anim->track_set_key_value(i, j, pos * mlt);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
// Complement Rotation track for compatibility between different rests.
{
TypedArray<Node> nodes = p_base_scene->find_children("*", "AnimationPlayer");
@@ -357,12 +404,12 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
Ref<Animation> anim = ap->get_animation(name);
int track_len = anim->get_track_count();
for (int i = 0; i < track_len; i++) {
- if (anim->track_get_path(i).get_subname_count() != 1 || anim->track_get_type(i) != Animation::TYPE_ROTATION_3D) {
+ 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;
}
if (anim->track_is_compressed(i)) {
- continue; // TODO: Adopt to compressed track.
+ continue; // Shouldn't occur in internal_process().
}
String track_path = String(anim->track_get_path(i).get_concatenated_names());
@@ -374,20 +421,44 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
if (bn) {
int bone_idx = src_skeleton->find_bone(bn);
- Quaternion old_rest = old_skeleton_rest[bone_idx].basis.get_rotation_quaternion();
- Quaternion new_rest = src_skeleton->get_bone_rest(bone_idx).basis.get_rotation_quaternion();
- Quaternion old_pg;
- Quaternion new_pg;
+ Transform3D old_rest = old_skeleton_rest[bone_idx];
+ Transform3D new_rest = src_skeleton->get_bone_rest(bone_idx);
+ Transform3D old_pg;
+ Transform3D new_pg;
int parent_idx = src_skeleton->get_bone_parent(bone_idx);
if (parent_idx >= 0) {
- old_pg = old_skeleton_global_rest[parent_idx].basis.get_rotation_quaternion();
- new_pg = src_skeleton->get_bone_global_rest(parent_idx).basis.get_rotation_quaternion();
+ old_pg = old_skeleton_global_rest[parent_idx];
+ new_pg = src_skeleton->get_bone_global_rest(parent_idx);
}
int key_len = anim->track_get_key_count(i);
- for (int j = 0; j < key_len; j++) {
- Quaternion qt = static_cast<Quaternion>(anim->track_get_key_value(i, j));
- anim->track_set_key_value(i, j, new_pg.inverse() * old_pg * qt * old_rest.inverse() * old_pg.inverse() * new_pg * new_rest);
+ if (anim->track_get_type(i) == Animation::TYPE_ROTATION_3D) {
+ Quaternion old_rest_q = old_rest.basis.get_rotation_quaternion();
+ Quaternion new_rest_q = new_rest.basis.get_rotation_quaternion();
+ Quaternion old_pg_q = old_pg.basis.get_rotation_quaternion();
+ Quaternion new_pg_q = new_pg.basis.get_rotation_quaternion();
+ for (int j = 0; j < key_len; j++) {
+ Quaternion qt = static_cast<Quaternion>(anim->track_get_key_value(i, j));
+ anim->track_set_key_value(i, j, new_pg_q.inverse() * old_pg_q * qt * old_rest_q.inverse() * old_pg_q.inverse() * new_pg_q * new_rest_q);
+ }
+ } else if (anim->track_get_type(i) == Animation::TYPE_SCALE_3D) {
+ Basis old_rest_b = old_rest.basis;
+ Basis new_rest_b = new_rest.basis;
+ Basis old_pg_b = old_pg.basis;
+ Basis new_pg_b = new_pg.basis;
+ for (int j = 0; j < key_len; j++) {
+ Basis sc = Basis().scaled(static_cast<Vector3>(anim->track_get_key_value(i, j)));
+ anim->track_set_key_value(i, j, (new_pg_b.inverse() * old_pg_b * sc * old_rest_b.inverse() * old_pg_b.inverse() * new_pg_b * new_rest_b).get_scale());
+ }
+ } else {
+ Vector3 old_rest_o = old_rest.origin;
+ Vector3 new_rest_o = new_rest.origin;
+ Quaternion old_pg_q = old_pg.basis.get_rotation_quaternion();
+ Quaternion new_pg_q = new_pg.basis.get_rotation_quaternion();
+ for (int j = 0; j < key_len; j++) {
+ Vector3 ps = static_cast<Vector3>(anim->track_get_key_value(i, j));
+ anim->track_set_key_value(i, j, new_pg_q.xform_inv(old_pg_q.xform(ps - old_rest_o)) + new_rest_o);
+ }
}
}
}
diff --git a/editor/import/post_import_plugin_skeleton_track_organizer.cpp b/editor/import/post_import_plugin_skeleton_track_organizer.cpp
new file mode 100644
index 0000000000..01186f47fe
--- /dev/null
+++ b/editor/import/post_import_plugin_skeleton_track_organizer.cpp
@@ -0,0 +1,127 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#include "post_import_plugin_skeleton_track_organizer.h"
+
+#include "editor/import/scene_import_settings.h"
+#include "scene/3d/skeleton_3d.h"
+#include "scene/animation/animation_player.h"
+#include "scene/resources/bone_map.h"
+
+void PostImportPluginSkeletonTrackOrganizer::get_internal_import_options(InternalImportCategory p_category, List<ResourceImporter::ImportOption> *r_options) {
+ if (p_category == INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE) {
+ r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/remove_tracks/except_bone_transform"), false));
+ r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/remove_tracks/unimportant_positions"), true));
+ r_options->push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "retarget/remove_tracks/unmapped_bones"), false));
+ }
+}
+
+void PostImportPluginSkeletonTrackOrganizer::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) {
+ return;
+ }
+ BoneMap *bone_map = Object::cast_to<BoneMap>(map);
+ Ref<SkeletonProfile> profile = bone_map->get_profile();
+ if (!profile.is_valid()) {
+ return;
+ }
+ Skeleton3D *src_skeleton = Object::cast_to<Skeleton3D>(p_node);
+ if (!src_skeleton) {
+ return;
+ }
+ bool remove_except_bone = bool(p_options["retarget/remove_tracks/except_bone_transform"]);
+ bool remove_positions = bool(p_options["retarget/remove_tracks/unimportant_positions"]);
+ bool remove_unmapped_bones = bool(p_options["retarget/remove_tracks/unmapped_bones"]);
+
+ if (!remove_positions && !remove_unmapped_bones) {
+ return;
+ }
+
+ 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 track_len = anim->get_track_count();
+ Vector<int> remove_indices;
+ for (int i = 0; i < track_len; i++) {
+ 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) {
+ if (remove_except_bone) {
+ remove_indices.push_back(i);
+ }
+ continue;
+ }
+ Skeleton3D *track_skeleton = Object::cast_to<Skeleton3D>(node);
+ if (track_skeleton && track_skeleton == src_skeleton) {
+ 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)) {
+ if (remove_except_bone) {
+ remove_indices.push_back(i);
+ }
+ continue;
+ }
+ StringName bn = anim->track_get_path(i).get_subname(0);
+ if (bn) {
+ int prof_idx = profile->find_bone(bone_map->find_profile_bone_name(bn));
+ if (remove_unmapped_bones && prof_idx < 0) {
+ remove_indices.push_back(i);
+ continue;
+ }
+ if (remove_positions && anim->track_get_type(i) == Animation::TYPE_POSITION_3D && prof_idx >= 0) {
+ StringName prof_bn = profile->get_bone_name(prof_idx);
+ if (prof_bn == profile->get_root_bone() || prof_bn == profile->get_scale_base_bone()) {
+ continue;
+ }
+ remove_indices.push_back(i);
+ }
+ }
+ }
+ if (remove_except_bone) {
+ remove_indices.push_back(i);
+ }
+ }
+
+ remove_indices.reverse();
+ for (int i = 0; i < remove_indices.size(); i++) {
+ anim->remove_track(remove_indices[i]);
+ }
+ }
+ }
+ }
+}
+
+PostImportPluginSkeletonTrackOrganizer::PostImportPluginSkeletonTrackOrganizer() {
+}
diff --git a/editor/import/post_import_plugin_skeleton_track_organizer.h b/editor/import/post_import_plugin_skeleton_track_organizer.h
new file mode 100644
index 0000000000..1830861430
--- /dev/null
+++ b/editor/import/post_import_plugin_skeleton_track_organizer.h
@@ -0,0 +1,46 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef POST_IMPORT_PLUGIN_SKELETON_TRACK_ORGANIZER_H
+#define POST_IMPORT_PLUGIN_SKELETON_TRACK_ORGANIZER_H
+
+#include "resource_importer_scene.h"
+
+class PostImportPluginSkeletonTrackOrganizer : public EditorScenePostImportPlugin {
+ GDCLASS(PostImportPluginSkeletonTrackOrganizer, EditorScenePostImportPlugin);
+
+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;
+
+ PostImportPluginSkeletonTrackOrganizer();
+};
+
+#endif // POST_IMPORT_PLUGIN_SKELETON_TRACK_ORGANIZER_H
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 966719dc48..c03962b8a4 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -103,7 +103,7 @@ Error ResourceImporterBitMap::import(const String &p_source_file, const String &
}
}
- return ResourceSaver::save(p_save_path + ".res", bitmap);
+ return ResourceSaver::save(bitmap, p_save_path + ".res");
}
ResourceImporterBitMap::ResourceImporterBitMap() {
diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp
index 987ca4b911..14b5638755 100644
--- a/editor/import/resource_importer_bmfont.cpp
+++ b/editor/import/resource_importer_bmfont.cpp
@@ -84,7 +84,7 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String &
}
print_verbose("Saving to: " + p_save_path + ".fontdata");
- err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ err = ResourceSaver::save(font, p_save_path + ".fontdata", flg);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
print_verbose("Done saving to: " + p_save_path + ".fontdata");
return OK;
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 0b3622e3c0..8b429e74d1 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -131,7 +131,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
String save_path = p_source_file.get_basename() + "." + translations[i]->get_locale() + ".translation";
- ResourceSaver::save(save_path, xlt);
+ ResourceSaver::save(xlt, save_path);
if (r_gen_files) {
r_gen_files->push_back(save_path);
}
diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp
index f1a70ff30a..32fd94b093 100644
--- a/editor/import/resource_importer_dynamic_font.cpp
+++ b/editor/import/resource_importer_dynamic_font.cpp
@@ -219,7 +219,7 @@ Error ResourceImporterDynamicFont::import(const String &p_source_file, const Str
}
print_verbose("Saving to: " + p_save_path + ".fontdata");
- Error err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ Error err = ResourceSaver::save(font, p_save_path + ".fontdata", flg);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
print_verbose("Done saving to: " + p_save_path + ".fontdata");
return OK;
diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp
index ea84d4c883..374cbe7ce2 100644
--- a/editor/import/resource_importer_imagefont.cpp
+++ b/editor/import/resource_importer_imagefont.cpp
@@ -159,7 +159,7 @@ Error ResourceImporterImageFont::import(const String &p_source_file, const Strin
}
print_verbose("Saving to: " + p_save_path + ".fontdata");
- err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ err = ResourceSaver::save(font, p_save_path + ".fontdata", flg);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
print_verbose("Done saving to: " + p_save_path + ".fontdata");
return OK;
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 6fbfecfdfa..d1c4e1f8dd 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -519,7 +519,7 @@ Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_s
String save_path = p_save_path + ".mesh";
- err = ResourceSaver::save(save_path, meshes.front()->get());
+ err = ResourceSaver::save(meshes.front()->get(), save_path);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save Mesh to file '" + save_path + "'.");
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 860269bfcb..3c0de61d24 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -743,6 +743,163 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<R
return p_node;
}
+Node *ResourceImporterScene::_pre_fix_animations(Node *p_node, Node *p_root, const Dictionary &p_node_data, const Dictionary &p_animation_data, float p_animation_fps) {
+ // children first
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ Node *r = _pre_fix_animations(p_node->get_child(i), p_root, p_node_data, p_animation_data, p_animation_fps);
+ if (!r) {
+ i--; //was erased
+ }
+ }
+
+ String import_id = p_node->get_meta("import_id", "PATH:" + p_root->get_path_to(p_node));
+
+ Dictionary node_settings;
+ if (p_node_data.has(import_id)) {
+ node_settings = p_node_data[import_id];
+ }
+
+ {
+ //make sure this is unique
+ node_settings = node_settings.duplicate(true);
+ //fill node settings for this node with default values
+ List<ImportOption> iopts;
+ get_internal_import_options(INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, &iopts);
+ for (const ImportOption &E : iopts) {
+ if (!node_settings.has(E.option.name)) {
+ node_settings[E.option.name] = E.default_value;
+ }
+ }
+ }
+
+ if (Object::cast_to<AnimationPlayer>(p_node)) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
+
+ Array animation_clips;
+ {
+ int clip_count = node_settings["clips/amount"];
+
+ 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"];
+
+ 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_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);
+ }
+ }
+ }
+
+ return p_node;
+}
+
+Node *ResourceImporterScene::_post_fix_animations(Node *p_node, Node *p_root, const Dictionary &p_node_data, const Dictionary &p_animation_data, float p_animation_fps) {
+ // children first
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ Node *r = _post_fix_animations(p_node->get_child(i), p_root, p_node_data, p_animation_data, p_animation_fps);
+ if (!r) {
+ i--; //was erased
+ }
+ }
+
+ String import_id = p_node->get_meta("import_id", "PATH:" + p_root->get_path_to(p_node));
+
+ Dictionary node_settings;
+ if (p_node_data.has(import_id)) {
+ node_settings = p_node_data[import_id];
+ }
+
+ {
+ //make sure this is unique
+ node_settings = node_settings.duplicate(true);
+ //fill node settings for this node with default values
+ List<ImportOption> iopts;
+ get_internal_import_options(INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, &iopts);
+ for (const ImportOption &E : iopts) {
+ if (!node_settings.has(E.option.name)) {
+ node_settings[E.option.name] = E.default_value;
+ }
+ }
+ }
+
+ if (Object::cast_to<AnimationPlayer>(p_node)) {
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
+
+ bool use_optimizer = node_settings["optimizer/enabled"];
+ float anim_optimizer_linerr = node_settings["optimizer/max_linear_error"];
+ float anim_optimizer_angerr = node_settings["optimizer/max_angular_error"];
+ float anim_optimizer_maxang = node_settings["optimizer/max_angle"];
+
+ if (use_optimizer) {
+ _optimize_animations(ap, anim_optimizer_linerr, anim_optimizer_angerr, anim_optimizer_maxang);
+ }
+
+ bool use_compression = node_settings["compression/enabled"];
+ int anim_compression_page_size = node_settings["compression/page_size"];
+
+ if (use_compression) {
+ _compress_animations(ap, anim_compression_page_size);
+ }
+
+ List<StringName> anims;
+ ap->get_animation_list(&anims);
+ for (const StringName &name : anims) {
+ Ref<Animation> anim = ap->get_animation(name);
+ if (p_animation_data.has(name)) {
+ Dictionary anim_settings = p_animation_data[name];
+ {
+ //fill with default values
+ List<ImportOption> iopts;
+ get_internal_import_options(INTERNAL_IMPORT_CATEGORY_ANIMATION, &iopts);
+ for (const ImportOption &F : iopts) {
+ if (!anim_settings.has(F.option.name)) {
+ anim_settings[F.option.name] = F.default_value;
+ }
+ }
+ }
+
+ anim->set_loop_mode(static_cast<Animation::LoopMode>((int)anim_settings["settings/loop_mode"]));
+ bool save = anim_settings["save_to_file/enabled"];
+ String path = anim_settings["save_to_file/path"];
+ bool keep_custom = anim_settings["save_to_file/keep_custom_tracks"];
+
+ Ref<Animation> saved_anim = _save_animation_to_file(anim, save, path, keep_custom);
+
+ if (saved_anim != anim) {
+ Ref<AnimationLibrary> al = ap->get_animation_library(ap->find_animation_library(anim));
+ al->add_animation(name, saved_anim); //replace
+ }
+ }
+ }
+ }
+
+ return p_node;
+}
+
Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
@@ -1012,83 +1169,6 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE, p_root, p_node, Ref<Resource>(), node_settings);
}
- bool use_optimizer = node_settings["optimizer/enabled"];
- float anim_optimizer_linerr = node_settings["optimizer/max_linear_error"];
- float anim_optimizer_angerr = node_settings["optimizer/max_angular_error"];
- float anim_optimizer_maxang = node_settings["optimizer/max_angle"];
-
- if (use_optimizer) {
- _optimize_animations(ap, anim_optimizer_linerr, anim_optimizer_angerr, anim_optimizer_maxang);
- }
-
- Array animation_clips;
- {
- int clip_count = node_settings["clips/amount"];
-
- 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"];
-
- 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_clips.size()) {
- _create_clips(ap, animation_clips, true);
- } else {
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (const StringName &name : anims) {
- Ref<Animation> anim = ap->get_animation(name);
- if (p_animation_data.has(name)) {
- Dictionary anim_settings = p_animation_data[name];
- {
- //fill with default values
- List<ImportOption> iopts;
- get_internal_import_options(INTERNAL_IMPORT_CATEGORY_ANIMATION, &iopts);
- for (const ImportOption &F : iopts) {
- if (!anim_settings.has(F.option.name)) {
- anim_settings[F.option.name] = F.default_value;
- }
- }
- }
-
- anim->set_loop_mode(static_cast<Animation::LoopMode>((int)anim_settings["settings/loop_mode"]));
- bool save = anim_settings["save_to_file/enabled"];
- String path = anim_settings["save_to_file/path"];
- bool keep_custom = anim_settings["save_to_file/keep_custom_tracks"];
-
- Ref<Animation> saved_anim = _save_animation_to_file(anim, save, path, keep_custom);
-
- if (saved_anim != anim) {
- Ref<AnimationLibrary> al = ap->get_animation_library(ap->find_animation_library(anim));
- al->add_animation(name, saved_anim); //replace
- }
- }
- }
-
- 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);
- }
- }
-
if (post_importer_plugins.size()) {
List<StringName> anims;
ap->get_animation_list(&anims);
@@ -1113,13 +1193,6 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
}
}
}
-
- bool use_compression = node_settings["compression/enabled"];
- int anim_compression_page_size = node_settings["compression/page_size"];
-
- if (use_compression) {
- _compress_animations(ap, anim_compression_page_size);
- }
}
return p_node;
@@ -1151,7 +1224,7 @@ Ref<Animation> ResourceImporterScene::_save_animation_to_file(Ref<Animation> ani
}
}
anim->set_path(p_save_to_path, true); // Set path to save externally.
- Error err = ResourceSaver::save(p_save_to_path, anim, ResourceSaver::FLAG_CHANGE_PATH);
+ Error err = ResourceSaver::save(anim, p_save_to_path, ResourceSaver::FLAG_CHANGE_PATH);
ERR_FAIL_COND_V_MSG(err != OK, anim, "Saving of animation failed: " + p_save_to_path);
return anim;
}
@@ -1769,7 +1842,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m
}
mesh = src_mesh_node->get_mesh()->get_mesh(existing);
- ResourceSaver::save(save_to_file, mesh); //override
+ ResourceSaver::save(mesh, save_to_file); //override
mesh->set_path(save_to_file, true); //takeover existing, if needed
@@ -2099,7 +2172,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
post_importer_plugins.write[i]->pre_process(scene, p_options);
}
+ _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);
String root_type = p_options["nodes/root_type"];
root_type = root_type.split(" ")[0]; // full root_type is "ClassName (filename.gd)" for a script global class.
@@ -2235,14 +2310,14 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
print_verbose("Saving animation to: " + p_save_path + ".scn");
- err = ResourceSaver::save(p_save_path + ".res", library); //do not take over, let the changed files reload themselves
+ err = ResourceSaver::save(library, p_save_path + ".res"); //do not take over, let the changed files reload themselves
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save animation to file '" + p_save_path + ".res'.");
} else {
Ref<PackedScene> packer = memnew(PackedScene);
packer->pack(scene);
print_verbose("Saving scene to: " + p_save_path + ".scn");
- err = ResourceSaver::save(p_save_path + ".scn", packer); //do not take over, let the changed files reload themselves
+ err = ResourceSaver::save(packer, p_save_path + ".scn"); //do not take over, let the changed files reload themselves
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save scene to file '" + p_save_path + ".scn'.");
}
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index db6ca0cdcf..b336931476 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -274,7 +274,9 @@ public:
virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; }
Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames);
+ Node *_pre_fix_animations(Node *p_node, Node *p_root, const Dictionary &p_node_data, const Dictionary &p_animation_data, float p_animation_fps);
Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
+ Node *_post_fix_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);
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index 64839bf199..d3079141e0 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -109,7 +109,7 @@ Error ResourceImporterShaderFile::import(const String &p_source_file, const Stri
}
}
- ResourceSaver::save(p_save_path + ".res", shader_file);
+ ResourceSaver::save(shader_file, p_save_path + ".res");
return OK;
}
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 93afb3381e..bae1b903c6 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -88,7 +88,7 @@ Error ResourceImporterTextureAtlas::import(const String &p_source_file, const St
//use an xpm because it's size independent, the editor images are vector and size dependent
//it's a simple hack
Ref<Image> broken = memnew(Image((const char **)atlas_import_failed_xpm));
- ResourceSaver::save(p_save_path + ".tex", ImageTexture::create_from_image(broken));
+ ResourceSaver::save(ImageTexture::create_from_image(broken), p_save_path + ".tex");
return OK;
}
@@ -386,7 +386,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
}
String save_path = p_base_paths[E.key] + ".res";
- ResourceSaver::save(save_path, texture);
+ ResourceSaver::save(texture, save_path);
idx++;
}
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index f0ba1eb7a1..a1e00f7d30 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -33,7 +33,7 @@
#include "core/io/file_access.h"
#include "core/io/marshalls.h"
#include "core/io/resource_saver.h"
-#include "scene/resources/audio_stream_sample.h"
+#include "scene/resources/audio_stream_wav.h"
const float TRIM_DB_LIMIT = -50;
const int TRIM_FADE_OUT_FRAMES = 500;
@@ -55,7 +55,7 @@ String ResourceImporterWAV::get_save_extension() const {
}
String ResourceImporterWAV::get_resource_type() const {
- return "AudioStreamSample";
+ return "AudioStreamWAV";
}
bool ResourceImporterWAV::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {
@@ -86,7 +86,7 @@ void ResourceImporterWAV::get_import_options(const String &p_path, List<ImportOp
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "force/max_rate_hz", PROPERTY_HINT_RANGE, "11025,192000,1,exp"), 44100));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/trim"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/normalize"), false));
- // Keep the `edit/loop_mode` enum in sync with AudioStreamSample::LoopMode (note: +1 offset due to "Detect From WAV").
+ // Keep the `edit/loop_mode` enum in sync with AudioStreamWAV::LoopMode (note: +1 offset due to "Detect From WAV").
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "edit/loop_mode", PROPERTY_HINT_ENUM, "Detect From WAV,Disabled,Forward,Ping-Pong,Backward", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "edit/loop_begin"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "edit/loop_end"), -1));
@@ -130,7 +130,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
int format_bits = 0;
int format_channels = 0;
- AudioStreamSample::LoopMode loop_mode = AudioStreamSample::LOOP_DISABLED;
+ AudioStreamWAV::LoopMode loop_mode = AudioStreamWAV::LOOP_DISABLED;
uint16_t compression_code = 1;
bool format_found = false;
bool data_found = false;
@@ -282,11 +282,11 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
int loop_type = file->get_32();
if (loop_type == 0x00 || loop_type == 0x01 || loop_type == 0x02) {
if (loop_type == 0x00) {
- loop_mode = AudioStreamSample::LOOP_FORWARD;
+ loop_mode = AudioStreamWAV::LOOP_FORWARD;
} else if (loop_type == 0x01) {
- loop_mode = AudioStreamSample::LOOP_PINGPONG;
+ loop_mode = AudioStreamWAV::LOOP_PINGPONG;
} else if (loop_type == 0x02) {
- loop_mode = AudioStreamSample::LOOP_BACKWARD;
+ loop_mode = AudioStreamWAV::LOOP_BACKWARD;
}
loop_begin = file->get_32();
loop_end = file->get_32();
@@ -386,7 +386,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
bool trim = p_options["edit/trim"];
- if (trim && (loop_mode != AudioStreamSample::LOOP_DISABLED) && format_channels > 0) {
+ if (trim && (loop_mode != AudioStreamWAV::LOOP_DISABLED) && format_channels > 0) {
int first = 0;
int last = (frames / format_channels) - 1;
bool found = false;
@@ -431,7 +431,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
if (import_loop_mode >= 2) {
- loop_mode = (AudioStreamSample::LoopMode)(import_loop_mode - 1);
+ loop_mode = (AudioStreamWAV::LoopMode)(import_loop_mode - 1);
loop_begin = p_options["edit/loop_begin"];
loop_end = p_options["edit/loop_end"];
// Wrap around to max frames, so `-1` can be used to select the end, etc.
@@ -463,10 +463,10 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
Vector<uint8_t> dst_data;
- AudioStreamSample::Format dst_format;
+ AudioStreamWAV::Format dst_format;
if (compression == 1) {
- dst_format = AudioStreamSample::FORMAT_IMA_ADPCM;
+ dst_format = AudioStreamWAV::FORMAT_IMA_ADPCM;
if (format_channels == 1) {
_compress_ima_adpcm(data, dst_data);
} else {
@@ -503,7 +503,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
} else {
- dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS;
+ dst_format = is16 ? AudioStreamWAV::FORMAT_16_BITS : AudioStreamWAV::FORMAT_8_BITS;
dst_data.resize(data.size() * (is16 ? 2 : 1));
{
uint8_t *w = dst_data.ptrw();
@@ -521,7 +521,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
}
}
- Ref<AudioStreamSample> sample;
+ Ref<AudioStreamWAV> sample;
sample.instantiate();
sample->set_data(dst_data);
sample->set_format(dst_format);
@@ -531,7 +531,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
sample->set_loop_end(loop_end);
sample->set_stereo(format_channels == 2);
- ResourceSaver::save(p_save_path + ".sample", sample);
+ ResourceSaver::save(sample, p_save_path + ".sample");
return OK;
}
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index 0e2967dc42..6c12464b5a 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -35,6 +35,7 @@
#include "editor/editor_inspector.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/animation/animation_player.h"
#include "scene/resources/importer_mesh.h"
@@ -502,7 +503,7 @@ void SceneImportSettings::_update_camera() {
Transform3D xf;
xf.basis = Basis(Vector3(1, 0, 0), rot_x) * Basis(Vector3(0, 1, 0), rot_y);
xf.origin = center;
- xf.translate(0, 0, camera_size);
+ xf.translate_local(0, 0, camera_size);
camera->set_transform(xf);
}
@@ -1184,7 +1185,7 @@ void SceneImportSettings::_save_dir_confirm() {
ERR_CONTINUE(!material_map.has(id));
MaterialData &md = material_map[id];
- Error err = ResourceSaver::save(path, md.material);
+ Error err = ResourceSaver::save(md.material, path);
if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Can't make material external to file, write error:") + "\n\t" + path);
continue;
diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp
index 9d96822aef..a70f5225e9 100644
--- a/editor/import_defaults_editor.cpp
+++ b/editor/import_defaults_editor.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_autoload_settings.h"
#include "editor/editor_plugin_settings.h"
#include "editor/editor_sectioned_inspector.h"
+#include "editor/editor_settings.h"
#include "editor/localization_editor.h"
#include "editor/shader_globals_editor.h"
#include "scene/gui/center_container.h"
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index f9e5885f9d..087ef48b56 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -34,6 +34,7 @@
#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
class ImportDockParameters : public Object {
GDCLASS(ImportDockParameters, Object);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index a509cf3d8f..79d94246ad 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -33,6 +33,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
InspectorDock *InspectorDock::singleton = nullptr;
@@ -64,6 +65,9 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
case COLLAPSE_ALL: {
_menu_collapseall();
} break;
+ case EXPAND_REVERTABLE: {
+ _menu_expand_revertable();
+ } break;
case RESOURCE_SAVE: {
_save_resource(false);
@@ -400,6 +404,10 @@ void InspectorDock::_menu_expandall() {
inspector->expand_all_folding();
}
+void InspectorDock::_menu_expand_revertable() {
+ inspector->expand_revertable();
+}
+
void InspectorDock::_warning_pressed() {
warning_dialog->popup_centered();
}
@@ -453,6 +461,9 @@ void InspectorDock::_bind_methods() {
ClassDB::bind_method("edit_resource", &InspectorDock::edit_resource);
+ ClassDB::bind_method("store_script_properties", &InspectorDock::store_script_properties);
+ ClassDB::bind_method("apply_script_properties", &InspectorDock::apply_script_properties);
+
ADD_SIGNAL(MethodInfo("request_help"));
}
@@ -515,6 +526,8 @@ void InspectorDock::update(Object *p_object) {
p->clear();
p->add_icon_shortcut(get_theme_icon(SNAME("GuiTreeArrowDown"), SNAME("EditorIcons")), ED_SHORTCUT("property_editor/expand_all", TTR("Expand All")), EXPAND_ALL);
p->add_icon_shortcut(get_theme_icon(SNAME("GuiTreeArrowRight"), SNAME("EditorIcons")), ED_SHORTCUT("property_editor/collapse_all", TTR("Collapse All")), COLLAPSE_ALL);
+ // Calling it 'revertable' internally, because that's what the implementation is based on, but labeling it as 'non-default' because that's more user friendly, even if not 100% accurate.
+ p->add_shortcut(ED_SHORTCUT("property_editor/expand_revertable", TTR("Expand Non-Default")), EXPAND_REVERTABLE);
p->add_separator(TTR("Property Name Style"));
p->add_radio_check_item(TTR("Raw"), PROPERTY_NAME_STYLE_RAW);
@@ -565,6 +578,31 @@ EditorPropertyNameProcessor::Style InspectorDock::get_property_name_style() cons
return property_name_style;
}
+void InspectorDock::store_script_properties(Object *p_object) {
+ ERR_FAIL_NULL(p_object);
+ ScriptInstance *si = p_object->get_script_instance();
+ if (!si) {
+ return;
+ }
+ si->get_property_state(stored_properties);
+}
+
+void InspectorDock::apply_script_properties(Object *p_object) {
+ ERR_FAIL_NULL(p_object);
+ ScriptInstance *si = p_object->get_script_instance();
+ if (!si) {
+ return;
+ }
+
+ for (const Pair<StringName, Variant> &E : stored_properties) {
+ Variant current;
+ if (si->get(E.first, current) && current.get_type() == E.second.get_type()) {
+ si->set(E.first, E.second);
+ }
+ }
+ stored_properties.clear();
+}
+
InspectorDock::InspectorDock(EditorData &p_editor_data) {
singleton = this;
set_name("Inspector");
@@ -645,7 +683,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
open_docs_button->set_tooltip(TTR("Open documentation for this object."));
open_docs_button->set_shortcut(ED_SHORTCUT("property_editor/open_help", TTR("Open Documentation")));
subresource_hb->add_child(open_docs_button);
- open_docs_button->connect("pressed", callable_mp(this, &InspectorDock::_menu_option), varray(OBJECT_REQUEST_HELP));
+ open_docs_button->connect("pressed", callable_mp(this, &InspectorDock::_menu_option).bind(OBJECT_REQUEST_HELP));
new_resource_dialog = memnew(CreateDialog);
EditorNode::get_singleton()->get_gui_base()->add_child(new_resource_dialog);
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 536852c0f2..e32410151f 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -61,6 +61,7 @@ class InspectorDock : public VBoxContainer {
COLLAPSE_ALL,
EXPAND_ALL,
+ EXPAND_REVERTABLE,
// Matches `EditorPropertyNameProcessor::Style`.
PROPERTY_NAME_STYLE_RAW,
@@ -100,6 +101,7 @@ class InspectorDock : public VBoxContainer {
Tree *unique_resources_list_tree = nullptr;
EditorPropertyNameProcessor::Style property_name_style;
+ List<Pair<StringName, Variant>> stored_properties;
void _prepare_menu();
void _menu_option(int p_option);
@@ -123,6 +125,7 @@ class InspectorDock : public VBoxContainer {
void _edit_back();
void _menu_collapseall();
void _menu_expandall();
+ void _menu_expand_revertable();
void _select_history(int p_idx);
void _prepare_history();
@@ -149,6 +152,9 @@ public:
EditorPropertyNameProcessor::Style get_property_name_style() const;
+ void store_script_properties(Object *p_object);
+ void apply_script_properties(Object *p_object);
+
InspectorDock(EditorData &p_editor_data);
~InspectorDock();
};
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 7061204832..6d323572e6 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -81,8 +81,8 @@ void PluginConfigDialog::_on_confirmed() {
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);
- ResourceSaver::save(script_path, script);
+ script->set_path(script_path, true);
+ ResourceSaver::save(script);
emit_signal(SNAME("plugin_ready"), script.ptr(), active_edit->is_pressed() ? _to_absolute_plugin_path(_get_subfolder()) : "");
} else {
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index a5ca55f6df..cb77cd78bf 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -35,6 +35,8 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "scene/gui/separator.h"
bool AbstractPolygon2DEditor::Vertex::operator==(const AbstractPolygon2DEditor::Vertex &p_vertex) const {
return polygon == p_vertex.polygon && vertex == p_vertex.vertex;
@@ -716,19 +718,19 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
button_create = memnew(Button);
button_create->set_flat(true);
add_child(button_create);
- button_create->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_CREATE));
+ button_create->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(Button);
button_edit->set_flat(true);
add_child(button_edit);
- button_edit->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_EDIT));
+ button_edit->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_EDIT));
button_edit->set_toggle_mode(true);
button_delete = memnew(Button);
button_delete->set_flat(true);
add_child(button_delete);
- button_delete->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option), varray(MODE_DELETE));
+ button_delete->connect("pressed", callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_DELETE));
button_delete->set_toggle_mode(true);
create_resource = memnew(ConfirmationDialog);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index d397c6da67..32d97c65a9 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -34,6 +34,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/animation/animation_blend_tree.h"
StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
@@ -612,7 +613,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(3));
+ tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(3));
tool_select = memnew(Button);
tool_select->set_flat(true);
@@ -620,7 +621,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(0));
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(0));
tool_create = memnew(Button);
tool_create->set_flat(true);
@@ -628,7 +629,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch), varray(1));
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(1));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
@@ -675,7 +676,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), varray(), CONNECT_DEFERRED);
+ open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_open_editor), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index 3488b4bf30..9b06f3248f 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -33,11 +33,11 @@
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
-#include "editor/property_editor.h"
#include "scene/animation/animation_blend_space_1d.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/popup.h"
+#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 51aaa4f010..dc764725dd 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/menu_button.h"
@@ -832,7 +833,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
top_hb->add_child(tool_blend);
tool_blend->set_pressed(true);
tool_blend->set_tooltip(TTR("Set the blending position within the space"));
- tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(3));
+ tool_blend->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(3));
tool_select = memnew(Button);
tool_select->set_flat(true);
@@ -840,7 +841,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
tool_select->set_button_group(bg);
top_hb->add_child(tool_select);
tool_select->set_tooltip(TTR("Select and move points, create points with RMB."));
- tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(0));
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(0));
tool_create = memnew(Button);
tool_create->set_flat(true);
@@ -848,7 +849,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
tool_create->set_button_group(bg);
top_hb->add_child(tool_create);
tool_create->set_tooltip(TTR("Create points."));
- tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(1));
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(1));
tool_triangle = memnew(Button);
tool_triangle->set_flat(true);
@@ -856,7 +857,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
tool_triangle->set_button_group(bg);
top_hb->add_child(tool_triangle);
tool_triangle->set_tooltip(TTR("Create triangles by connecting points."));
- tool_triangle->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch), varray(2));
+ tool_triangle->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(2));
tool_erase_sep = memnew(VSeparator);
top_hb->add_child(tool_erase_sep);
@@ -933,7 +934,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
open_editor = memnew(Button);
edit_hb->add_child(open_editor);
open_editor->set_text(TTR("Open Editor"));
- open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_open_editor), varray(), CONNECT_DEFERRED);
+ open_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_open_editor), CONNECT_DEFERRED);
edit_hb->hide();
open_editor->hide();
diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h
index 88b9072599..26471df051 100644
--- a/editor/plugins/animation_blend_space_2d_editor.h
+++ b/editor/plugins/animation_blend_space_2d_editor.h
@@ -33,11 +33,11 @@
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
-#include "editor/property_editor.h"
#include "scene/animation/animation_blend_space_2d.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/popup.h"
+#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 5e703cf814..79be2d04b3 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_inspector.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
@@ -147,11 +148,11 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
name->set_expand_to_text_length_enabled(true);
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, 0, get_theme_color(SNAME("font_color"), SNAME("Label")));
- name->connect("text_submitted", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed), varray(agnode), CONNECT_DEFERRED);
- name->connect("focus_exited", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_renamed_focus_out), varray(name, agnode), CONNECT_DEFERRED);
+ 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);
base = 1;
node->set_show_close_button(true);
- node->connect("close_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_request), varray(E), CONNECT_DEFERRED);
+ node->connect("close_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_request).bind(E), CONNECT_DEFERRED);
}
for (int i = 0; i < agnode->get_input_count(); i++) {
@@ -179,7 +180,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
}
}
- node->connect("dragged", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_dragged), varray(E));
+ node->connect("dragged", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_dragged).bind(E));
if (AnimationTreeEditor::get_singleton()->can_edit(agnode)) {
node->add_child(memnew(HSeparator));
@@ -187,7 +188,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
open_in_editor->set_text(TTR("Open Editor"));
open_in_editor->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")));
node->add_child(open_in_editor);
- open_in_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor), varray(E), CONNECT_DEFERRED);
+ open_in_editor->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor).bind(E), CONNECT_DEFERRED);
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -197,7 +198,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
edit_filters->set_text(TTR("Edit Filters"));
edit_filters->set_icon(get_theme_icon(SNAME("AnimationFilter"), SNAME("EditorIcons")));
node->add_child(edit_filters);
- edit_filters->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_edit_filters), varray(E), CONNECT_DEFERRED);
+ edit_filters->connect("pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_edit_filters).bind(E), CONNECT_DEFERRED);
edit_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
}
@@ -236,7 +237,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
animations[E] = pb;
node->add_child(pb);
- mb->get_popup()->connect("index_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_anim_selected), varray(options, E), CONNECT_DEFERRED);
+ mb->get_popup()->connect("index_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_anim_selected).bind(options, E), CONNECT_DEFERRED);
}
Ref<StyleBoxFlat> sb = node->get_theme_stylebox(SNAME("frame"), SNAME("GraphNode"));
@@ -961,8 +962,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->add_valid_right_disconnect_type(0);
graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_request), varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_disconnection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("connection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_request), CONNECT_DEFERRED);
+ graph->connect("disconnection_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_disconnection_request), CONNECT_DEFERRED);
graph->connect("node_selected", callable_mp(this, &AnimationNodeBlendTreeEditor::_node_selected));
graph->connect("scroll_offset_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_scroll_changed));
graph->connect("delete_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_nodes_request));
@@ -983,7 +984,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->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu), varray(false));
+ add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false));
add_options.push_back(AddOption("Animation", "AnimationNodeAnimation"));
add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot", 2));
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index b5bf91a1da..18199676b8 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -33,7 +33,6 @@
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
-#include "editor/property_editor.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index f493c4515c..57203ec147 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1633,7 +1633,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
onion_toggle->set_flat(true);
onion_toggle->set_toggle_mode(true);
onion_toggle->set_tooltip(TTR("Enable Onion Skinning"));
- onion_toggle->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu), varray(ONION_SKINNING_ENABLE));
+ onion_toggle->connect("pressed", callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
hb->add_child(onion_toggle);
onion_skinning = memnew(MenuButton);
@@ -1720,7 +1720,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
animation->connect("item_selected", callable_mp(this, &AnimationPlayerEditor::_animation_selected));
- frame->connect("value_changed", callable_mp(this, &AnimationPlayerEditor::_seek_value_changed), make_binds(true, false));
+ frame->connect("value_changed", callable_mp(this, &AnimationPlayerEditor::_seek_value_changed).bind(true, false));
scale->connect("text_submitted", callable_mp(this, &AnimationPlayerEditor::_scale_changed));
last_active = false;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 1258b9a03c..473450b292 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/menu_button.h"
@@ -1018,7 +1019,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
anim->set_animation(animations_to_add[p_index]);
- String base_name = animations_to_add[p_index];
+ String base_name = animations_to_add[p_index].validate_node_name();
int base = 1;
String name = base_name;
while (state_machine->has_node(name)) {
@@ -1899,7 +1900,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_select->set_button_group(bg);
tool_select->set_pressed(true);
tool_select->set_tooltip(TTR("Select and move nodes.\nRMB: Add node at position clicked.\nShift+LMB+Drag: Connects the selected node with another node or creates a new node if you select an area without nodes."));
- tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
+ tool_select->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
tool_create = memnew(Button);
tool_create->set_flat(true);
@@ -1907,7 +1908,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_create->set_toggle_mode(true);
tool_create->set_button_group(bg);
tool_create->set_tooltip(TTR("Create new nodes."));
- tool_create->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
+ tool_create->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
tool_connect = memnew(Button);
tool_connect->set_flat(true);
@@ -1915,7 +1916,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_connect->set_toggle_mode(true);
tool_connect->set_button_group(bg);
tool_connect->set_tooltip(TTR("Connect nodes."));
- tool_connect->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), varray(), CONNECT_DEFERRED);
+ tool_connect->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
tool_erase_hb = memnew(HBoxContainer);
top_hb->add_child(tool_erase_hb);
@@ -1938,7 +1939,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
tool_erase = memnew(Button);
tool_erase->set_flat(true);
tool_erase->set_tooltip(TTR("Remove selected node or transition."));
- tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected), varray(false));
+ tool_erase->connect("pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected).bind(false));
tool_erase->set_disabled(true);
tool_erase_hb->add_child(tool_erase);
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index ea16abd64c..165940e639 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -33,7 +33,6 @@
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
-#include "editor/property_editor.h"
#include "scene/animation/animation_node_state_machine.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 7ea6906d72..bce4c9de8e 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -86,7 +86,7 @@ void AnimationTreeEditor::_update_path() {
b->set_button_group(group);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed), varray(-1));
+ b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(-1));
path_hb->add_child(b);
for (int i = 0; i < button_path.size(); i++) {
b = memnew(Button);
@@ -96,7 +96,7 @@ void AnimationTreeEditor::_update_path() {
path_hb->add_child(b);
b->set_pressed(true);
b->set_focus_mode(FOCUS_NONE);
- b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed), varray(i));
+ b->connect("pressed", callable_mp(this, &AnimationTreeEditor::_path_button_pressed).bind(i));
}
}
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index ab4ef5a001..a33d97f62f 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -32,7 +32,6 @@
#define ANIMATION_TREE_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "editor/property_editor.h"
#include "scene/animation/animation_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index bb393c652d..8ee162d085 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -253,7 +253,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
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), varray(p_id));
+ preview.button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
preview_hb->add_child(preview.button);
if (!p_video) {
preview.image = previews->get_theme_icon(SNAME("ThumbnailWait"), SNAME("EditorIcons"));
@@ -887,7 +887,7 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag
iq.queue_id = ++last_queue_id;
iq.active = false;
- iq.request->connect("request_completed", callable_mp(this, &EditorAssetLibrary::_image_request_completed), varray(iq.queue_id));
+ iq.request->connect("request_completed", callable_mp(this, &EditorAssetLibrary::_image_request_completed).bind(iq.queue_id));
image_queue[iq.queue_id] = iq;
@@ -1006,7 +1006,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *first = memnew(Button);
first->set_text(TTR("First", "Pagination"));
if (p_page != 0) {
- first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(0));
+ first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(0));
} else {
first->set_disabled(true);
first->set_focus_mode(Control::FOCUS_NONE);
@@ -1016,7 +1016,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *prev = memnew(Button);
prev->set_text(TTR("Previous", "Pagination"));
if (p_page > 0) {
- prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page - 1));
+ prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page - 1));
} else {
prev->set_disabled(true);
prev->set_focus_mode(Control::FOCUS_NONE);
@@ -1037,7 +1037,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *current = memnew(Button);
// Add padding to make page number buttons easier to click.
current->set_text(vformat(" %d ", i + 1));
- current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(i));
+ current->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(i));
hbc->add_child(current);
}
@@ -1046,7 +1046,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *next = memnew(Button);
next->set_text(TTR("Next", "Pagination"));
if (p_page < p_page_count - 1) {
- next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page + 1));
+ next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page + 1));
} else {
next->set_disabled(true);
next->set_focus_mode(Control::FOCUS_NONE);
@@ -1057,7 +1057,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
Button *last = memnew(Button);
last->set_text(TTR("Last", "Pagination"));
if (p_page != p_page_count - 1) {
- last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page_count - 1));
+ last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search).bind(p_page_count - 1));
} else {
last->set_disabled(true);
last->set_focus_mode(Control::FOCUS_NONE);
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index 967a95be9d..70775c1ee2 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "editor/editor_scale.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"
void BoneMapperButton::fetch_textures() {
@@ -64,6 +65,9 @@ void BoneMapperButton::set_state(BoneMapState p_state) {
case BONE_MAP_STATE_SET: {
circle->set_modulate(EditorSettings::get_singleton()->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"));
+ } break;
case BONE_MAP_STATE_ERROR: {
circle->set_modulate(EditorSettings::get_singleton()->get("editors/bone_mapper/handle_colors/error"));
} break;
@@ -258,7 +262,7 @@ void BoneMapper::recreate_editor() {
for (int i = 0; i < len; i++) {
if (profile->get_group(i) == profile->get_group_name(current_group_idx)) {
BoneMapperButton *mb = memnew(BoneMapperButton(profile->get_bone_name(i), profile->is_require(i), current_bone_idx == i));
- mb->connect("pressed", callable_mp(this, &BoneMapper::set_current_bone_idx), varray(i), CONNECT_DEFERRED);
+ mb->connect("pressed", callable_mp(this, &BoneMapper::set_current_bone_idx).bind(i), CONNECT_DEFERRED);
mb->set_h_grow_direction(GROW_DIRECTION_BOTH);
mb->set_v_grow_direction(GROW_DIRECTION_BOTH);
Vector2 vc = profile->get_handle_offset(i);
@@ -310,16 +314,48 @@ void BoneMapper::recreate_items() {
void BoneMapper::_update_state() {
int len = bone_mapper_buttons.size();
for (int i = 0; i < len; i++) {
- StringName sbn = bone_map->get_skeleton_bone_name(bone_mapper_buttons[i]->get_profile_bone_name());
- if (skeleton->find_bone(sbn) >= 0) {
+ StringName pbn = bone_mapper_buttons[i]->get_profile_bone_name();
+ StringName sbn = bone_map->get_skeleton_bone_name(pbn);
+ int bone_idx = skeleton->find_bone(sbn);
+ if (bone_idx >= 0) {
if (bone_map->get_skeleton_bone_name_count(sbn) == 1) {
- bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_SET);
+ Ref<SkeletonProfile> prof = bone_map->get_profile();
+
+ StringName parent_name = prof->get_bone_parent(prof->find_bone(pbn));
+ Vector<int> prof_parent_bones;
+ while (parent_name != StringName()) {
+ prof_parent_bones.push_back(skeleton->find_bone(bone_map->get_skeleton_bone_name(parent_name)));
+ if (prof->find_bone(parent_name) == -1) {
+ break;
+ }
+ parent_name = prof->get_bone_parent(prof->find_bone(parent_name));
+ }
+
+ int parent_id = skeleton->get_bone_parent(bone_idx);
+ Vector<int> skel_parent_bones;
+ while (parent_id >= 0) {
+ skel_parent_bones.push_back(parent_id);
+ parent_id = skeleton->get_bone_parent(parent_id);
+ }
+
+ bool is_broken = false;
+ for (int j = 0; j < prof_parent_bones.size(); j++) {
+ if (prof_parent_bones[j] != -1 && !skel_parent_bones.has(prof_parent_bones[j])) {
+ is_broken = true;
+ }
+ }
+
+ if (is_broken) {
+ bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_ERROR);
+ } else {
+ bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_SET);
+ }
} else {
bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_ERROR);
}
} else {
if (bone_mapper_buttons[i]->is_require()) {
- bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_ERROR);
+ bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_MISSING);
} else {
bone_mapper_buttons[i]->set_state(BoneMapperButton::BONE_MAP_STATE_UNSET);
}
@@ -379,11 +415,15 @@ 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".
SceneImportSettings *si = SceneImportSettings::get_singleton();
if (!si) {
return;
}
+ if (!si->is_visible()) {
+ return;
+ }
Node *selected = si->get_selected_node();
if (selected) {
Skeleton3D *sk = Object::cast_to<Skeleton3D>(selected);
@@ -404,11 +444,11 @@ void BoneMapEditor::_notification(int p_what) {
create_editors();
} break;
case NOTIFICATION_EXIT_TREE: {
- if (!bone_mapper) {
- return;
+ if (bone_mapper) {
+ remove_child(bone_mapper);
+ bone_mapper->queue_delete();
}
- remove_child(bone_mapper);
- bone_mapper->queue_delete();
+ skeleton = nullptr;
} break;
}
}
@@ -436,14 +476,19 @@ void EditorInspectorPluginBoneMap::parse_begin(Object *p_object) {
BoneMapEditorPlugin::BoneMapEditorPlugin() {
// Register properties in editor settings.
+ EDITOR_DEF("editors/bone_mapper/handle_colors/unset", Color(0.3, 0.3, 0.3));
EDITOR_DEF("editors/bone_mapper/handle_colors/set", Color(0.1, 0.6, 0.25));
+ EDITOR_DEF("editors/bone_mapper/handle_colors/missing", Color(0.8, 0.2, 0.8));
EDITOR_DEF("editors/bone_mapper/handle_colors/error", Color(0.8, 0.2, 0.2));
- EDITOR_DEF("editors/bone_mapper/handle_colors/unset", Color(0.3, 0.3, 0.3));
Ref<EditorInspectorPluginBoneMap> inspector_plugin;
inspector_plugin.instantiate();
add_inspector_plugin(inspector_plugin);
+ Ref<PostImportPluginSkeletonTrackOrganizer> post_import_plugin_track_organizer;
+ post_import_plugin_track_organizer.instantiate();
+ add_scene_post_import_plugin(post_import_plugin_track_organizer);
+
Ref<PostImportPluginSkeletonRenamer> post_import_plugin_renamer;
post_import_plugin_renamer.instantiate();
add_scene_post_import_plugin(post_import_plugin_renamer);
diff --git a/editor/plugins/bone_map_editor_plugin.h b/editor/plugins/bone_map_editor_plugin.h
index 79fb47505b..339547ea10 100644
--- a/editor/plugins/bone_map_editor_plugin.h
+++ b/editor/plugins/bone_map_editor_plugin.h
@@ -47,6 +47,7 @@ public:
enum BoneMapState {
BONE_MAP_STATE_UNSET,
BONE_MAP_STATE_SET,
+ BONE_MAP_STATE_MISSING,
BONE_MAP_STATE_ERROR
};
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 82772178e0..964570e1bd 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2793,10 +2793,10 @@ void CanvasItemEditor::_draw_rulers() {
if (grid_snap_active || _is_grid_visible()) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (snap_relative && selection.size() > 0) {
- ruler_transform.translate(_get_encompassing_rect_from_list(selection).position);
+ ruler_transform.translate_local(_get_encompassing_rect_from_list(selection).position);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
} else {
- ruler_transform.translate(grid_offset);
+ ruler_transform.translate_local(grid_offset);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
}
while ((transform * ruler_transform).get_scale().x < 50 || (transform * ruler_transform).get_scale().y < 50) {
@@ -4977,8 +4977,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"), make_binds(true));
- EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", Callable(this, "_update_override_camera_button"), make_binds(false));
+ 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));
// A fluid container for all toolbars.
HFlowContainer *main_flow = memnew(HFlowContainer);
@@ -5072,7 +5072,7 @@ CanvasItemEditor::CanvasItemEditor() {
select_button->set_flat(true);
main_menu_hbox->add_child(select_button);
select_button->set_toggle_mode(true);
- select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SELECT));
+ select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SELECT));
select_button->set_pressed(true);
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), Key::Q));
select_button->set_shortcut_context(this);
@@ -5084,7 +5084,7 @@ CanvasItemEditor::CanvasItemEditor() {
move_button->set_flat(true);
main_menu_hbox->add_child(move_button);
move_button->set_toggle_mode(true);
- move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_MOVE));
+ move_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_MOVE));
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), Key::W));
move_button->set_shortcut_context(this);
move_button->set_tooltip(TTR("Move Mode"));
@@ -5093,7 +5093,7 @@ CanvasItemEditor::CanvasItemEditor() {
rotate_button->set_flat(true);
main_menu_hbox->add_child(rotate_button);
rotate_button->set_toggle_mode(true);
- rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_ROTATE));
+ rotate_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_ROTATE));
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), Key::E));
rotate_button->set_shortcut_context(this);
rotate_button->set_tooltip(TTR("Rotate Mode"));
@@ -5102,7 +5102,7 @@ CanvasItemEditor::CanvasItemEditor() {
scale_button->set_flat(true);
main_menu_hbox->add_child(scale_button);
scale_button->set_toggle_mode(true);
- scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_SCALE));
+ scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SCALE));
scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTR("Scale Mode"), Key::S));
scale_button->set_shortcut_context(this);
scale_button->set_tooltip(TTR("Shift: Scale proportionally."));
@@ -5113,21 +5113,21 @@ CanvasItemEditor::CanvasItemEditor() {
list_select_button->set_flat(true);
main_menu_hbox->add_child(list_select_button);
list_select_button->set_toggle_mode(true);
- list_select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_LIST_SELECT));
+ list_select_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_LIST_SELECT));
list_select_button->set_tooltip(TTR("Show list of selectable nodes at position clicked."));
pivot_button = memnew(Button);
pivot_button->set_flat(true);
main_menu_hbox->add_child(pivot_button);
pivot_button->set_toggle_mode(true);
- pivot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_EDIT_PIVOT));
+ pivot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_EDIT_PIVOT));
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot."));
pan_button = memnew(Button);
pan_button->set_flat(true);
main_menu_hbox->add_child(pan_button);
pan_button->set_toggle_mode(true);
- pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_PAN));
+ pan_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_PAN));
pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTR("Pan Mode"), Key::G));
pan_button->set_shortcut_context(this);
pan_button->set_tooltip(TTR("You can also use Pan View shortcut (Space by default) to pan in any mode."));
@@ -5136,7 +5136,7 @@ CanvasItemEditor::CanvasItemEditor() {
ruler_button->set_flat(true);
main_menu_hbox->add_child(ruler_button);
ruler_button->set_toggle_mode(true);
- ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select), make_binds(TOOL_RULER));
+ ruler_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_RULER));
ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTR("Ruler Mode"), Key::R));
ruler_button->set_shortcut_context(this);
ruler_button->set_tooltip(TTR("Ruler Mode"));
@@ -5198,7 +5198,7 @@ CanvasItemEditor::CanvasItemEditor() {
lock_button->set_flat(true);
main_menu_hbox->add_child(lock_button);
- lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(LOCK_SELECTED));
+ lock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(LOCK_SELECTED));
lock_button->set_tooltip(TTR("Lock selected node, preventing selection and movement."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
lock_button->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD | Key::L));
@@ -5206,7 +5206,7 @@ CanvasItemEditor::CanvasItemEditor() {
unlock_button = memnew(Button);
unlock_button->set_flat(true);
main_menu_hbox->add_child(unlock_button);
- unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNLOCK_SELECTED));
+ unlock_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNLOCK_SELECTED));
unlock_button->set_tooltip(TTR("Unlock selected node, allowing selection and movement."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
unlock_button->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::L));
@@ -5214,7 +5214,7 @@ CanvasItemEditor::CanvasItemEditor() {
group_button = memnew(Button);
group_button->set_flat(true);
main_menu_hbox->add_child(group_button);
- group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(GROUP_SELECTED));
+ group_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(GROUP_SELECTED));
group_button->set_tooltip(TTR("Makes sure the object's children are not selectable."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD | Key::G));
@@ -5222,7 +5222,7 @@ CanvasItemEditor::CanvasItemEditor() {
ungroup_button = memnew(Button);
ungroup_button->set_flat(true);
main_menu_hbox->add_child(ungroup_button);
- ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(UNGROUP_SELECTED));
+ ungroup_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNGROUP_SELECTED));
ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::G));
@@ -5311,7 +5311,7 @@ CanvasItemEditor::CanvasItemEditor() {
key_loc_button->set_toggle_mode(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
- key_loc_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_POS));
+ key_loc_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_POS));
key_loc_button->set_tooltip(TTR("Translation mask for inserting keys."));
animation_hb->add_child(key_loc_button);
@@ -5320,7 +5320,7 @@ CanvasItemEditor::CanvasItemEditor() {
key_rot_button->set_toggle_mode(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
- key_rot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_ROT));
+ key_rot_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_ROT));
key_rot_button->set_tooltip(TTR("Rotation mask for inserting keys."));
animation_hb->add_child(key_rot_button);
@@ -5328,14 +5328,14 @@ CanvasItemEditor::CanvasItemEditor() {
key_scale_button->set_flat(true);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
- key_scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_SCALE));
+ key_scale_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_SCALE));
key_scale_button->set_tooltip(TTR("Scale mask for inserting keys."));
animation_hb->add_child(key_scale_button);
key_insert_button = memnew(Button);
key_insert_button->set_flat(true);
key_insert_button->set_focus_mode(FOCUS_NONE);
- key_insert_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback), varray(ANIM_INSERT_KEY));
+ key_insert_button->connect("pressed", callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_KEY));
key_insert_button->set_tooltip(TTR("Insert keys (based on mask)."));
key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTR("Insert Key"), Key::INSERT));
key_insert_button->set_shortcut_context(this);
@@ -5376,7 +5376,7 @@ CanvasItemEditor::CanvasItemEditor() {
add_child(selection_menu);
selection_menu->set_min_size(Vector2(100, 0));
selection_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
- selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), varray(), CONNECT_DEFERRED);
+ selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), CONNECT_DEFERRED);
add_node_menu = memnew(PopupMenu);
add_child(add_node_menu);
@@ -5915,7 +5915,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
CheckBox *check = memnew(CheckBox);
btn_group->add_child(check);
check->set_text(texture_node_types[i]);
- check->connect("button_down", callable_mp(this, &CanvasItemEditorViewport::_on_select_type), varray(check));
+ check->connect("button_down", callable_mp(this, &CanvasItemEditorViewport::_on_select_type).bind(check));
check->set_button_group(button_group);
}
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 5b368de3cc..04fd819dec 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -214,8 +214,8 @@ private:
int primary_grid_steps = 8;
int grid_step_multiplier = 0;
- real_t snap_rotation_step = 0.0;
- real_t snap_rotation_offset = Math::deg2rad(15.0);
+ real_t snap_rotation_step = Math::deg2rad(15.0);
+ real_t snap_rotation_offset = 0.0;
real_t snap_scale_step = 0.1f;
bool smart_snap_active = false;
bool grid_snap_active = false;
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index ec038174fc..2756e45cf4 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -31,7 +31,9 @@
#include "control_editor_plugin.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
+#include "scene/gui/separator.h"
void ControlPositioningWarning::_update_warning() {
if (!control_node) {
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 66e58339ed..8aeab684e3 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -36,6 +36,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
CurveEditor::CurveEditor() {
_selected_point = -1;
@@ -542,11 +543,11 @@ void CurveEditor::update_view_transform() {
const Vector2 scale = view_size / world_rect.size;
Transform2D world_trans;
- world_trans.translate(-world_rect.position - Vector2(0, world_rect.size.y));
+ world_trans.translate_local(-world_rect.position - Vector2(0, world_rect.size.y));
world_trans.scale(Vector2(scale.x, -scale.y));
Transform2D view_trans;
- view_trans.translate(view_margin);
+ view_trans.translate_local(view_margin);
_world_to_view = view_trans * world_trans;
}
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index 5c90d70982..c572b5b7fe 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -35,6 +35,7 @@
#include "editor/debugger/editor_debugger_server.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/fileserver/editor_file_server.h"
#include "editor/plugins/script_editor_plugin.h"
#include "scene/gui/menu_button.h"
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 6b632101d3..0196214ceb 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -307,7 +307,7 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const Ref<Resource> &p_from
if (material->get_shader_mode() == Shader::MODE_SPATIAL) {
RS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid());
- RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMaterialPreviewPlugin *>(this), &EditorMaterialPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT);
preview_done.wait();
@@ -702,7 +702,7 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const Ref<Resource> &p_from, co
xform.origin.z -= rot_aabb.size.z * 2;
RS::get_singleton()->instance_set_transform(mesh_instance, xform);
- RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorMeshPreviewPlugin *>(this), &EditorMeshPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT);
preview_done.wait();
@@ -812,7 +812,7 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path,
const float fg = c.get_luminance() < 0.5 ? 1.0 : 0.0;
sampled_font->draw_string(canvas_item, pos, sample, HORIZONTAL_ALIGNMENT_LEFT, -1.f, 50, Color(fg, fg, fg));
- RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<EditorFontPreviewPlugin *>(this), &EditorFontPreviewPlugin::_generate_frame_started), Object::CONNECT_ONESHOT);
preview_done.wait();
diff --git a/core/multiplayer/multiplayer.h b/editor/plugins/editor_resource_conversion_plugin.cpp
index f4c965b0f8..91394dbac7 100644
--- a/core/multiplayer/multiplayer.h
+++ b/editor/plugins/editor_resource_conversion_plugin.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* multiplayer.h */
+/* editor_resource_conversion_plugin.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,53 +28,37 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef MULTIPLAYER_H
-#define MULTIPLAYER_H
+#include "editor_resource_conversion_plugin.h"
-#include "core/variant/binder_common.h"
+void EditorResourceConversionPlugin::_bind_methods() {
+ GDVIRTUAL_BIND(_converts_to);
+ GDVIRTUAL_BIND(_handles, "resource");
+ GDVIRTUAL_BIND(_convert, "resource");
+}
-#include "core/string/string_name.h"
-
-namespace Multiplayer {
-
-enum TransferMode {
- TRANSFER_MODE_UNRELIABLE,
- TRANSFER_MODE_UNRELIABLE_ORDERED,
- TRANSFER_MODE_RELIABLE
-};
-
-enum RPCMode {
- RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default)
- RPC_MODE_ANY_PEER, // Any peer can call this RPC
- RPC_MODE_AUTHORITY, // Only the node's multiplayer authority (server by default) can call this RPC
-};
-
-struct RPCConfig {
- StringName name;
- RPCMode rpc_mode = RPC_MODE_DISABLED;
- bool call_local = false;
- TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
- int channel = 0;
-
- bool operator==(RPCConfig const &p_other) const {
- return name == p_other.name;
+String EditorResourceConversionPlugin::converts_to() const {
+ String ret;
+ if (GDVIRTUAL_CALL(_converts_to, ret)) {
+ return ret;
}
-};
-struct SortRPCConfig {
- StringName::AlphCompare compare;
- bool operator()(const RPCConfig &p_a, const RPCConfig &p_b) const {
- return compare(p_a.name, p_b.name);
- }
-};
+ return "";
+}
-}; // namespace Multiplayer
+bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
+ bool ret;
+ if (GDVIRTUAL_CALL(_handles, p_resource, ret)) {
+ return ret;
+ }
-// This is needed for proper docs generation (i.e. not "Multiplayer."-prefixed).
-typedef Multiplayer::RPCMode RPCMode;
-typedef Multiplayer::TransferMode TransferMode;
+ return false;
+}
-VARIANT_ENUM_CAST(RPCMode);
-VARIANT_ENUM_CAST(TransferMode);
+Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const {
+ Ref<Resource> ret;
+ if (GDVIRTUAL_CALL(_convert, p_resource, ret)) {
+ return ret;
+ }
-#endif // MULTIPLAYER_H
+ return Ref<Resource>();
+}
diff --git a/editor/plugins/editor_resource_conversion_plugin.h b/editor/plugins/editor_resource_conversion_plugin.h
new file mode 100644
index 0000000000..34b0837383
--- /dev/null
+++ b/editor/plugins/editor_resource_conversion_plugin.h
@@ -0,0 +1,54 @@
+/*************************************************************************/
+/* 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. */
+/*************************************************************************/
+
+#ifndef EDITOR_RESOURCE_CONVERSION_PLUGIN_H
+#define EDITOR_RESOURCE_CONVERSION_PLUGIN_H
+
+#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+
+class EditorResourceConversionPlugin : public RefCounted {
+ GDCLASS(EditorResourceConversionPlugin, RefCounted);
+
+protected:
+ static void _bind_methods();
+
+ GDVIRTUAL0RC(String, _converts_to)
+ GDVIRTUAL1RC(bool, _handles, Ref<Resource>)
+ GDVIRTUAL1RC(Ref<Resource>, _convert, Ref<Resource>)
+
+public:
+ virtual String converts_to() const;
+ virtual bool handles(const Ref<Resource> &p_resource) const;
+ virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const;
+};
+
+#endif // EDITOR_RESOURCE_CONVERSION_PLUGIN_H
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 848fb5887d..cadb974345 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -307,7 +307,7 @@ void EditorPropertyFontMetaOverride::update_property() {
Button *remove = memnew(Button);
remove->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
hbox->add_child(remove);
- remove->connect("pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_remove), varray(remove, name));
+ remove->connect("pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_remove).bind(remove, name));
prop->update_property();
}
@@ -783,7 +783,7 @@ void EditorPropertyOTFeatures::update_property() {
Button *remove = memnew(Button);
remove->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
hbox->add_child(remove);
- remove->connect("pressed", callable_mp(this, &EditorPropertyOTFeatures::_remove), varray(remove, name_tag));
+ remove->connect("pressed", callable_mp(this, &EditorPropertyOTFeatures::_remove).bind(remove, name_tag));
prop->update_property();
}
@@ -895,17 +895,45 @@ void FontPreview::_notification(int p_what) {
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
Color text_color = get_theme_color(SNAME("font_color"), SNAME("Label"));
- font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + 2 * EDSCALE), name, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, font_size, text_color);
// Draw font preview.
- Vector2 pos = Vector2(0, font->get_height(font_size)) + (get_size() - Vector2(0, font->get_height(font_size)) - line->get_size()) / 2;
- line->draw(get_canvas_item(), pos, text_color);
-
- // Draw font baseline.
- Color line_color = text_color;
- line_color.a *= 0.6;
- draw_line(Vector2(0, pos.y + line->get_line_ascent()), Vector2(pos.x - 5, pos.y + line->get_line_ascent()), line_color);
- draw_line(Vector2(pos.x + line->get_size().x + 5, pos.y + line->get_line_ascent()), Vector2(get_size().x, pos.y + line->get_line_ascent()), line_color);
+ bool prev_ok = true;
+ if (prev_font.is_valid()) {
+ if (prev_font->get_font_name().is_empty()) {
+ prev_ok = false;
+ } else {
+ String name;
+ if (prev_font->get_font_style_name().is_empty()) {
+ name = prev_font->get_font_name();
+ } else {
+ name = vformat("%s (%s)", prev_font->get_font_name(), prev_font->get_font_style_name());
+ }
+ if (prev_font->is_class("FontVariation")) {
+ name += " " + TTR(" - Variation");
+ }
+ font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + 2 * EDSCALE), name, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, font_size, text_color);
+
+ String sample;
+ static const String sample_base = U"12漢字ԱբΑαÐбΑα×בابÜÜ’Þ€Þआআਆઆଆஆఆಆആආà¸à¸´àºàº´à¼€á€€á‚ áƒí•œê¸€áˆ€áŽ£áášáš áœ€áœ á€á áž€á  á¤á¥Ab😀";
+ for (int i = 0; i < sample_base.length(); i++) {
+ if (prev_font->has_char(sample_base[i])) {
+ sample += sample_base[i];
+ }
+ }
+ if (sample.is_empty()) {
+ sample = prev_font->get_supported_chars().substr(0, 6);
+ }
+ if (sample.is_empty()) {
+ prev_ok = false;
+ } else {
+ prev_font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + prev_font->get_height(25 * EDSCALE)), sample, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, 25 * EDSCALE, text_color);
+ }
+ }
+ }
+ if (!prev_ok) {
+ text_color.a *= 0.5;
+ font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + 2 * EDSCALE), TTR("Unable to preview font"), HORIZONTAL_ALIGNMENT_CENTER, get_size().x, font_size, text_color);
+ }
} break;
}
}
@@ -917,30 +945,11 @@ Size2 FontPreview::get_minimum_size() const {
}
void FontPreview::set_data(const Ref<Font> &p_f) {
- line->clear();
- if (p_f.is_valid()) {
- name = vformat("%s (%s)", p_f->get_font_name(), p_f->get_font_style_name());
- if (p_f->is_class("FontVariation")) {
- name += " " + TTR(" - Variation");
- }
- String sample;
- static const String sample_base = U"12漢字ԱբΑαÐбΑα×בابÜÜ’Þ€Þआআਆઆଆஆఆಆആආà¸à¸´àºàº´à¼€á€€á‚ áƒí•œê¸€áˆ€áŽ£áášáš áœ€áœ á€á áž€á  á¤á¥Ab😀";
- for (int i = 0; i < sample_base.length(); i++) {
- if (p_f->has_char(sample_base[i])) {
- sample += sample_base[i];
- }
- }
- if (sample.is_empty()) {
- sample = p_f->get_supported_chars().substr(0, 6);
- }
- line->add_string(sample, p_f, 50);
- }
-
+ prev_font = p_f;
update();
}
FontPreview::FontPreview() {
- line.instantiate();
}
/*************************************************************************/
@@ -965,6 +974,71 @@ bool EditorInspectorPluginFontPreview::parse_property(Object *p_object, const Va
}
/*************************************************************************/
+/* EditorPropertyFontNamesArray */
+/*************************************************************************/
+
+void EditorPropertyFontNamesArray::_add_element() {
+ Size2 size = get_size();
+ menu->set_position(get_screen_position() + Size2(0, size.height * get_global_transform().get_scale().y));
+ menu->reset_size();
+ menu->popup();
+}
+
+void EditorPropertyFontNamesArray::_add_font(int p_option) {
+ if (updating) {
+ return;
+ }
+
+ Variant array = object->get_array();
+ int previous_size = array.call("size");
+
+ array.call("resize", previous_size + 1);
+ array.set(previous_size, menu->get_item_text(p_option));
+
+ emit_changed(get_edited_property(), array, "", false);
+ object->set_array(array);
+ update_property();
+}
+
+EditorPropertyFontNamesArray::EditorPropertyFontNamesArray() {
+ menu = memnew(PopupMenu);
+ menu->add_item("Sans-Serif", 0);
+ menu->add_item("Serif", 1);
+ menu->add_item("Monospace", 2);
+ menu->add_item("Fantasy", 3);
+ menu->add_item("Cursive", 4);
+
+ menu->add_separator();
+
+ if (OS::get_singleton()) {
+ Vector<String> fonts = OS::get_singleton()->get_system_fonts();
+ for (int i = 0; i < fonts.size(); i++) {
+ menu->add_item(fonts[i], i + 6);
+ }
+ }
+ add_child(menu);
+ menu->connect("id_pressed", callable_mp(this, &EditorPropertyFontNamesArray::_add_font));
+}
+
+/*************************************************************************/
+/* EditorInspectorPluginSystemFont */
+/*************************************************************************/
+
+bool EditorInspectorPluginSystemFont::can_handle(Object *p_object) {
+ return Object::cast_to<SystemFont>(p_object) != nullptr;
+}
+
+bool EditorInspectorPluginSystemFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+ if (p_path == "font_names") {
+ EditorPropertyFontNamesArray *editor = memnew(EditorPropertyFontNamesArray);
+ editor->setup(p_type, p_hint_text);
+ add_property_editor(p_path, editor);
+ return true;
+ }
+ return false;
+}
+
+/*************************************************************************/
/* FontEditorPlugin */
/*************************************************************************/
@@ -973,6 +1047,10 @@ FontEditorPlugin::FontEditorPlugin() {
fc_plugin.instantiate();
EditorInspector::add_inspector_plugin(fc_plugin);
+ Ref<EditorInspectorPluginSystemFont> fs_plugin;
+ fs_plugin.instantiate();
+ EditorInspector::add_inspector_plugin(fs_plugin);
+
Ref<EditorInspectorPluginFontPreview> fp_plugin;
fp_plugin.instantiate();
EditorInspector::add_inspector_plugin(fp_plugin);
diff --git a/editor/plugins/font_config_plugin.h b/editor/plugins/font_config_plugin.h
index 67c16bfe60..3eaa2fdc17 100644
--- a/editor/plugins/font_config_plugin.h
+++ b/editor/plugins/font_config_plugin.h
@@ -34,6 +34,7 @@
#include "core/io/marshalls.h"
#include "editor/editor_plugin.h"
#include "editor/editor_properties.h"
+#include "editor/editor_properties_array_dict.h"
/*************************************************************************/
@@ -225,8 +226,7 @@ protected:
void _notification(int p_what);
static void _bind_methods();
- String name;
- Ref<TextLine> line;
+ Ref<Font> prev_font;
public:
virtual Size2 get_minimum_size() const override;
@@ -249,6 +249,33 @@ public:
/*************************************************************************/
+class EditorPropertyFontNamesArray : public EditorPropertyArray {
+ GDCLASS(EditorPropertyFontNamesArray, EditorPropertyArray);
+
+ PopupMenu *menu = nullptr;
+
+protected:
+ virtual void _add_element() override;
+
+ void _add_font(int p_option);
+ static void _bind_methods(){};
+
+public:
+ EditorPropertyFontNamesArray();
+};
+
+/*************************************************************************/
+
+class EditorInspectorPluginSystemFont : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginSystemFont, EditorInspectorPlugin);
+
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+};
+
+/*************************************************************************/
+
class FontEditorPlugin : public EditorPlugin {
GDCLASS(FontEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h
index b91a17d9e5..b5eca46ad3 100644
--- a/editor/plugins/gdextension_export_plugin.h
+++ b/editor/plugins/gdextension_export_plugin.h
@@ -31,7 +31,7 @@
#ifndef GDEXTENSION_EXPORT_PLUGIN_H
#define GDEXTENSION_EXPORT_PLUGIN_H
-#include "editor/editor_export.h"
+#include "editor/export/editor_export.h"
class GDExtensionExportPlugin : public EditorExportPlugin {
protected:
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 5c7047a81f..542aee879b 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "canvas_item_editor_plugin.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "node_3d_editor_plugin.h"
Size2 GradientEditor::get_minimum_size() const {
@@ -85,7 +86,7 @@ void GradientEditor::reverse_gradient() {
}
GradientEditor::GradientEditor() {
- GradientEdit::get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(GradientEdit::get_picker()));
+ GradientEdit::get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(GradientEdit::get_picker()));
editing = false;
}
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 34db75f118..00fc8cc7d6 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/subviewport_container.h"
#include "scene/resources/fog_material.h"
#include "scene/resources/particles_material.h"
@@ -155,7 +156,9 @@ MaterialEditor::MaterialEditor() {
camera = memnew(Camera3D);
camera->set_transform(Transform3D(Basis(), Vector3(0, 0, 3)));
- camera->set_perspective(45, 0.1, 10);
+ // Use low field of view so the sphere/box is fully encompassed within the preview,
+ // without much distortion.
+ camera->set_perspective(20, 0.1, 10);
camera->make_current();
viewport->add_child(camera);
@@ -177,8 +180,8 @@ MaterialEditor::MaterialEditor() {
Transform3D box_xform;
box_xform.basis.rotate(Vector3(1, 0, 0), Math::deg2rad(25.0));
box_xform.basis = box_xform.basis * Basis().rotated(Vector3(0, 1, 0), Math::deg2rad(-25.0));
- box_xform.basis.scale(Vector3(0.8, 0.8, 0.8));
- box_xform.origin.y = 0.2;
+ box_xform.basis.scale(Vector3(0.7, 0.7, 0.7));
+ box_xform.origin.y = 0.05;
box_instance->set_transform(box_xform);
sphere_mesh.instantiate();
@@ -199,13 +202,13 @@ MaterialEditor::MaterialEditor() {
sphere_switch->set_toggle_mode(true);
sphere_switch->set_pressed(true);
vb_shape->add_child(sphere_switch);
- sphere_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(sphere_switch));
+ sphere_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed).bind(sphere_switch));
box_switch = memnew(TextureButton);
box_switch->set_toggle_mode(true);
box_switch->set_pressed(false);
vb_shape->add_child(box_switch);
- box_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(box_switch));
+ box_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed).bind(box_switch));
layout_3d->add_spacer();
@@ -215,12 +218,12 @@ MaterialEditor::MaterialEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(light_1_switch));
+ light_1_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed).bind(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed), varray(light_2_switch));
+ light_2_switch->connect("pressed", callable_mp(this, &MaterialEditor::_button_pressed).bind(light_2_switch));
first_enter = true;
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 9c6247d59b..fc3da5fd9f 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -32,7 +32,7 @@
#define MATERIAL_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "editor/property_editor.h"
+#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
#include "scene/3d/mesh_instance_3d.h"
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index b23395fea2..31c9f1e387 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -147,12 +147,12 @@ MeshEditor::MeshEditor() {
light_1_switch = memnew(TextureButton);
light_1_switch->set_toggle_mode(true);
vb_light->add_child(light_1_switch);
- light_1_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed), varray(light_1_switch));
+ light_1_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed).bind(light_1_switch));
light_2_switch = memnew(TextureButton);
light_2_switch->set_toggle_mode(true);
vb_light->add_child(light_2_switch);
- light_2_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed), varray(light_2_switch));
+ light_2_switch->connect("pressed", callable_mp(this, &MeshEditor::_button_pressed).bind(light_2_switch));
first_enter = true;
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 72bfc05270..319f6ee9de 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -289,8 +289,8 @@ MeshLibraryEditor::MeshLibraryEditor() {
cd_update = memnew(ConfirmationDialog);
add_child(cd_update);
cd_update->set_ok_button_text(TTR("Apply without Transforms"));
- cd_update->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm), varray(false));
- cd_update->add_button(TTR("Apply with Transforms"))->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm), varray(true));
+ cd_update->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(false));
+ cd_update->add_button(TTR("Apply with Transforms"))->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm).bind(true));
}
void MeshLibraryEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 7207390922..fc4dc5bc2f 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -291,7 +291,7 @@ MultiMeshEditor::MultiMeshEditor() {
Button *b = memnew(Button);
hbc->add_child(b);
b->set_text("..");
- b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse), make_binds(false));
+ b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse).bind(false));
vbc->add_margin_child(TTR("Target Surface:"), hbc);
@@ -303,7 +303,7 @@ MultiMeshEditor::MultiMeshEditor() {
hbc->add_child(b);
b->set_text("..");
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
- b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse), make_binds(true));
+ b->connect("pressed", callable_mp(this, &MultiMeshEditor::_browse).bind(true));
populate_axis = memnew(OptionButton);
populate_axis->add_item(TTR("X-Axis"));
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index 77cf1f0064..0070226d40 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -57,6 +57,7 @@
#include "scene/3d/position_3d.h"
#include "scene/3d/ray_cast_3d.h"
#include "scene/3d/reflection_probe.h"
+#include "scene/3d/shape_cast_3d.h"
#include "scene/3d/soft_dynamic_body_3d.h"
#include "scene/3d/spring_arm_3d.h"
#include "scene/3d/sprite_3d.h"
@@ -74,6 +75,7 @@
#include "scene/resources/sphere_shape_3d.h"
#include "scene/resources/surface_tool.h"
#include "scene/resources/world_boundary_shape_3d.h"
+#include "servers/navigation_server_3d.h"
#define HANDLE_HALF_SIZE 9.5
@@ -2540,6 +2542,44 @@ void RayCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
/////
+ShapeCast3DGizmoPlugin::ShapeCast3DGizmoPlugin() {
+ const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
+ create_material("shape_material", gizmo_color);
+ const float gizmo_value = gizmo_color.get_v();
+ const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
+ create_material("shape_material_disabled", gizmo_color_disabled);
+}
+
+bool ShapeCast3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+ return Object::cast_to<ShapeCast3D>(p_spatial) != nullptr;
+}
+
+String ShapeCast3DGizmoPlugin::get_gizmo_name() const {
+ return "ShapeCast3D";
+}
+
+int ShapeCast3DGizmoPlugin::get_priority() const {
+ return -1;
+}
+
+void ShapeCast3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+ ShapeCast3D *shapecast = Object::cast_to<ShapeCast3D>(p_gizmo->get_spatial_node());
+
+ p_gizmo->clear();
+
+ const Ref<StandardMaterial3D> material = shapecast->is_enabled() ? shapecast->get_debug_material() : get_material("shape_material_disabled");
+
+ p_gizmo->add_lines(shapecast->get_debug_line_vertices(), material);
+
+ if (shapecast->get_shape().is_valid()) {
+ p_gizmo->add_lines(shapecast->get_debug_shape_vertices(), material);
+ }
+
+ p_gizmo->add_collision_segments(shapecast->get_debug_line_vertices());
+}
+
+/////
+
void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
SpringArm3D *spring_arm = Object::cast_to<SpringArm3D>(p_gizmo->get_spatial_node());
@@ -4799,10 +4839,6 @@ void CollisionPolygon3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
////
NavigationRegion3DGizmoPlugin::NavigationRegion3DGizmoPlugin() {
- create_material("navigation_edge_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1)));
- create_material("navigation_edge_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled", Color(0.7, 0.7, 0.7)));
- create_material("navigation_solid_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid", Color(0.5, 1, 1, 0.4)));
- create_material("navigation_solid_material_disabled", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled", Color(0.7, 0.7, 0.7, 0.4)));
}
bool NavigationRegion3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
@@ -4818,24 +4854,19 @@ int NavigationRegion3DGizmoPlugin::get_priority() const {
}
void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- NavigationRegion3D *navmesh = Object::cast_to<NavigationRegion3D>(p_gizmo->get_spatial_node());
-
- Ref<Material> edge_material = get_material("navigation_edge_material", p_gizmo);
- Ref<Material> edge_material_disabled = get_material("navigation_edge_material_disabled", p_gizmo);
- Ref<Material> solid_material = get_material("navigation_solid_material", p_gizmo);
- Ref<Material> solid_material_disabled = get_material("navigation_solid_material_disabled", p_gizmo);
+ NavigationRegion3D *navigationregion = Object::cast_to<NavigationRegion3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
- Ref<NavigationMesh> navmeshie = navmesh->get_navigation_mesh();
- if (navmeshie.is_null()) {
+ Ref<NavigationMesh> navigationmesh = navigationregion->get_navigation_mesh();
+ if (navigationmesh.is_null()) {
return;
}
- Vector<Vector3> vertices = navmeshie->get_vertices();
+ Vector<Vector3> vertices = navigationmesh->get_vertices();
const Vector3 *vr = vertices.ptr();
List<Face3> faces;
- for (int i = 0; i < navmeshie->get_polygon_count(); i++) {
- Vector<int> p = navmeshie->get_polygon(i);
+ for (int i = 0; i < navigationmesh->get_polygon_count(); i++) {
+ Vector<int> p = navigationmesh->get_polygon(i);
for (int j = 2; j < p.size(); j++) {
Face3 f;
@@ -4892,17 +4923,90 @@ void NavigationRegion3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Ref<TriangleMesh> tmesh = memnew(TriangleMesh);
tmesh->create(tmeshfaces);
- if (lines.size()) {
- p_gizmo->add_lines(lines, navmesh->is_enabled() ? edge_material : edge_material_disabled);
- }
p_gizmo->add_collision_triangles(tmesh);
- Ref<ArrayMesh> m = memnew(ArrayMesh);
- Array a;
- a.resize(Mesh::ARRAY_MAX);
- a[0] = tmeshfaces;
- m->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, a);
- m->surface_set_material(0, navmesh->is_enabled() ? solid_material : solid_material_disabled);
- p_gizmo->add_mesh(m);
+
+ Ref<ArrayMesh> debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ int polygon_count = navigationmesh->get_polygon_count();
+
+ // build geometry face surface
+ Vector<Vector3> face_vertex_array;
+ face_vertex_array.resize(polygon_count * 3);
+
+ for (int i = 0; i < polygon_count; i++) {
+ Vector<int> polygon = navigationmesh->get_polygon(i);
+
+ face_vertex_array.push_back(vertices[polygon[0]]);
+ face_vertex_array.push_back(vertices[polygon[1]]);
+ face_vertex_array.push_back(vertices[polygon[2]]);
+ }
+
+ Array face_mesh_array;
+ face_mesh_array.resize(Mesh::ARRAY_MAX);
+ face_mesh_array[Mesh::ARRAY_VERTEX] = face_vertex_array;
+
+ // if enabled add vertex colors to colorize each face individually
+ bool enabled_geometry_face_random_color = NavigationServer3D::get_singleton()->get_debug_navigation_enable_geometry_face_random_color();
+ if (enabled_geometry_face_random_color) {
+ Color debug_navigation_geometry_face_color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
+ Color polygon_color = debug_navigation_geometry_face_color;
+
+ Vector<Color> face_color_array;
+ face_color_array.resize(polygon_count * 3);
+
+ for (int i = 0; i < polygon_count; i++) {
+ polygon_color = debug_navigation_geometry_face_color * (Color(Math::randf(), Math::randf(), Math::randf()));
+
+ Vector<int> polygon = navigationmesh->get_polygon(i);
+
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ }
+ face_mesh_array[Mesh::ARRAY_COLOR] = face_color_array;
+ }
+
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, face_mesh_array);
+ Ref<StandardMaterial3D> debug_geometry_face_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_material();
+ debug_mesh->surface_set_material(0, debug_geometry_face_material);
+
+ // if enabled build geometry edge line surface
+ bool enabled_edge_lines = NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_lines();
+
+ if (enabled_edge_lines) {
+ Vector<Vector3> line_vertex_array;
+ line_vertex_array.resize(polygon_count * 6);
+
+ for (int i = 0; i < polygon_count; i++) {
+ Vector<int> polygon = navigationmesh->get_polygon(i);
+
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ }
+
+ Array line_mesh_array;
+ line_mesh_array.resize(Mesh::ARRAY_MAX);
+ line_mesh_array[Mesh::ARRAY_VERTEX] = line_vertex_array;
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, line_mesh_array);
+ Ref<StandardMaterial3D> debug_geometry_edge_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_material();
+ debug_mesh->surface_set_material(1, debug_geometry_edge_material);
+ }
+
+ if (!navigationregion->is_enabled()) {
+ if (debug_mesh.is_valid()) {
+ if (debug_mesh->get_surface_count() > 0) {
+ debug_mesh->surface_set_material(0, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_disabled_material());
+ }
+ if (debug_mesh->get_surface_count() > 1) {
+ debug_mesh->surface_set_material(1, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_disabled_material());
+ }
+ }
+ }
+
+ p_gizmo->add_mesh(debug_mesh);
p_gizmo->add_collision_segments(lines);
}
@@ -5044,8 +5148,8 @@ Basis JointGizmosDrawer::look_body_toward_z(const Transform3D &p_joint_transform
void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform3D &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse) {
if (p_limit_lower == p_limit_upper) {
- r_points.push_back(p_offset.translated(Vector3()).origin);
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(0.5, 0, 0))).origin);
+ r_points.push_back(p_offset.translated_local(Vector3()).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(0.5, 0, 0))).origin);
} else {
if (p_limit_lower > p_limit_upper) {
@@ -5087,20 +5191,20 @@ void JointGizmosDrawer::draw_circle(Vector3::Axis p_axis, real_t p_radius, const
}
if (i == points - 1) {
- r_points.push_back(p_offset.translated(to).origin);
- r_points.push_back(p_offset.translated(Vector3()).origin);
+ r_points.push_back(p_offset.translated_local(to).origin);
+ r_points.push_back(p_offset.translated_local(Vector3()).origin);
}
if (i == 0) {
- r_points.push_back(p_offset.translated(from).origin);
- r_points.push_back(p_offset.translated(Vector3()).origin);
+ r_points.push_back(p_offset.translated_local(from).origin);
+ r_points.push_back(p_offset.translated_local(Vector3()).origin);
}
- r_points.push_back(p_offset.translated(from).origin);
- r_points.push_back(p_offset.translated(to).origin);
+ r_points.push_back(p_offset.translated_local(from).origin);
+ r_points.push_back(p_offset.translated_local(to).origin);
}
- r_points.push_back(p_offset.translated(Vector3(0, p_radius * 1.5, 0)).origin);
- r_points.push_back(p_offset.translated(Vector3()).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(0, p_radius * 1.5, 0)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3()).origin);
}
}
@@ -5116,17 +5220,17 @@ void JointGizmosDrawer::draw_cone(const Transform3D &p_offset, const Basis &p_ba
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * w;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * w;
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(d, a.x, a.y))).origin);
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(d, b.x, b.y))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(d, a.x, a.y))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(d, b.x, b.y))).origin);
if (i % 90 == 0) {
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(d, a.x, a.y))).origin);
- r_points.push_back(p_offset.translated(p_base.xform(Vector3())).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(d, a.x, a.y))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3())).origin);
}
}
- r_points.push_back(p_offset.translated(p_base.xform(Vector3())).origin);
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(1, 0, 0))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3())).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(1, 0, 0))).origin);
/// Twist
float ts = Math::rad2deg(p_twist);
@@ -5140,8 +5244,8 @@ void JointGizmosDrawer::draw_cone(const Transform3D &p_offset, const Basis &p_ba
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * w * c;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * w * cn;
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(c, a.x, a.y))).origin);
- r_points.push_back(p_offset.translated(p_base.xform(Vector3(cn, b.x, b.y))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(c, a.x, a.y))).origin);
+ r_points.push_back(p_offset.translated_local(p_base.xform(Vector3(cn, b.x, b.y))).origin);
}
}
@@ -5325,17 +5429,17 @@ void Joint3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
void Joint3DGizmoPlugin::CreatePinJointGizmo(const Transform3D &p_offset, Vector<Vector3> &r_cursor_points) {
float cs = 0.25;
- r_cursor_points.push_back(p_offset.translated(Vector3(+cs, 0, 0)).origin);
- r_cursor_points.push_back(p_offset.translated(Vector3(-cs, 0, 0)).origin);
- r_cursor_points.push_back(p_offset.translated(Vector3(0, +cs, 0)).origin);
- r_cursor_points.push_back(p_offset.translated(Vector3(0, -cs, 0)).origin);
- r_cursor_points.push_back(p_offset.translated(Vector3(0, 0, +cs)).origin);
- r_cursor_points.push_back(p_offset.translated(Vector3(0, 0, -cs)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(+cs, 0, 0)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(-cs, 0, 0)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(0, +cs, 0)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(0, -cs, 0)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(0, 0, +cs)).origin);
+ r_cursor_points.push_back(p_offset.translated_local(Vector3(0, 0, -cs)).origin);
}
void Joint3DGizmoPlugin::CreateHingeJointGizmo(const Transform3D &p_offset, const Transform3D &p_trs_joint, const Transform3D &p_trs_body_a, const Transform3D &p_trs_body_b, real_t p_limit_lower, real_t p_limit_upper, bool p_use_limit, Vector<Vector3> &r_common_points, Vector<Vector3> *r_body_a_points, Vector<Vector3> *r_body_b_points) {
- r_common_points.push_back(p_offset.translated(Vector3(0, 0, 0.5)).origin);
- r_common_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin);
+ r_common_points.push_back(p_offset.translated_local(Vector3(0, 0, 0.5)).origin);
+ r_common_points.push_back(p_offset.translated_local(Vector3(0, 0, -0.5)).origin);
if (!p_use_limit) {
p_limit_upper = -1;
@@ -5368,34 +5472,34 @@ void Joint3DGizmoPlugin::CreateSliderJointGizmo(const Transform3D &p_offset, con
p_linear_limit_upper = -p_linear_limit_upper;
float cs = 0.25;
- r_points.push_back(p_offset.translated(Vector3(0, 0, 0.5)).origin);
- r_points.push_back(p_offset.translated(Vector3(0, 0, -0.5)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(0, 0, 0.5)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(0, 0, -0.5)).origin);
if (p_linear_limit_lower >= p_linear_limit_upper) {
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, 0, 0)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, 0, 0)).origin);
-
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, -cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, -cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, -cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_upper, -cs, -cs)).origin);
-
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, -cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, -cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, -cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, cs, cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, cs, -cs)).origin);
- r_points.push_back(p_offset.translated(Vector3(p_linear_limit_lower, -cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, 0, 0)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, 0, 0)).origin);
+
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, -cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, -cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, -cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_upper, -cs, -cs)).origin);
+
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, -cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, -cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, -cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, cs, cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, cs, -cs)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(p_linear_limit_lower, -cs, -cs)).origin);
} else {
- r_points.push_back(p_offset.translated(Vector3(+cs * 2, 0, 0)).origin);
- r_points.push_back(p_offset.translated(Vector3(-cs * 2, 0, 0)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(+cs * 2, 0, 0)).origin);
+ r_points.push_back(p_offset.translated_local(Vector3(-cs * 2, 0, 0)).origin);
}
if (r_body_a_points) {
@@ -5518,13 +5622,13 @@ void Joint3DGizmoPlugin::CreateGeneric6DOFJointGizmo(
break;
}
-#define ADD_VTX(x, y, z) \
- { \
- Vector3 v; \
- v[a1] = (x); \
- v[a2] = (y); \
- v[a3] = (z); \
- r_points.push_back(p_offset.translated(v).origin); \
+#define ADD_VTX(x, y, z) \
+ { \
+ Vector3 v; \
+ v[a1] = (x); \
+ v[a2] = (y); \
+ v[a3] = (z); \
+ r_points.push_back(p_offset.translated_local(v).origin); \
}
if (enable_lin && lll >= lul) {
diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h
index a0d7715347..739bf1b929 100644
--- a/editor/plugins/node_3d_editor_gizmos.h
+++ b/editor/plugins/node_3d_editor_gizmos.h
@@ -373,6 +373,18 @@ public:
RayCast3DGizmoPlugin();
};
+class ShapeCast3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+ GDCLASS(ShapeCast3DGizmoPlugin, EditorNode3DGizmoPlugin);
+
+public:
+ bool has_gizmo(Node3D *p_spatial) override;
+ String get_gizmo_name() const override;
+ int get_priority() const override;
+ void redraw(EditorNode3DGizmo *p_gizmo) override;
+
+ ShapeCast3DGizmoPlugin();
+};
+
class SpringArm3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(SpringArm3DGizmoPlugin, EditorNode3DGizmoPlugin);
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 44ab4e0a41..7628a95310 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -356,14 +356,14 @@ void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
Transform3D Node3DEditorViewport::to_camera_transform(const Cursor &p_cursor) const {
Transform3D camera_transform;
- camera_transform.translate(p_cursor.pos);
+ camera_transform.translate_local(p_cursor.pos);
camera_transform.basis.rotate(Vector3(1, 0, 0), -p_cursor.x_rot);
camera_transform.basis.rotate(Vector3(0, 1, 0), -p_cursor.y_rot);
if (orthogonal) {
- camera_transform.translate(0, 0, (get_zfar() - get_znear()) / 2.0);
+ camera_transform.translate_local(0, 0, (get_zfar() - get_znear()) / 2.0);
} else {
- camera_transform.translate(0, 0, p_cursor.distance);
+ camera_transform.translate_local(0, 0, p_cursor.distance);
}
return camera_transform;
@@ -515,7 +515,7 @@ void Node3DEditorViewport::_select_clicked(bool p_allow_locked) {
}
}
-ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) {
+ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) const {
Vector3 ray = _get_ray(p_pos);
Vector3 pos = _get_ray_pos(p_pos);
Vector2 shrinked_pos = p_pos / subviewport_container->get_stretch_shrink();
@@ -651,10 +651,10 @@ Vector3 Node3DEditorViewport::_get_screen_to_space(const Vector3 &p_vector3) {
Vector2 screen_he = cm.get_viewport_half_extents();
Transform3D camera_transform;
- camera_transform.translate(cursor.pos);
+ 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);
- camera_transform.translate(0, 0, cursor.distance);
+ camera_transform.translate_local(0, 0, cursor.distance);
return camera_transform.xform(Vector3(((p_vector3.x / get_size().width) * 2.0 - 1.0) * screen_he.x, ((1.0 - (p_vector3.y / get_size().height)) * 2.0 - 1.0) * screen_he.y, -(get_znear() + p_vector3.z)));
}
@@ -1260,7 +1260,9 @@ void Node3DEditorViewport::_surface_mouse_enter() {
}
void Node3DEditorViewport::_surface_mouse_exit() {
- _remove_preview();
+ _remove_preview_node();
+ _reset_preview_material();
+ _remove_preview_material();
}
void Node3DEditorViewport::_surface_focus_enter() {
@@ -2100,7 +2102,7 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const
Transform3D camera_transform;
- camera_transform.translate(cursor.pos);
+ 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");
@@ -2110,7 +2112,7 @@ void Node3DEditorViewport::_nav_pan(Ref<InputEventWithModifiers> p_event, const
(invert_y_axis ? -1 : 1) * p_relative.y * pan_speed,
0);
translation *= cursor.distance / DISTANCE_DEFAULT;
- camera_transform.translate(translation);
+ camera_transform.translate_local(translation);
cursor.pos = camera_transform.origin;
}
@@ -2423,8 +2425,8 @@ void Node3DEditorViewport::_project_settings_changed() {
const float fsr_sharpness = GLOBAL_GET("rendering/scaling_3d/fsr_sharpness");
viewport->set_fsr_sharpness(fsr_sharpness);
- const float fsr_mipmap_bias = GLOBAL_GET("rendering/scaling_3d/fsr_mipmap_bias");
- viewport->set_fsr_mipmap_bias(fsr_mipmap_bias);
+ const float texture_mipmap_bias = GLOBAL_GET("rendering/textures/default_filters/texture_mipmap_bias");
+ viewport->set_texture_mipmap_bias(texture_mipmap_bias);
}
void Node3DEditorViewport::_notification(int p_what) {
@@ -2520,14 +2522,14 @@ void Node3DEditorViewport::_notification(int p_what) {
const Vector3 offset(0.005, 0.005, 0.005);
Basis aabb_s;
aabb_s.scale(se->aabb.size + offset);
- t.translate(se->aabb.position - offset / 2);
+ t.translate_local(se->aabb.position - offset / 2);
t.basis = t.basis * aabb_s;
}
{
const Vector3 offset(0.01, 0.01, 0.01);
Basis aabb_s;
aabb_s.scale(se->aabb.size + offset);
- t_offset.translate(se->aabb.position - offset / 2);
+ t_offset.translate_local(se->aabb.position - offset / 2);
t_offset.basis = t_offset.basis * aabb_s;
}
@@ -2703,6 +2705,13 @@ void Node3DEditorViewport::_notification(int p_what) {
cinema_label->add_theme_style_override("normal", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
locked_label->add_theme_style_override("normal", gui_base->get_theme_stylebox(SNAME("Information3dViewport"), SNAME("EditorStyles")));
} break;
+
+ case NOTIFICATION_DRAG_END: {
+ // Clear preview material when dropped outside applicable object.
+ if (spatial_editor->get_preview_material().is_valid() && !is_drag_successful()) {
+ _remove_preview_material();
+ }
+ } break;
}
}
@@ -3794,7 +3803,7 @@ Node *Node3DEditorViewport::_sanitize_preview_node(Node *p_node) const {
return p_node;
}
-void Node3DEditorViewport::_create_preview(const Vector<String> &files) const {
+void Node3DEditorViewport::_create_preview_node(const Vector<String> &files) const {
for (int i = 0; i < files.size(); i++) {
String path = files[i];
Ref<Resource> res = ResourceLoader::load(path);
@@ -3821,7 +3830,7 @@ void Node3DEditorViewport::_create_preview(const Vector<String> &files) const {
*preview_bounds = _calculate_spatial_bounds(preview_node);
}
-void Node3DEditorViewport::_remove_preview() {
+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);
@@ -3832,6 +3841,106 @@ void Node3DEditorViewport::_remove_preview() {
}
}
+bool Node3DEditorViewport::_apply_preview_material(ObjectID p_target, const Point2 &p_point) const {
+ _reset_preview_material();
+
+ if (p_target.is_null()) {
+ return false;
+ }
+
+ spatial_editor->set_preview_material_target(p_target);
+
+ Object *target_inst = ObjectDB::get_instance(p_target);
+
+ bool is_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL);
+
+ MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(target_inst);
+ if (is_ctrl && mesh_instance) {
+ Ref<Mesh> mesh = mesh_instance->get_mesh();
+ int surface_count = mesh->get_surface_count();
+
+ Vector3 world_ray = _get_ray(p_point);
+ Vector3 world_pos = _get_ray_pos(p_point);
+
+ int closest_surface = -1;
+ float closest_dist = 1e20;
+
+ Transform3D gt = mesh_instance->get_global_transform();
+
+ Transform3D ai = gt.affine_inverse();
+ 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);
+
+ Vector3 rpos, rnorm;
+ if (surface_mesh->intersect_ray(xform_pos, xform_ray, rpos, rnorm)) {
+ Vector3 hitpos = gt.xform(rpos);
+
+ const real_t dist = world_pos.distance_to(hitpos);
+
+ if (dist < 0) {
+ continue;
+ }
+
+ if (dist < closest_dist) {
+ closest_surface = surface;
+ closest_dist = dist;
+ }
+ }
+ }
+
+ if (closest_surface == -1) {
+ return false;
+ }
+
+ if (spatial_editor->get_preview_material() != mesh_instance->get_surface_override_material(closest_surface)) {
+ spatial_editor->set_preview_material_surface(closest_surface);
+ spatial_editor->set_preview_reset_material(mesh_instance->get_surface_override_material(closest_surface));
+ mesh_instance->set_surface_override_material(closest_surface, spatial_editor->get_preview_material());
+ }
+
+ return true;
+ }
+
+ GeometryInstance3D *geometry_instance = Object::cast_to<GeometryInstance3D>(target_inst);
+ if (geometry_instance && spatial_editor->get_preview_material() != geometry_instance->get_material_override()) {
+ spatial_editor->set_preview_reset_material(geometry_instance->get_material_override());
+ geometry_instance->set_material_override(spatial_editor->get_preview_material());
+ return true;
+ }
+
+ return false;
+}
+
+void Node3DEditorViewport::_reset_preview_material() const {
+ ObjectID last_target = spatial_editor->get_preview_material_target();
+ if (last_target.is_null()) {
+ return;
+ }
+ Object *last_target_inst = ObjectDB::get_instance(last_target);
+
+ MeshInstance3D *mesh_instance = Object::cast_to<MeshInstance3D>(last_target_inst);
+ GeometryInstance3D *geometry_instance = Object::cast_to<GeometryInstance3D>(last_target_inst);
+ if (mesh_instance && spatial_editor->get_preview_material_surface() != -1) {
+ mesh_instance->set_surface_override_material(spatial_editor->get_preview_material_surface(), spatial_editor->get_preview_reset_material());
+ spatial_editor->set_preview_material_surface(-1);
+ } else if (geometry_instance) {
+ geometry_instance->set_material_override(spatial_editor->get_preview_reset_material());
+ }
+}
+
+void Node3DEditorViewport::_remove_preview_material() {
+ preview_material_label->hide();
+ preview_material_label_desc->hide();
+
+ spatial_editor->set_preview_material(Ref<Material>());
+ spatial_editor->set_preview_reset_material(Ref<Material>());
+ spatial_editor->set_preview_material_target(ObjectID());
+ spatial_editor->set_preview_material_surface(-1);
+}
+
bool Node3DEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {
if (p_desired_node->get_scene_file_path() == p_target_scene_path) {
return true;
@@ -3930,7 +4039,26 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
}
void Node3DEditorViewport::_perform_drop_data() {
- _remove_preview();
+ 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();
+ } 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();
+ }
+
+ _remove_preview_material();
+ return;
+ }
+
+ _remove_preview_node();
Vector<String> error_files;
@@ -3968,7 +4096,7 @@ void Node3DEditorViewport::_perform_drop_data() {
bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
bool can_instantiate = false;
- if (!preview_node->is_inside_tree()) {
+ if (!preview_node->is_inside_tree() && spatial_editor->get_preview_material().is_null()) {
Dictionary d = p_data;
if (d.has("type") && (String(d["type"]) == "files")) {
Vector<String> files = d["files"];
@@ -3977,40 +4105,78 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);
List<String> mesh_extensions;
ResourceLoader::get_recognized_extensions_for_type("Mesh", &mesh_extensions);
+ List<String> material_extensions;
+ ResourceLoader::get_recognized_extensions_for_type("Material", &material_extensions);
+ List<String> texture_extensions;
+ ResourceLoader::get_recognized_extensions_for_type("Texture", &texture_extensions);
for (int i = 0; i < files.size(); i++) {
// 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())) {
+ 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())) {
Ref<Resource> res = ResourceLoader::load(files[i]);
if (res.is_null()) {
continue;
}
Ref<PackedScene> scn = res;
+ Ref<Material> mat = res;
+ Ref<Texture2D> tex = res;
if (scn.is_valid()) {
Node *instantiated_scene = scn->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instantiated_scene) {
continue;
}
memdelete(instantiated_scene);
+ } else if (mat.is_valid()) {
+ Ref<BaseMaterial3D> base_mat = res;
+ Ref<ShaderMaterial> shader_mat = res;
+
+ if (base_mat.is_null() && !shader_mat.is_null()) {
+ break;
+ }
+
+ spatial_editor->set_preview_material(mat);
+ break;
+ } else if (tex.is_valid()) {
+ Ref<StandardMaterial3D> new_mat = memnew(StandardMaterial3D);
+ new_mat->set_texture(BaseMaterial3D::TEXTURE_ALBEDO, tex);
+
+ spatial_editor->set_preview_material(new_mat);
+ break;
+ } else {
+ continue;
}
can_instantiate = true;
break;
}
}
if (can_instantiate) {
- _create_preview(files);
+ _create_preview_node(files);
}
}
} else {
- can_instantiate = true;
+ if (preview_node->is_inside_tree()) {
+ can_instantiate = true;
+ }
}
if (can_instantiate) {
Transform3D global_transform = Transform3D(Basis(), _get_instance_position(p_point));
preview_node->set_global_transform(global_transform);
+ return true;
+ }
+
+ if (spatial_editor->get_preview_material().is_valid()) {
+ preview_material_label->show();
+ preview_material_label_desc->show();
+
+ ObjectID new_preview_material_target = _select_ray(p_point);
+ return _apply_preview_material(new_preview_material_target, p_point);
}
- return can_instantiate;
+ return false;
}
void Node3DEditorViewport::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
@@ -4048,7 +4214,7 @@ void Node3DEditorViewport::drop_data_fw(const Point2 &p_point, const Variant &p_
} else {
accept->set_text(TTR("Cannot drag and drop into multiple selected nodes."));
accept->popup_centered();
- _remove_preview();
+ _remove_preview_node();
return;
}
@@ -4450,7 +4616,7 @@ void Node3DEditorViewport::register_shortcut_action(const String &p_path, const
Ref<Shortcut> sc = ED_SHORTCUT(p_path, p_name, p_keycode);
shortcut_changed_callback(sc, p_path);
// Connect to the change event on the shortcut so the input binding can be updated.
- sc->connect("changed", callable_mp(this, &Node3DEditorViewport::shortcut_changed_callback), varray(sc, p_path));
+ sc->connect("changed", callable_mp(this, &Node3DEditorViewport::shortcut_changed_callback).bind(sc, p_path));
}
// Update the action in the InputMap to the provided shortcut events.
@@ -4699,6 +4865,23 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
zoom_limit_label->hide();
surface->add_child(zoom_limit_label);
+ preview_material_label = memnew(Label);
+ preview_material_label->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
+ preview_material_label->set_offset(Side::SIDE_TOP, -70 * EDSCALE);
+ preview_material_label->set_text(TTR("Overriding material..."));
+ preview_material_label->add_theme_color_override("font_color", Color(1, 1, 1, 1));
+ preview_material_label->hide();
+ surface->add_child(preview_material_label);
+
+ preview_material_label_desc = memnew(Label);
+ preview_material_label_desc->set_anchors_and_offsets_preset(LayoutPreset::PRESET_BOTTOM_LEFT);
+ preview_material_label_desc->set_offset(Side::SIDE_TOP, -50 * EDSCALE);
+ preview_material_label_desc->set_text(TTR("Drag and drop to override the material of any geometry node.\nHold Ctrl when dropping to override a specific surface."));
+ preview_material_label_desc->add_theme_color_override("font_color", Color(0.8, 0.8, 0.8, 1));
+ preview_material_label_desc->add_theme_constant_override("line_spacing", 0);
+ preview_material_label_desc->hide();
+ surface->add_child(preview_material_label_desc);
+
frame_time_gradient = memnew(Gradient);
// The color is set when the theme changes.
frame_time_gradient->add_point(0.5, Color());
@@ -6999,8 +7182,8 @@ void Node3DEditor::_notification(int p_what) {
SceneTreeDock::get_singleton()->get_tree_editor()->connect("node_changed", callable_mp(this, &Node3DEditor::_refresh_menu_icons));
editor_selection->connect("selection_changed", callable_mp(this, &Node3DEditor::_selection_changed));
- EditorNode::get_singleton()->connect("stop_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button), make_binds(false));
- EditorNode::get_singleton()->connect("play_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button), make_binds(true));
+ EditorNode::get_singleton()->connect("stop_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button).bind(false));
+ EditorNode::get_singleton()->connect("play_pressed", callable_mp(this, &Node3DEditor::_update_camera_override_button).bind(true));
_update_preview_environment();
@@ -7314,6 +7497,7 @@ void Node3DEditor::_register_all_gizmos() {
add_gizmo_plugin(Ref<Label3DGizmoPlugin>(memnew(Label3DGizmoPlugin)));
add_gizmo_plugin(Ref<Position3DGizmoPlugin>(memnew(Position3DGizmoPlugin)));
add_gizmo_plugin(Ref<RayCast3DGizmoPlugin>(memnew(RayCast3DGizmoPlugin)));
+ add_gizmo_plugin(Ref<ShapeCast3DGizmoPlugin>(memnew(ShapeCast3DGizmoPlugin)));
add_gizmo_plugin(Ref<SpringArm3DGizmoPlugin>(memnew(SpringArm3DGizmoPlugin)));
add_gizmo_plugin(Ref<VehicleWheel3DGizmoPlugin>(memnew(VehicleWheel3DGizmoPlugin)));
add_gizmo_plugin(Ref<VisibleOnScreenNotifier3DGizmoPlugin>(memnew(VisibleOnScreenNotifier3DGizmoPlugin)));
@@ -7538,8 +7722,6 @@ Node3DEditor::Node3DEditor() {
HBoxContainer *main_menu_hbox = memnew(HBoxContainer);
main_flow->add_child(main_menu_hbox);
- Vector<Variant> button_binds;
- button_binds.resize(1);
String sct;
// Add some margin to the left for better aesthetics.
@@ -7554,8 +7736,7 @@ Node3DEditor::Node3DEditor() {
tool_button[TOOL_MODE_SELECT]->set_toggle_mode(true);
tool_button[TOOL_MODE_SELECT]->set_flat(true);
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
- button_binds.write[0] = MENU_TOOL_SELECT;
- tool_button[TOOL_MODE_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_MODE_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SELECT));
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), Key::Q));
tool_button[TOOL_MODE_SELECT]->set_shortcut_context(this);
tool_button[TOOL_MODE_SELECT]->set_tooltip(keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
@@ -7565,8 +7746,8 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_button[TOOL_MODE_MOVE]);
tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true);
tool_button[TOOL_MODE_MOVE]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_MOVE;
- tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+
+ tool_button[TOOL_MODE_MOVE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_MOVE));
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), Key::W));
tool_button[TOOL_MODE_MOVE]->set_shortcut_context(this);
@@ -7574,8 +7755,7 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_button[TOOL_MODE_ROTATE]);
tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true);
tool_button[TOOL_MODE_ROTATE]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_ROTATE;
- tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_MODE_ROTATE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_ROTATE));
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), Key::E));
tool_button[TOOL_MODE_ROTATE]->set_shortcut_context(this);
@@ -7583,8 +7763,7 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_button[TOOL_MODE_SCALE]);
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
tool_button[TOOL_MODE_SCALE]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_SCALE;
- tool_button[TOOL_MODE_SCALE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_MODE_SCALE]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SCALE));
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), Key::R));
tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this);
@@ -7594,15 +7773,13 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_button[TOOL_MODE_LIST_SELECT]);
tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true);
tool_button[TOOL_MODE_LIST_SELECT]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_LIST_SELECT;
- tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_LIST_SELECT));
tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip(TTR("Show list of selectable nodes at position clicked."));
tool_button[TOOL_LOCK_SELECTED] = memnew(Button);
main_menu_hbox->add_child(tool_button[TOOL_LOCK_SELECTED]);
tool_button[TOOL_LOCK_SELECTED]->set_flat(true);
- button_binds.write[0] = MENU_LOCK_SELECTED;
- tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_LOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_LOCK_SELECTED));
tool_button[TOOL_LOCK_SELECTED]->set_tooltip(TTR("Lock selected node, preventing selection and movement."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
tool_button[TOOL_LOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/lock_selected_nodes", TTR("Lock Selected Node(s)"), KeyModifierMask::CMD | Key::L));
@@ -7610,8 +7787,7 @@ Node3DEditor::Node3DEditor() {
tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button);
main_menu_hbox->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
tool_button[TOOL_UNLOCK_SELECTED]->set_flat(true);
- button_binds.write[0] = MENU_UNLOCK_SELECTED;
- tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_UNLOCK_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNLOCK_SELECTED));
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip(TTR("Unlock selected node, allowing selection and movement."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
tool_button[TOOL_UNLOCK_SELECTED]->set_shortcut(ED_SHORTCUT("editor/unlock_selected_nodes", TTR("Unlock Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::L));
@@ -7619,8 +7795,7 @@ Node3DEditor::Node3DEditor() {
tool_button[TOOL_GROUP_SELECTED] = memnew(Button);
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
tool_button[TOOL_GROUP_SELECTED]->set_flat(true);
- button_binds.write[0] = MENU_GROUP_SELECTED;
- tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_GROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_GROUP_SELECTED));
tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KeyModifierMask::CMD | Key::G));
@@ -7628,8 +7803,7 @@ Node3DEditor::Node3DEditor() {
tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button);
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
tool_button[TOOL_UNGROUP_SELECTED]->set_flat(true);
- button_binds.write[0] = MENU_UNGROUP_SELECTED;
- tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed), button_binds);
+ tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNGROUP_SELECTED));
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected."));
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::G));
@@ -7640,8 +7814,7 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_option_button[TOOL_OPT_LOCAL_COORDS]);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_LOCAL_COORDS;
- tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds);
+ tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled).bind(MENU_TOOL_LOCAL_COORDS));
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTR("Use Local Space"), Key::T));
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut_context(this);
@@ -7649,8 +7822,7 @@ Node3DEditor::Node3DEditor() {
main_menu_hbox->add_child(tool_option_button[TOOL_OPT_USE_SNAP]);
tool_option_button[TOOL_OPT_USE_SNAP]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_USE_SNAP]->set_flat(true);
- button_binds.write[0] = MENU_TOOL_USE_SNAP;
- tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds);
+ tool_option_button[TOOL_OPT_USE_SNAP]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled).bind(MENU_TOOL_USE_SNAP));
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTR("Use Snap"), Key::Y));
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut_context(this);
@@ -7661,8 +7833,7 @@ Node3DEditor::Node3DEditor() {
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_toggle_mode(true);
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_flat(true);
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_disabled(true);
- button_binds.write[0] = MENU_TOOL_OVERRIDE_CAMERA;
- tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled), button_binds);
+ tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->connect("toggled", callable_mp(this, &Node3DEditor::_menu_item_toggled).bind(MENU_TOOL_OVERRIDE_CAMERA));
_update_camera_override_button(false);
main_menu_hbox->add_child(memnew(VSeparator));
@@ -7670,7 +7841,7 @@ Node3DEditor::Node3DEditor() {
sun_button->set_tooltip(TTR("Toggle preview sunlight.\nIf a DirectionalLight3D node is added to the scene, preview sunlight is disabled."));
sun_button->set_toggle_mode(true);
sun_button->set_flat(true);
- sun_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), varray(), CONNECT_DEFERRED);
+ sun_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
sun_button->set_disabled(true);
main_menu_hbox->add_child(sun_button);
@@ -7679,7 +7850,7 @@ Node3DEditor::Node3DEditor() {
environ_button->set_tooltip(TTR("Toggle preview environment.\nIf a WorldEnvironment node is added to the scene, preview environment is disabled."));
environ_button->set_toggle_mode(true);
environ_button->set_flat(true);
- environ_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), varray(), CONNECT_DEFERRED);
+ environ_button->connect("pressed", callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
environ_button->set_disabled(true);
main_menu_hbox->add_child(environ_button);
@@ -7866,7 +8037,7 @@ Node3DEditor::Node3DEditor() {
settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar);
for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) {
- settings_dialog->connect("confirmed", callable_mp(viewports[i], &Node3DEditorViewport::_view_settings_confirmed), varray(0.0));
+ settings_dialog->connect("confirmed", callable_mp(viewports[i], &Node3DEditorViewport::_view_settings_confirmed).bind(0.0));
}
/* XFORM DIALOG */
@@ -8028,7 +8199,7 @@ void fragment() {
sun_color->set_edit_alpha(false);
sun_vb->add_margin_child(TTR("Sun Color"), sun_color);
sun_color->connect("color_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
- sun_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(sun_color->get_picker()));
+ sun_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(sun_color->get_picker()));
sun_energy = memnew(EditorSpinSlider);
sun_vb->add_margin_child(TTR("Sun Energy"), sun_energy);
@@ -8044,7 +8215,7 @@ void fragment() {
sun_add_to_scene = memnew(Button);
sun_add_to_scene->set_text(TTR("Add Sun to Scene"));
sun_add_to_scene->set_tooltip(TTR("Adds a DirectionalLight3D node matching the preview sun settings to the current scene.\nHold Shift while clicking to also add the preview environment to the current scene."));
- sun_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_sun_to_scene), varray(false));
+ sun_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_sun_to_scene).bind(false));
sun_vb->add_spacer();
sun_vb->add_child(sun_add_to_scene);
@@ -8074,12 +8245,12 @@ void fragment() {
environ_sky_color = memnew(ColorPickerButton);
environ_sky_color->set_edit_alpha(false);
environ_sky_color->connect("color_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
- environ_sky_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(environ_sky_color->get_picker()));
+ environ_sky_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(environ_sky_color->get_picker()));
environ_vb->add_margin_child(TTR("Sky Color"), environ_sky_color);
environ_ground_color = memnew(ColorPickerButton);
environ_ground_color->connect("color_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
environ_ground_color->set_edit_alpha(false);
- environ_ground_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(environ_ground_color->get_picker()));
+ environ_ground_color->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(environ_ground_color->get_picker()));
environ_vb->add_margin_child(TTR("Ground Color"), environ_ground_color);
environ_energy = memnew(EditorSpinSlider);
environ_energy->connect("value_changed", callable_mp(this, &Node3DEditor::_preview_settings_changed).unbind(1));
@@ -8091,29 +8262,29 @@ void fragment() {
environ_ao_button = memnew(Button);
environ_ao_button->set_text(TTR("AO"));
environ_ao_button->set_toggle_mode(true);
- environ_ao_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), varray(), CONNECT_DEFERRED);
+ environ_ao_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
fx_vb->add_child(environ_ao_button);
environ_glow_button = memnew(Button);
environ_glow_button->set_text(TTR("Glow"));
environ_glow_button->set_toggle_mode(true);
- environ_glow_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), varray(), CONNECT_DEFERRED);
+ environ_glow_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
fx_vb->add_child(environ_glow_button);
environ_tonemap_button = memnew(Button);
environ_tonemap_button->set_text(TTR("Tonemap"));
environ_tonemap_button->set_toggle_mode(true);
- environ_tonemap_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), varray(), CONNECT_DEFERRED);
+ environ_tonemap_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
fx_vb->add_child(environ_tonemap_button);
environ_gi_button = memnew(Button);
environ_gi_button->set_text(TTR("GI"));
environ_gi_button->set_toggle_mode(true);
- environ_gi_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), varray(), CONNECT_DEFERRED);
+ environ_gi_button->connect("pressed", callable_mp(this, &Node3DEditor::_preview_settings_changed), CONNECT_DEFERRED);
fx_vb->add_child(environ_gi_button);
environ_vb->add_margin_child(TTR("Post Process"), fx_vb);
environ_add_to_scene = memnew(Button);
environ_add_to_scene->set_text(TTR("Add Environment to Scene"));
environ_add_to_scene->set_tooltip(TTR("Adds a WorldEnvironment node matching the preview environment settings to the current scene.\nHold Shift while clicking to also add the preview sun to the current scene."));
- environ_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_environment_to_scene), varray(false));
+ environ_add_to_scene->connect("pressed", callable_mp(this, &Node3DEditor::_add_environment_to_scene).bind(false));
environ_vb->add_spacer();
environ_vb->add_child(environ_add_to_scene);
@@ -8140,7 +8311,6 @@ void fragment() {
_preview_settings_changed();
}
}
-
Node3DEditor::~Node3DEditor() {
memdelete(preview_node);
}
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 244b461e16..4469271a38 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -227,6 +227,9 @@ private:
Label *locked_label = nullptr;
Label *zoom_limit_label = nullptr;
+ Label *preview_material_label = nullptr;
+ Label *preview_material_label_desc = nullptr;
+
VBoxContainer *top_right_vbox = nullptr;
ViewportRotationControl *rotation_control = nullptr;
Gradient *frame_time_gradient = nullptr;
@@ -244,7 +247,7 @@ private:
void _compute_edit(const Point2 &p_point);
void _clear_selected();
void _select_clicked(bool p_allow_locked);
- ObjectID _select_ray(const Point2 &p_pos);
+ ObjectID _select_ray(const Point2 &p_pos) const;
void _find_items_at_pos(const Point2 &p_pos, Vector<_RayResult> &r_results, bool p_include_locked);
Vector3 _get_ray_pos(const Vector2 &p_pos) const;
Vector3 _get_ray(const Vector2 &p_pos) const;
@@ -272,6 +275,7 @@ private:
float get_fov() const;
ObjectID clicked;
+ ObjectID material_target;
Vector<_RayResult> selection_results;
bool clicked_wants_append = false;
bool selection_in_progress = false;
@@ -399,8 +403,11 @@ private:
Node *_sanitize_preview_node(Node *p_node) const;
- void _create_preview(const Vector<String> &files) const;
- void _remove_preview();
+ void _create_preview_node(const Vector<String> &files) const;
+ void _remove_preview_node();
+ bool _apply_preview_material(ObjectID p_target, const Point2 &p_point) const;
+ void _reset_preview_material() const;
+ void _remove_preview_material();
bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node);
bool _create_instance(Node *parent, String &path, const Point2 &p_point);
void _perform_drop_data();
@@ -593,6 +600,11 @@ private:
Node3D *preview_node = nullptr;
AABB preview_bounds;
+ Ref<Material> preview_material;
+ Ref<Material> preview_reset_material;
+ ObjectID preview_material_target;
+ int preview_material_surface = -1;
+
struct Gizmo {
bool visible = false;
real_t scale = 0;
@@ -850,6 +862,15 @@ public:
void set_can_preview(Camera3D *p_preview);
+ void set_preview_material(Ref<Material> p_material) { preview_material = p_material; }
+ Ref<Material> get_preview_material() { return preview_material; }
+ void set_preview_reset_material(Ref<Material> p_material) { preview_reset_material = p_material; }
+ Ref<Material> get_preview_reset_material() const { return preview_reset_material; }
+ void set_preview_material_target(ObjectID p_object_id) { preview_material_target = p_object_id; }
+ ObjectID get_preview_material_target() const { return preview_material_target; }
+ void set_preview_material_surface(int p_surface) { preview_material_surface = p_surface; }
+ int get_preview_material_surface() const { return preview_material_surface; }
+
Node3DEditorViewport *get_editor_viewport(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, static_cast<int>(VIEWPORTS_COUNT), nullptr);
return viewports[p_idx];
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 9e666ef70a..fd331c4127 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -537,7 +537,7 @@ Path2DEditor::Path2DEditor() {
curve_edit->set_toggle_mode(true);
curve_edit->set_focus_mode(Control::FOCUS_NONE);
curve_edit->set_tooltip(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point"));
- curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT));
+ curve_edit->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT));
base_hb->add_child(curve_edit);
curve_edit_curve = memnew(Button);
@@ -545,7 +545,7 @@ Path2DEditor::Path2DEditor() {
curve_edit_curve->set_toggle_mode(true);
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
curve_edit_curve->set_tooltip(TTR("Select Control Points (Shift+Drag)"));
- curve_edit_curve->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_EDIT_CURVE));
+ curve_edit_curve->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT_CURVE));
base_hb->add_child(curve_edit_curve);
curve_create = memnew(Button);
@@ -553,7 +553,7 @@ Path2DEditor::Path2DEditor() {
curve_create->set_toggle_mode(true);
curve_create->set_focus_mode(Control::FOCUS_NONE);
curve_create->set_tooltip(TTR("Add Point (in empty space)"));
- curve_create->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_CREATE));
+ curve_create->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CREATE));
base_hb->add_child(curve_create);
curve_del = memnew(Button);
@@ -561,14 +561,14 @@ Path2DEditor::Path2DEditor() {
curve_del->set_toggle_mode(true);
curve_del->set_focus_mode(Control::FOCUS_NONE);
curve_del->set_tooltip(TTR("Delete Point"));
- curve_del->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(MODE_DELETE));
+ curve_del->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_DELETE));
base_hb->add_child(curve_del);
curve_close = memnew(Button);
curve_close->set_flat(true);
curve_close->set_focus_mode(Control::FOCUS_NONE);
curve_close->set_tooltip(TTR("Close Curve"));
- curve_close->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected), varray(ACTION_CLOSE));
+ curve_close->connect("pressed", callable_mp(this, &Path2DEditor::_mode_selected).bind(ACTION_CLOSE));
base_hb->add_child(curve_close);
PopupMenu *menu;
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 36f559b2ae..65b15a6001 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/math/geometry_3d.h"
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "node_3d_editor_plugin.h"
#include "scene/resources/curve.h"
@@ -557,9 +558,9 @@ void Path3DEditorPlugin::_update_theme() {
void Path3DEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- curve_create->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(0));
- curve_edit->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(1));
- curve_del->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed), make_binds(2));
+ curve_create->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(0));
+ curve_edit->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(1));
+ curve_del->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(2));
curve_close->connect("pressed", callable_mp(this, &Path3DEditorPlugin::_close_curve));
_update_theme();
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index a682bb455c..4f46c99a04 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -192,7 +192,7 @@ void Polygon2DEditor::_update_bone_list() {
cb->set_pressed(true);
}
- cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected), varray(i));
+ cb->connect("pressed", callable_mp(this, &Polygon2DEditor::_bone_paint_selected).bind(i));
}
uv_edit_draw->update();
@@ -1238,7 +1238,7 @@ Polygon2DEditor::Polygon2DEditor() {
button_uv->set_flat(true);
add_child(button_uv);
button_uv->set_tooltip(TTR("Open Polygon 2D UV editor."));
- button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option), varray(MODE_EDIT_UV));
+ button_uv->connect("pressed", callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
uv_mode = UV_MODE_EDIT_POINT;
uv_edit = memnew(AcceptDialog);
@@ -1276,10 +1276,10 @@ Polygon2DEditor::Polygon2DEditor() {
uv_edit_mode[2]->set_button_group(uv_edit_group);
uv_edit_mode[3]->set_button_group(uv_edit_group);
- uv_edit_mode[0]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(0));
- uv_edit_mode[1]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(1));
- uv_edit_mode[2]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(2));
- uv_edit_mode[3]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select), varray(3));
+ uv_edit_mode[0]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(0));
+ uv_edit_mode[1]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(1));
+ uv_edit_mode[2]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(2));
+ uv_edit_mode[3]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_edit_mode_select).bind(3));
uv_mode_hb->add_child(memnew(VSeparator));
@@ -1289,7 +1289,7 @@ Polygon2DEditor::Polygon2DEditor() {
uv_button[i]->set_flat(true);
uv_button[i]->set_toggle_mode(true);
uv_mode_hb->add_child(uv_button[i]);
- uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode), varray(i));
+ uv_button[i]->connect("pressed", callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
uv_button[i]->set_focus_mode(FOCUS_NONE);
}
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 1c69e0d635..83092f990f 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -532,13 +532,13 @@ Polygon3DEditor::Polygon3DEditor() {
button_create = memnew(Button);
button_create->set_flat(true);
add_child(button_create);
- button_create->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option), varray(MODE_CREATE));
+ button_create->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_CREATE));
button_create->set_toggle_mode(true);
button_edit = memnew(Button);
button_edit->set_flat(true);
add_child(button_edit);
- button_edit->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option), varray(MODE_EDIT));
+ button_edit->connect("pressed", callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_EDIT));
button_edit->set_toggle_mode(true);
mode = MODE_EDIT;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index f4d42ff456..bbf5ffa462 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -41,6 +41,7 @@
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -590,7 +591,7 @@ void ScriptEditor::_go_to_tab(int p_idx) {
}
}
- Control *c = Object::cast_to<Control>(tab_container->get_tab_control(p_idx));
+ Control *c = tab_container->get_tab_control(p_idx);
if (!c) {
return;
}
@@ -812,7 +813,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
if (history_pos >= 0) {
idx = tab_container->get_tab_idx_from_control(history[history_pos].control);
}
- tab_container->set_current_tab(idx);
+ _go_to_tab(idx);
} else {
_update_selected_editor_menu();
}
@@ -882,7 +883,7 @@ void ScriptEditor::_queue_close_tabs() {
// Maybe there are unsaved changes.
if (se->is_unsaved()) {
_ask_close_current_unsaved_tab(se);
- erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), varray(), CONNECT_ONESHOT);
+ erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), CONNECT_ONESHOT);
break;
}
}
@@ -1447,20 +1448,20 @@ void ScriptEditor::_menu_option(int p_option) {
case WINDOW_MOVE_UP: {
if (tab_container->get_current_tab() > 0) {
tab_container->move_child(current, tab_container->get_current_tab() - 1);
- tab_container->set_current_tab(tab_container->get_current_tab() - 1);
+ tab_container->set_current_tab(tab_container->get_current_tab());
_update_script_names();
}
} break;
case WINDOW_MOVE_DOWN: {
if (tab_container->get_current_tab() < tab_container->get_tab_count() - 1) {
tab_container->move_child(current, tab_container->get_current_tab() + 1);
- tab_container->set_current_tab(tab_container->get_current_tab() + 1);
+ tab_container->set_current_tab(tab_container->get_current_tab());
_update_script_names();
}
} break;
default: {
if (p_option >= WINDOW_SELECT_BASE) {
- tab_container->set_current_tab(p_option - WINDOW_SELECT_BASE);
+ _go_to_tab(p_option - WINDOW_SELECT_BASE);
_update_script_names();
}
}
@@ -1493,14 +1494,14 @@ void ScriptEditor::_menu_option(int p_option) {
case WINDOW_MOVE_UP: {
if (tab_container->get_current_tab() > 0) {
tab_container->move_child(help, tab_container->get_current_tab() - 1);
- tab_container->set_current_tab(tab_container->get_current_tab() - 1);
+ tab_container->set_current_tab(tab_container->get_current_tab());
_update_script_names();
}
} break;
case WINDOW_MOVE_DOWN: {
if (tab_container->get_current_tab() < tab_container->get_tab_count() - 1) {
tab_container->move_child(help, tab_container->get_current_tab() + 1);
- tab_container->set_current_tab(tab_container->get_current_tab() + 1);
+ tab_container->set_current_tab(tab_container->get_current_tab());
_update_script_names();
}
} break;
@@ -1542,7 +1543,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(EditorSettings::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
+ file_dialog->set_current_path(EditorPaths::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme")));
file_dialog->popup_file_dialog();
file_dialog->set_title(TTR("Save Theme As..."));
}
@@ -2124,8 +2125,8 @@ void ScriptEditor::_update_script_names() {
sd.index = i;
sedata.set(i, sd);
}
- tab_container->set_current_tab(new_prev_tab);
- tab_container->set_current_tab(new_cur_tab);
+ _go_to_tab(new_prev_tab);
+ _go_to_tab(new_cur_tab);
_sort_list_on_update = false;
}
@@ -2153,8 +2154,10 @@ void ScriptEditor::_update_script_names() {
}
if (tab_container->get_current_tab() == sedata_filtered[i].index) {
script_list->select(index);
+
script_name_label->set_text(sedata_filtered[i].name);
script_icon->set_texture(sedata_filtered[i].icon);
+
ScriptEditorBase *se = _get_current_editor();
if (se) {
se->enable_editor();
@@ -3264,7 +3267,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
p_layout->set_value("ScriptEditor", "list_split_offset", list_split->get_split_offset());
// Save the cache.
- script_editor_cache->save(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
+ script_editor_cache->save(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
}
void ScriptEditor::_help_class_open(const String &p_class) {
@@ -3645,7 +3648,7 @@ ScriptEditor::ScriptEditor() {
current_theme = "";
script_editor_cache.instantiate();
- script_editor_cache->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
+ script_editor_cache->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("script_editor_cache.cfg"));
completion_cache = memnew(EditorScriptCodeCompletionCache);
restoring_layout = false;
@@ -3685,7 +3688,7 @@ 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), varray(), CONNECT_DEFERRED);
+ script_list->connect("gui_input", callable_mp(this, &ScriptEditor::_script_list_gui_input), CONNECT_DEFERRED);
script_list->set_allow_rmb_select(true);
script_list->set_drag_forwarding(this);
@@ -3853,14 +3856,14 @@ ScriptEditor::ScriptEditor() {
site_search = memnew(Button);
site_search->set_flat(true);
site_search->set_text(TTR("Online Docs"));
- site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_WEBSITE));
+ site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
menu_hb->add_child(site_search);
site_search->set_tooltip(TTR("Open Godot online documentation."));
help_search = memnew(Button);
help_search->set_flat(true);
help_search->set_text(TTR("Search Help"));
- help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option), varray(SEARCH_HELP));
+ help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_HELP));
menu_hb->add_child(help_search);
help_search->set_tooltip(TTR("Search the reference documentation."));
@@ -3885,7 +3888,7 @@ ScriptEditor::ScriptEditor() {
erase_tab_confirm = memnew(ConfirmationDialog);
erase_tab_confirm->set_ok_button_text(TTR("Save"));
erase_tab_confirm->add_button(TTR("Discard"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard");
- erase_tab_confirm->connect("confirmed", callable_mp(this, &ScriptEditor::_close_current_tab), varray(true));
+ erase_tab_confirm->connect("confirmed", callable_mp(this, &ScriptEditor::_close_current_tab).bind(true));
erase_tab_confirm->connect("custom_action", callable_mp(this, &ScriptEditor::_close_discard_current_tab));
add_child(erase_tab_confirm);
@@ -3939,8 +3942,8 @@ ScriptEditor::ScriptEditor() {
help_search_dialog->connect("go_to_help", callable_mp(this, &ScriptEditor::_help_class_goto));
find_in_files_dialog = memnew(FindInFilesDialog);
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files), varray(false));
- find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files), varray(true));
+ find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_FIND_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files).bind(false));
+ find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, callable_mp(this, &ScriptEditor::_start_find_in_files).bind(true));
add_child(find_in_files_dialog);
find_in_files = memnew(FindInFilesPanel);
find_in_files_button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Search Results"), find_in_files);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 14e3eb5402..5d5f452390 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1456,7 +1456,7 @@ void ScriptTextEditor::clear_breakpoints() {
void ScriptTextEditor::set_tooltip_request_func(const Callable &p_toolip_callback) {
Variant args[1] = { this };
const Variant *argp[] = { &args[0] };
- code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bind(argp, 1));
+ code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bindp(argp, 1));
}
void ScriptTextEditor::set_debugger_active(bool p_active) {
@@ -1862,7 +1862,7 @@ void ScriptTextEditor::_enable_code_editor() {
color_picker = memnew(ColorPicker);
color_picker->set_deferred_mode(true);
color_picker->connect("color_changed", callable_mp(this, &ScriptTextEditor::_color_changed));
- color_panel->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(color_picker));
+ color_panel->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(color_picker));
color_panel->add_child(color_picker);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index bdf566e991..e700412188 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -41,7 +41,6 @@
#include "editor/filesystem_dock.h"
#include "editor/plugins/visual_shader_editor_plugin.h"
#include "editor/project_settings_editor.h"
-#include "editor/property_editor.h"
#include "editor/shader_create_dialog.h"
#include "scene/gui/split_container.h"
#include "servers/display_server.h"
@@ -309,9 +308,9 @@ void ShaderTextEditor::_check_shader_mode() {
}
}
-static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
- RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
- return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
+static ShaderLanguage::DataType _get_global_shader_uniform_type(const StringName &p_variable) {
+ RS::GlobalShaderUniformType gvt = RS::get_singleton()->global_shader_uniform_get_type(p_variable);
+ return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
}
static String complete_from_path;
@@ -358,7 +357,7 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLa
ShaderLanguage sl;
String calltip;
ShaderLanguage::ShaderCompileInfo info;
- info.global_variable_type_func = _get_global_variable_type;
+ info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
if (shader.is_null()) {
info.is_include = true;
@@ -448,7 +447,7 @@ void ShaderTextEditor::_validate_script() {
sl.set_warning_flags(flags);
ShaderLanguage::ShaderCompileInfo info;
- info.global_variable_type_func = _get_global_variable_type;
+ info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
if (shader.is_null()) {
info.is_include = true;
@@ -831,18 +830,18 @@ void ShaderEditor::save_external_data(const String &p_str) {
Ref<Shader> edited_shader = shader_editor->get_edited_shader();
if (edited_shader.is_valid()) {
- ResourceSaver::save(edited_shader->get_path(), edited_shader);
+ ResourceSaver::save(edited_shader);
}
if (shader.is_valid() && shader != edited_shader) {
- ResourceSaver::save(shader->get_path(), 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->get_path(), edited_shader_inc);
+ ResourceSaver::save(edited_shader_inc);
}
if (shader_inc.is_valid() && shader_inc != edited_shader_inc) {
- ResourceSaver::save(shader_inc->get_path(), shader_inc);
+ ResourceSaver::save(shader_inc);
}
disk_changed->hide();
@@ -1424,7 +1423,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Shader Editor"), main_split);
// Defer connect because Editor class is not in the binding system yet.
- EditorNode::get_singleton()->call_deferred("connect", "resource_saved", callable_mp(this, &ShaderEditorPlugin::_resource_saved), varray(), CONNECT_DEFERRED);
+ EditorNode::get_singleton()->call_deferred("connect", "resource_saved", callable_mp(this, &ShaderEditorPlugin::_resource_saved), CONNECT_DEFERRED);
shader_create_dialog = memnew(ShaderCreateDialog);
vb->add_child(shader_create_dialog);
diff --git a/editor/plugins/shader_file_editor_plugin.cpp b/editor/plugins/shader_file_editor_plugin.cpp
index 4458555de2..4874944d33 100644
--- a/editor/plugins/shader_file_editor_plugin.cpp
+++ b/editor/plugins/shader_file_editor_plugin.cpp
@@ -37,7 +37,6 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "editor/property_editor.h"
#include "servers/display_server.h"
#include "servers/rendering/shader_types.h"
@@ -282,7 +281,7 @@ ShaderFileEditor::ShaderFileEditor() {
stage_hb->add_child(button);
stages[i] = button;
button->set_button_group(bg);
- button->connect("pressed", callable_mp(this, &ShaderFileEditor::_version_selected), varray(i));
+ button->connect("pressed", callable_mp(this, &ShaderFileEditor::_version_selected).bind(i));
}
error_text = memnew(RichTextLabel);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 93e44c8ca0..ed0d14efb7 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -157,7 +157,7 @@ void BoneTransformEditor::_property_keyed(const String &p_path, bool p_advance)
if (split.size() == 3 && split[0] == "bones") {
int bone_idx = split[1].to_int();
if (split[2] == "position") {
- te->insert_transform_key(skeleton, skeleton->get_bone_name(bone_idx), Animation::TYPE_POSITION_3D, skeleton->get(p_path));
+ te->insert_transform_key(skeleton, skeleton->get_bone_name(bone_idx), Animation::TYPE_POSITION_3D, (Vector3)skeleton->get(p_path) / skeleton->get_motion_scale());
}
if (split[2] == "rotation") {
te->insert_transform_key(skeleton, skeleton->get_bone_name(bone_idx), Animation::TYPE_ROTATION_3D, skeleton->get(p_path));
@@ -319,7 +319,7 @@ void Skeleton3DEditor::insert_keys(const bool p_all_bones) {
}
if (pos_enabled && (p_all_bones || te->has_track(skeleton, name, Animation::TYPE_POSITION_3D))) {
- te->insert_transform_key(skeleton, name, Animation::TYPE_POSITION_3D, skeleton->get_bone_pose_position(i));
+ te->insert_transform_key(skeleton, name, Animation::TYPE_POSITION_3D, skeleton->get_bone_pose_position(i) / skeleton->get_motion_scale());
}
if (rot_enabled && (p_all_bones || te->has_track(skeleton, name, Animation::TYPE_ROTATION_3D))) {
te->insert_transform_key(skeleton, name, Animation::TYPE_ROTATION_3D, skeleton->get_bone_pose_rotation(i));
@@ -515,7 +515,7 @@ void Skeleton3DEditor::_file_selected(const String &p_file) {
}
}
- Error err = ResourceSaver::save(p_file, sp);
+ Error err = ResourceSaver::save(sp, p_file);
if (err != OK) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), p_file));
@@ -782,7 +782,7 @@ void Skeleton3DEditor::create_editors() {
key_insert_button = memnew(Button);
key_insert_button->set_flat(true);
key_insert_button->set_focus_mode(FOCUS_NONE);
- key_insert_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys), varray(false));
+ key_insert_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys).bind(false));
key_insert_button->set_tooltip(TTR("Insert key of bone poses already exist track."));
key_insert_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_to_existing_tracks", TTR("Insert Key (Existing Tracks)"), Key::INSERT));
animation_hb->add_child(key_insert_button);
@@ -790,7 +790,7 @@ void Skeleton3DEditor::create_editors() {
key_insert_all_button = memnew(Button);
key_insert_all_button->set_flat(true);
key_insert_all_button->set_focus_mode(FOCUS_NONE);
- key_insert_all_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys), varray(true));
+ key_insert_all_button->connect("pressed", callable_mp(this, &Skeleton3DEditor::insert_keys).bind(true));
key_insert_all_button->set_tooltip(TTR("Insert key of all bone poses."));
key_insert_all_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_of_all_bones", TTR("Insert Key (All Bones)"), KeyModifierMask::CMD + Key::INSERT));
animation_hb->add_child(key_insert_all_button);
@@ -836,7 +836,7 @@ void Skeleton3DEditor::_notification(int p_what) {
key_scale_button->set_icon(get_theme_icon(SNAME("KeyScale"), SNAME("EditorIcons")));
key_insert_button->set_icon(get_theme_icon(SNAME("Key"), SNAME("EditorIcons")));
key_insert_all_button->set_icon(get_theme_icon(SNAME("NewKey"), SNAME("EditorIcons")));
- get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ get_tree()->connect("node_removed", callable_mp(this, &Skeleton3DEditor::_node_removed), Object::CONNECT_ONESHOT);
break;
}
case NOTIFICATION_ENTER_TREE: {
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 0b6c0a9f0c..a39d24a167 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1306,7 +1306,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
empty2->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));
- file->connect("files_selected", callable_mp(this, &SpriteFramesEditor::_file_load_request), make_binds(-1));
+ file->connect("files_selected", callable_mp(this, &SpriteFramesEditor::_file_load_request).bind(-1));
loading_scene = false;
sel = -1;
@@ -1333,7 +1333,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_h->set_max(128);
split_sheet_h->set_step(1);
split_sheet_hb->add_child(split_sheet_h);
- split_sheet_h->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_FRAME_COUNT));
+ split_sheet_h->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_FRAME_COUNT));
split_sheet_hb->add_child(memnew(Label(TTR("Vertical:"))));
split_sheet_v = memnew(SpinBox);
@@ -1341,7 +1341,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_v->set_max(128);
split_sheet_v->set_step(1);
split_sheet_hb->add_child(split_sheet_v);
- split_sheet_v->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_FRAME_COUNT));
+ split_sheet_v->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_FRAME_COUNT));
split_sheet_hb->add_child(memnew(VSeparator));
split_sheet_hb->add_child(memnew(Label(TTR("Size:"))));
@@ -1349,13 +1349,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_size_x->set_min(1);
split_sheet_size_x->set_step(1);
split_sheet_size_x->set_suffix("px");
- split_sheet_size_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_SIZE));
+ split_sheet_size_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_SIZE));
split_sheet_hb->add_child(split_sheet_size_x);
split_sheet_size_y = memnew(SpinBox);
split_sheet_size_y->set_min(1);
split_sheet_size_y->set_step(1);
split_sheet_size_y->set_suffix("px");
- split_sheet_size_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_SIZE));
+ split_sheet_size_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_SIZE));
split_sheet_hb->add_child(split_sheet_size_y);
split_sheet_hb->add_child(memnew(VSeparator));
@@ -1364,13 +1364,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_sep_x->set_min(0);
split_sheet_sep_x->set_step(1);
split_sheet_sep_x->set_suffix("px");
- split_sheet_sep_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_USE_CURRENT));
+ split_sheet_sep_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
split_sheet_hb->add_child(split_sheet_sep_x);
split_sheet_sep_y = memnew(SpinBox);
split_sheet_sep_y->set_min(0);
split_sheet_sep_y->set_step(1);
split_sheet_sep_y->set_suffix("px");
- split_sheet_sep_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_USE_CURRENT));
+ split_sheet_sep_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
split_sheet_hb->add_child(split_sheet_sep_y);
split_sheet_hb->add_child(memnew(VSeparator));
@@ -1379,13 +1379,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_offset_x->set_min(0);
split_sheet_offset_x->set_step(1);
split_sheet_offset_x->set_suffix("px");
- split_sheet_offset_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_USE_CURRENT));
+ split_sheet_offset_x->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
split_sheet_hb->add_child(split_sheet_offset_x);
split_sheet_offset_y = memnew(SpinBox);
split_sheet_offset_y->set_min(0);
split_sheet_offset_y->set_step(1);
split_sheet_offset_y->set_suffix("px");
- split_sheet_offset_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed), varray(PARAM_USE_CURRENT));
+ split_sheet_offset_y->connect("value_changed", callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
split_sheet_hb->add_child(split_sheet_offset_y);
split_sheet_hb->add_spacer();
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 84caede081..196d87da36 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -32,6 +32,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
void TextEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) {
ERR_FAIL_COND(p_highlighter.is_null());
@@ -275,7 +276,7 @@ void TextEditor::update_settings() {
void TextEditor::set_tooltip_request_func(const Callable &p_toolip_callback) {
Variant args[1] = { this };
const Variant *argp[] = { &args[0] };
- code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bind(argp, 1));
+ code_editor->get_text_editor()->set_tooltip_request_func(p_toolip_callback.bindp(argp, 1));
}
Control *TextEditor::get_edit_menu() {
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index dd98247428..0bd8a8a484 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -35,7 +35,9 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/check_box.h"
+#include "scene/gui/separator.h"
#include "scene/gui/view_panner.h"
#include "scene/resources/texture.h"
@@ -239,7 +241,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_bind(callable_mp(this, &TextureRegionEditor::_pan_callback), Vector2(1, 0)).call_deferred(nullptr, 0);
+ callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferredp(nullptr, 0);
request_center = false;
}
@@ -1153,7 +1155,7 @@ bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const
if (((Object::cast_to<Sprite2D>(p_object) || Object::cast_to<Sprite3D>(p_object) || Object::cast_to<NinePatchRect>(p_object) || Object::cast_to<StyleBoxTexture>(p_object)) && p_path == "region_rect") || (Object::cast_to<AtlasTexture>(p_object) && p_path == "region")) {
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region"));
button->set_icon(texture_region_editor->get_theme_icon(SNAME("RegionEdit"), SNAME("EditorIcons")));
- button->connect("pressed", callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit), varray(p_object));
+ button->connect("pressed", callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit).bind(p_object));
add_property_editor(p_path, button, true);
}
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 744ed1f1a2..2a61ea0baa 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_resource_picker.h"
#include "editor/editor_scale.h"
#include "editor/progress_dialog.h"
+#include "scene/gui/color_picker.h"
void ThemeItemImportTree::_update_items_tree() {
import_items_tree->clear();
@@ -1103,15 +1104,15 @@ ThemeItemImportTree::ThemeItemImportTree() {
select_all_items_button->set_flat(true);
select_all_items_button->set_tooltip(select_all_items_tooltip);
button_set->add_child(select_all_items_button);
- select_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_all_data_type_pressed), varray(i));
+ select_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_all_data_type_pressed).bind(i));
select_full_items_button->set_flat(true);
select_full_items_button->set_tooltip(select_full_items_tooltip);
button_set->add_child(select_full_items_button);
- select_full_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_full_data_type_pressed), varray(i));
+ select_full_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_select_full_data_type_pressed).bind(i));
deselect_all_items_button->set_flat(true);
deselect_all_items_button->set_tooltip(deselect_all_items_tooltip);
button_set->add_child(deselect_all_items_button);
- deselect_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_deselect_all_data_type_pressed), varray(i));
+ deselect_all_items_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_deselect_all_data_type_pressed).bind(i));
total_selected_items_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
total_selected_items_label->hide();
@@ -1142,12 +1143,12 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_collapse_types_button->set_flat(true);
import_collapse_types_button->set_tooltip(TTR("Collapse types."));
import_buttons->add_child(import_collapse_types_button);
- import_collapse_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items), varray(true));
+ import_collapse_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(true));
import_expand_types_button = memnew(Button);
import_expand_types_button->set_flat(true);
import_expand_types_button->set_tooltip(TTR("Expand types."));
import_buttons->add_child(import_expand_types_button);
- import_expand_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items), varray(false));
+ import_expand_types_button->connect("pressed", callable_mp(this, &ThemeItemImportTree::_toggle_type_items).bind(false));
import_buttons->add_child(memnew(VSeparator));
@@ -1938,7 +1939,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_add_type_hb->add_child(edit_add_type_value);
edit_add_type_button = memnew(Button);
edit_add_type_hb->add_child(edit_add_type_button);
- edit_add_type_button->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_add_theme_type), varray(""));
+ edit_add_type_button->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_add_theme_type).bind(""));
VBoxContainer *edit_items_vb = memnew(VBoxContainer);
edit_items_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1956,42 +1957,42 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_items_add_color->set_flat(true);
edit_items_add_color->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_color);
- edit_items_add_color->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_COLOR));
+ edit_items_add_color->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_COLOR));
edit_items_add_constant = memnew(Button);
edit_items_add_constant->set_tooltip(TTR("Add Constant Item"));
edit_items_add_constant->set_flat(true);
edit_items_add_constant->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_constant);
- edit_items_add_constant->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_CONSTANT));
+ edit_items_add_constant->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_CONSTANT));
edit_items_add_font = memnew(Button);
edit_items_add_font->set_tooltip(TTR("Add Font Item"));
edit_items_add_font->set_flat(true);
edit_items_add_font->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_font);
- edit_items_add_font->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_FONT));
+ edit_items_add_font->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT));
edit_items_add_font_size = memnew(Button);
edit_items_add_font_size->set_tooltip(TTR("Add Font Size Item"));
edit_items_add_font_size->set_flat(true);
edit_items_add_font_size->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_font_size);
- edit_items_add_font_size->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_FONT_SIZE));
+ edit_items_add_font_size->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_FONT_SIZE));
edit_items_add_icon = memnew(Button);
edit_items_add_icon->set_tooltip(TTR("Add Icon Item"));
edit_items_add_icon->set_flat(true);
edit_items_add_icon->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_icon);
- edit_items_add_icon->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_ICON));
+ edit_items_add_icon->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_ICON));
edit_items_add_stylebox = memnew(Button);
edit_items_add_stylebox->set_tooltip(TTR("Add StyleBox Item"));
edit_items_add_stylebox->set_flat(true);
edit_items_add_stylebox->set_disabled(true);
edit_items_toolbar->add_child(edit_items_add_stylebox);
- edit_items_add_stylebox->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog), varray(Theme::DATA_TYPE_STYLEBOX));
+ edit_items_add_stylebox->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_open_add_theme_item_dialog).bind(Theme::DATA_TYPE_STYLEBOX));
edit_items_toolbar->add_child(memnew(VSeparator));
@@ -2271,11 +2272,11 @@ VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) {
LineEdit *item_add_edit = memnew(LineEdit);
item_add_edit->set_h_size_flags(SIZE_EXPAND_FILL);
item_add_hb->add_child(item_add_edit);
- item_add_edit->connect("text_submitted", callable_mp(this, &ThemeTypeEditor::_item_add_lineedit_cbk), varray(p_data_type, item_add_edit));
+ item_add_edit->connect("text_submitted", callable_mp(this, &ThemeTypeEditor::_item_add_lineedit_cbk).bind(p_data_type, item_add_edit));
Button *item_add_button = memnew(Button);
item_add_button->set_text(TTR("Add"));
item_add_hb->add_child(item_add_button);
- item_add_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_add_cbk), varray(p_data_type, item_add_edit));
+ item_add_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_add_cbk).bind(p_data_type, item_add_edit));
return items_list;
}
@@ -2418,7 +2419,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_name_edit->set_h_size_flags(SIZE_EXPAND_FILL);
item_name_edit->set_text(p_item_name);
item_name_container->add_child(item_name_edit);
- item_name_edit->connect("text_submitted", callable_mp(this, &ThemeTypeEditor::_item_rename_entered), varray(p_data_type, p_item_name, item_name_container));
+ item_name_edit->connect("text_submitted", callable_mp(this, &ThemeTypeEditor::_item_rename_entered).bind(p_data_type, p_item_name, item_name_container));
item_name_edit->hide();
Button *item_rename_button = memnew(Button);
@@ -2426,21 +2427,21 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_rename_button->set_tooltip(TTR("Rename Item"));
item_rename_button->set_flat(true);
item_name_container->add_child(item_rename_button);
- item_rename_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_cbk), varray(p_data_type, p_item_name, item_name_container));
+ item_rename_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
Button *item_remove_button = memnew(Button);
item_remove_button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
item_remove_button->set_tooltip(TTR("Remove Item"));
item_remove_button->set_flat(true);
item_name_container->add_child(item_remove_button);
- item_remove_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_remove_cbk), varray(p_data_type, p_item_name));
+ item_remove_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
Button *item_rename_confirm_button = memnew(Button);
item_rename_confirm_button->set_icon(get_theme_icon(SNAME("ImportCheck"), SNAME("EditorIcons")));
item_rename_confirm_button->set_tooltip(TTR("Confirm Item Rename"));
item_rename_confirm_button->set_flat(true);
item_name_container->add_child(item_rename_confirm_button);
- item_rename_confirm_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed), varray(p_data_type, p_item_name, item_name_container));
+ item_rename_confirm_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed).bind(p_data_type, p_item_name, item_name_container));
item_rename_confirm_button->hide();
Button *item_rename_cancel_button = memnew(Button);
@@ -2448,7 +2449,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_rename_cancel_button->set_tooltip(TTR("Cancel Item Rename"));
item_rename_cancel_button->set_flat(true);
item_name_container->add_child(item_rename_cancel_button);
- item_rename_cancel_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_canceled), varray(p_data_type, p_item_name, item_name_container));
+ item_rename_cancel_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_rename_canceled).bind(p_data_type, p_item_name, item_name_container));
item_rename_cancel_button->hide();
} else {
item_name->add_theme_color_override("font_color", get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
@@ -2458,7 +2459,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_override_button->set_tooltip(TTR("Override Item"));
item_override_button->set_flat(true);
item_name_container->add_child(item_override_button);
- item_override_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_override_cbk), varray(p_data_type, p_item_name));
+ item_override_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_item_override_cbk).bind(p_data_type, p_item_name));
}
return item_control;
@@ -2491,8 +2492,8 @@ void ThemeTypeEditor::_update_type_items() {
if (E.value) {
item_editor->set_pick_color(edited_theme->get_color(E.key, edited_type));
- item_editor->connect("color_changed", callable_mp(this, &ThemeTypeEditor::_color_item_changed), varray(E.key));
- item_editor->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(item_editor->get_picker()));
+ item_editor->connect("color_changed", callable_mp(this, &ThemeTypeEditor::_color_item_changed).bind(E.key));
+ item_editor->get_popup()->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(item_editor->get_picker()));
} else {
item_editor->set_pick_color(Theme::get_default()->get_color(E.key, edited_type));
item_editor->set_disabled(true);
@@ -2525,7 +2526,7 @@ void ThemeTypeEditor::_update_type_items() {
if (E.value) {
item_editor->set_value(edited_theme->get_constant(E.key, edited_type));
- item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_constant_item_changed), varray(E.key));
+ item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_constant_item_changed).bind(E.key));
} else {
item_editor->set_value(Theme::get_default()->get_constant(E.key, edited_type));
item_editor->set_editable(false);
@@ -2559,7 +2560,7 @@ void ThemeTypeEditor::_update_type_items() {
item_editor->set_edited_resource(Ref<Resource>());
}
item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item));
- item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_font_item_changed), varray(E.key));
+ item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_font_item_changed).bind(E.key));
} else {
if (Theme::get_default()->has_font(E.key, edited_type)) {
item_editor->set_edited_resource(Theme::get_default()->get_font(E.key, edited_type));
@@ -2596,7 +2597,7 @@ void ThemeTypeEditor::_update_type_items() {
if (E.value) {
item_editor->set_value(edited_theme->get_font_size(E.key, edited_type));
- item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_font_size_item_changed), varray(E.key));
+ item_editor->connect("value_changed", callable_mp(this, &ThemeTypeEditor::_font_size_item_changed).bind(E.key));
} else {
item_editor->set_value(Theme::get_default()->get_font_size(E.key, edited_type));
item_editor->set_editable(false);
@@ -2630,7 +2631,7 @@ void ThemeTypeEditor::_update_type_items() {
item_editor->set_edited_resource(Ref<Resource>());
}
item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item));
- item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_icon_item_changed), varray(E.key));
+ item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_icon_item_changed).bind(E.key));
} else {
if (Theme::get_default()->has_icon(E.key, edited_type)) {
item_editor->set_edited_resource(Theme::get_default()->get_icon(E.key, edited_type));
@@ -2677,7 +2678,7 @@ void ThemeTypeEditor::_update_type_items() {
item_editor->set_edited_resource(Ref<Resource>());
}
item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item));
- item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed), varray(leading_stylebox.item_name));
+ item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed).bind(leading_stylebox.item_name));
stylebox_items_list->add_child(item_control);
stylebox_items_list->add_child(memnew(HSeparator));
@@ -2702,7 +2703,7 @@ void ThemeTypeEditor::_update_type_items() {
item_editor->set_edited_resource(Ref<Resource>());
}
item_editor->connect("resource_selected", callable_mp(this, &ThemeTypeEditor::_edit_resource_item));
- item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed), varray(E.key));
+ item_editor->connect("resource_changed", callable_mp(this, &ThemeTypeEditor::_stylebox_item_changed).bind(E.key));
Button *pin_leader_button = memnew(Button);
pin_leader_button->set_flat(true);
@@ -2710,7 +2711,7 @@ void ThemeTypeEditor::_update_type_items() {
pin_leader_button->set_icon(get_theme_icon(SNAME("Pin"), SNAME("EditorIcons")));
pin_leader_button->set_tooltip(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
item_control->add_child(pin_leader_button);
- pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed), varray(item_editor, E.key));
+ pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
} else {
if (Theme::get_default()->has_stylebox(E.key, edited_type)) {
item_editor->set_edited_resource(Theme::get_default()->get_stylebox(E.key, edited_type));
@@ -3522,8 +3523,8 @@ void ThemeEditor::_preview_scene_dialog_cbk(const String &p_path) {
}
_add_preview_tab(preview_tab, p_path.get_file(), get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")));
- preview_tab->connect("scene_invalidated", callable_mp(this, &ThemeEditor::_remove_preview_tab_invalid), varray(preview_tab));
- preview_tab->connect("scene_reloaded", callable_mp(this, &ThemeEditor::_update_preview_tab), varray(preview_tab));
+ preview_tab->connect("scene_invalidated", callable_mp(this, &ThemeEditor::_remove_preview_tab_invalid).bind(preview_tab));
+ preview_tab->connect("scene_reloaded", callable_mp(this, &ThemeEditor::_update_preview_tab).bind(preview_tab));
}
void ThemeEditor::_add_preview_tab(ThemeEditorPreview *p_preview_tab, const String &p_preview_name, const Ref<Texture2D> &p_icon) {
@@ -3617,13 +3618,13 @@ ThemeEditor::ThemeEditor() {
Button *theme_save_button = memnew(Button);
theme_save_button->set_text(TTR("Save"));
theme_save_button->set_flat(true);
- theme_save_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk), varray(false));
+ theme_save_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(false));
top_menu->add_child(theme_save_button);
Button *theme_save_as_button = memnew(Button);
theme_save_as_button->set_text(TTR("Save As..."));
theme_save_as_button->set_flat(true);
- theme_save_as_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk), varray(true));
+ theme_save_as_button->connect("pressed", callable_mp(this, &ThemeEditor::_theme_save_button_cbk).bind(true));
top_menu->add_child(theme_save_as_button);
top_menu->add_child(memnew(VSeparator));
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 0c7303dda4..b5c6c6d651 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/button.h"
+#include "scene/gui/check_button.h"
#include "scene/gui/color_picker.h"
#include "scene/gui/progress_bar.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 69a3d4e937..1bf24a7393 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -2198,7 +2198,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_fix_selected_and_hovered).unbind(1));
sources_list->connect("item_selected", callable_mp(this, &TileMapEditorTilesPlugin::_update_source_display).unbind(1));
sources_list->connect("item_selected", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_sources_lists_current));
- sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list), varray(sources_list, source_sort_button));
+ sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->add_user_signal(MethodInfo("sort_request"));
sources_list->connect("sort_request", callable_mp(this, &TileMapEditorTilesPlugin::_update_tile_set_sources_list));
split_container_left_side->add_child(sources_list);
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
index 3fe13fd341..12e1615484 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
@@ -340,7 +340,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
source_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
source_level_list->set_select_mode(ItemList::SELECT_MULTI);
source_level_list->set_allow_rmb_select(true);
- source_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(source_level_list));
+ source_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked).bind(source_level_list));
vbox_container->add_child(source_level_list);
Label *coords_level_label = memnew(Label);
@@ -351,7 +351,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
coords_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
coords_level_list->set_select_mode(ItemList::SELECT_MULTI);
coords_level_list->set_allow_rmb_select(true);
- coords_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(coords_level_list));
+ coords_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked).bind(coords_level_list));
vbox_container->add_child(coords_level_list);
Label *alternative_level_label = memnew(Label);
@@ -362,7 +362,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
alternative_level_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
alternative_level_list->set_select_mode(ItemList::SELECT_MULTI);
alternative_level_list->set_allow_rmb_select(true);
- alternative_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked), varray(alternative_level_list));
+ alternative_level_list->connect("item_clicked", callable_mp(this, &TileProxiesManagerDialog::_right_clicked).bind(alternative_level_list));
vbox_container->add_child(alternative_level_list);
popup_menu = memnew(PopupMenu);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 20e548acba..6950f57a00 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -735,15 +735,15 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
// --- 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_name(i).is_empty()) {
+ 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));
} else {
- ADD_TILE_DATA_EDITOR(group, tile_set->get_custom_data_name(i), vformat("custom_data_%d", i));
+ ADD_TILE_DATA_EDITOR(group, tile_set->get_custom_data_layer_name(i), vformat("custom_data_%d", i));
}
if (!tile_data_editors.has(vformat("custom_data_%d", i))) {
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_type(i), vformat("custom_data_%d", i), tile_set->get_custom_data_name(i));
+ 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->connect("needs_redraw", callable_mp((CanvasItem *)tile_atlas_control_unscaled, &Control::update));
tile_data_custom_data_editor->connect("needs_redraw", callable_mp((CanvasItem *)alternative_tiles_control_unscaled, &Control::update));
tile_data_editors[vformat("custom_data_%d", i)] = tile_data_custom_data_editor;
@@ -913,7 +913,7 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
button->add_theme_style_override("hover", memnew(StyleBoxEmpty));
button->add_theme_style_override("focus", memnew(StyleBoxEmpty));
button->add_theme_style_override("pressed", memnew(StyleBoxEmpty));
- button->connect("pressed", callable_mp(tile_set_atlas_source, &TileSetAtlasSource::create_alternative_tile), varray(tile_id, TileSetSource::INVALID_TILE_ALTERNATIVE));
+ button->connect("pressed", callable_mp(tile_set_atlas_source, &TileSetAtlasSource::create_alternative_tile).bind(tile_id, TileSetSource::INVALID_TILE_ALTERNATIVE));
button->set_rect(Rect2(Vector2(pos.x, pos.y + (y_increment - texture_region_base_size.y) / 2.0), Vector2(texture_region_base_size_min, texture_region_base_size_min)));
button->set_expand_icon(true);
@@ -1822,7 +1822,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
- xform.translate(position);
+ xform.translate_local(position);
if (tools_button_group->get_pressed_button() == tool_select_button && selection.has({ coords, 0 })) {
continue;
@@ -1845,7 +1845,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, 0);
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
- xform.translate(position);
+ xform.translate_local(position);
TileMapCell cell;
cell.source_id = tile_set_atlas_source_id;
@@ -1886,6 +1886,12 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input(const Ref<In
tile_atlas_control_unscaled->update();
alternative_tiles_control->update();
alternative_tiles_control_unscaled->update();
+
+ if (drag_type == DRAG_TYPE_MAY_POPUP_MENU) {
+ if (Vector2(drag_start_mouse_pos).distance_to(tile_atlas_control->get_local_mouse_position()) > 5.0 * EDSCALE) {
+ drag_type = DRAG_TYPE_NONE;
+ }
+ }
}
Ref<InputEventMouseButton> mb = p_event;
@@ -1911,7 +1917,10 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_gui_input(const Ref<In
}
} else if (mb->get_button_index() == MouseButton::RIGHT) {
if (mb->is_pressed()) {
- // Right click pressed
+ drag_type = DRAG_TYPE_MAY_POPUP_MENU;
+ drag_start_mouse_pos = alternative_tiles_control->get_local_mouse_position();
+ } else if (drag_type == DRAG_TYPE_MAY_POPUP_MENU) {
+ // Right click released and wasn't dragged too far
Vector3 tile = tile_atlas_view->get_alternative_tile_at_pos(mouse_local_pos);
selection.clear();
@@ -1989,7 +1998,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
Vector2 position = rect.get_center();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
- xform.translate(position);
+ xform.translate_local(position);
if (tools_button_group->get_pressed_button() == tool_select_button && selection.has({ coords, alternative_tile })) {
continue;
@@ -2013,7 +2022,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
Vector2 position = rect.get_center();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
- xform.translate(position);
+ xform.translate_local(position);
TileMapCell cell;
cell.source_id = tile_set_atlas_source_id;
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index de373e121b..81804710b4 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -710,9 +710,9 @@ TileSetEditor::TileSetEditor() {
sources_list->set_v_size_flags(SIZE_EXPAND_FILL);
sources_list->connect("item_selected", callable_mp(this, &TileSetEditor::_source_selected));
sources_list->connect("item_selected", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::set_sources_lists_current));
- sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list), varray(sources_list, source_sort_button));
+ sources_list->connect("visibility_changed", callable_mp(TilesEditorPlugin::get_singleton(), &TilesEditorPlugin::synchronize_sources_list).bind(sources_list, source_sort_button));
sources_list->add_user_signal(MethodInfo("sort_request"));
- sources_list->connect("sort_request", callable_mp(this, &TileSetEditor::_update_sources_list), varray(-1));
+ 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);
split_container_left_side->add_child(sources_list);
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index 97553578ba..b5134f6893 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -116,7 +116,7 @@ void TilesEditorPlugin::_thread() {
// Add the viewport at the last moment to avoid rendering too early.
EditorNode::get_singleton()->add_child(viewport);
- RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Vector<Variant>(), Object::CONNECT_ONESHOT);
+ RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Object::CONNECT_ONESHOT);
pattern_preview_done.wait();
@@ -127,7 +127,7 @@ void TilesEditorPlugin::_thread() {
const Variant *args_ptr[] = { &args[0], &args[1] };
Variant r;
Callable::CallError error;
- item.callback.call(args_ptr, 2, r, error);
+ item.callback.callp(args_ptr, 2, r, error);
viewport->queue_delete();
} else {
@@ -155,6 +155,9 @@ void TilesEditorPlugin::_update_editors() {
// Update the viewport.
CanvasItemEditor::get_singleton()->update_viewport();
+ // Make sure the tile set editor is visible if we have one assigned.
+ tileset_editor_button->set_visible(is_visible && tile_set.is_valid());
+
// Update visibility of bottom panel buttons.
if (tileset_editor_button->is_pressed() && !tile_set.is_valid()) {
if (tile_map) {
@@ -181,12 +184,14 @@ void TilesEditorPlugin::_notification(int p_what) {
}
void TilesEditorPlugin::make_visible(bool p_visible) {
- if (p_visible) {
+ is_visible = p_visible;
+
+ if (is_visible) {
// 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) {
+ if (tile_map && !is_editing_tile_set) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(tilemap_editor);
} else {
EditorNode::get_singleton()->make_bottom_panel_item_visible(tileset_editor);
@@ -345,6 +350,8 @@ void TilesEditorPlugin::edit(Object *p_object) {
// Update edited objects.
tile_set = Ref<TileSet>();
+ is_editing_tile_set = false;
+
if (p_object) {
if (p_object->is_class("TileMap")) {
tile_map_id = p_object->get_instance_id();
@@ -359,6 +366,7 @@ void TilesEditorPlugin::edit(Object *p_object) {
tile_map_id = ObjectID();
}
}
+ is_editing_tile_set = true;
EditorNode::get_singleton()->make_bottom_panel_item_visible(tileset_editor);
}
}
diff --git a/editor/plugins/tiles/tiles_editor_plugin.h b/editor/plugins/tiles/tiles_editor_plugin.h
index a22e782b34..b1fe6f8df6 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.h
+++ b/editor/plugins/tiles/tiles_editor_plugin.h
@@ -53,9 +53,12 @@ public:
};
private:
+ bool is_visible = false;
+
bool tile_map_changed_needs_update = false;
ObjectID tile_map_id;
Ref<TileSet> tile_set;
+ bool is_editing_tile_set = false;
Button *tilemap_editor_button = nullptr;
TileMapEditor *tilemap_editor = nullptr;
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index 443d5975cd..cf55465417 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -35,6 +35,8 @@
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "scene/gui/separator.h"
VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = nullptr;
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 69a125a029..626071aa72 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -199,7 +199,7 @@ void VisualShaderGraphPlugin::set_input_port_default_value(VisualShader::Type p_
Callable ce = callable_mp(editor, &VisualShaderEditor::_draw_color_over_button);
if (!button->is_connected("draw", ce)) {
- button->connect("draw", ce, varray(button, p_value));
+ button->connect("draw", ce.bind(button, p_value));
}
} break;
case Variant::BOOL: {
@@ -423,7 +423,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
size = resizable_node->get_size();
node->set_resizable(true);
- node->connect("resize_request", callable_mp(editor, &VisualShaderEditor::_node_resized), varray((int)p_type, p_id));
+ node->connect("resize_request", callable_mp(editor, &VisualShaderEditor::_node_resized).bind((int)p_type, p_id));
}
if (is_expression) {
expression = expression_node->get_expression();
@@ -435,10 +435,10 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
if (p_id >= 2) {
node->set_show_close_button(true);
- node->connect("close_request", callable_mp(editor, &VisualShaderEditor::_delete_node_request), varray(p_type, p_id), CONNECT_DEFERRED);
+ node->connect("close_request", callable_mp(editor, &VisualShaderEditor::_delete_node_request).bind(p_type, p_id), CONNECT_DEFERRED);
}
- node->connect("dragged", callable_mp(editor, &VisualShaderEditor::_node_dragged), varray(p_id));
+ node->connect("dragged", callable_mp(editor, &VisualShaderEditor::_node_dragged).bind(p_id));
Control *custom_editor = nullptr;
int port_offset = 1;
@@ -485,8 +485,8 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
register_uniform_name(p_id, uniform_name);
uniform_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
uniform_name->set_text(uniform->get_uniform_name());
- uniform_name->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_uniform_line_edit_changed), varray(p_id));
- uniform_name->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_uniform_line_edit_focus_out), varray(uniform_name, p_id));
+ uniform_name->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_uniform_line_edit_changed).bind(p_id));
+ uniform_name->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_uniform_line_edit_focus_out).bind(uniform_name, p_id));
if (vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") {
hb = memnew(HBoxContainer);
@@ -526,7 +526,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
Callable ce = callable_mp(graph_plugin, &VisualShaderGraphPlugin::update_curve);
if (curve->get_texture().is_valid() && !curve->get_texture()->is_connected("changed", ce)) {
- curve->get_texture()->connect("changed", ce, varray(p_id));
+ curve->get_texture()->connect("changed", ce.bind(p_id));
}
CurveEditor *curve_editor = memnew(CurveEditor);
@@ -544,7 +544,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
Callable ce = callable_mp(graph_plugin, &VisualShaderGraphPlugin::update_curve_xyz);
if (curve_xyz->get_texture().is_valid() && !curve_xyz->get_texture()->is_connected("changed", ce)) {
- curve_xyz->get_texture()->connect("changed", ce, varray(p_id));
+ curve_xyz->get_texture()->connect("changed", ce.bind(p_id));
}
CurveEditor *curve_editor_x = memnew(CurveEditor);
@@ -607,14 +607,14 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
Button *add_input_btn = memnew(Button);
add_input_btn->set_text(TTR("Add Input"));
- add_input_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_add_input_port), varray(p_id, group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR_3D, input_port_name), CONNECT_DEFERRED);
+ add_input_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_add_input_port).bind(p_id, group_node->get_free_input_port_id(), VisualShaderNode::PORT_TYPE_VECTOR_3D, input_port_name), CONNECT_DEFERRED);
hb2->add_child(add_input_btn);
hb2->add_spacer();
Button *add_output_btn = memnew(Button);
add_output_btn->set_text(TTR("Add Output"));
- add_output_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_add_output_port), varray(p_id, group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR_3D, output_port_name), CONNECT_DEFERRED);
+ add_output_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_add_output_port).bind(p_id, group_node->get_free_output_port_id(), VisualShaderNode::PORT_TYPE_VECTOR_3D, output_port_name), CONNECT_DEFERRED);
hb2->add_child(add_output_btn);
node->add_child(hb2);
@@ -722,7 +722,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
Button *button = memnew(Button);
hb->add_child(button);
register_default_input_button(p_id, i, button);
- button->connect("pressed", callable_mp(editor, &VisualShaderEditor::_edit_port_default_input), varray(button, p_id, i));
+ button->connect("pressed", callable_mp(editor, &VisualShaderEditor::_edit_port_default_input).bind(button, p_id, i));
if (default_value.get_type() != Variant::NIL) { // only a label
set_input_port_default_value(p_type, p_id, i, default_value);
} else {
@@ -747,20 +747,20 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
type_box->add_item(TTR("Sampler"));
type_box->select(group_node->get_input_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_input_port_type), varray(p_id, i), CONNECT_DEFERRED);
+ type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_input_port_type).bind(p_id, i), CONNECT_DEFERRED);
LineEdit *name_box = memnew(LineEdit);
hb->add_child(name_box);
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
name_box->set_text(name_left);
- name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_input_port_name), varray(name_box, p_id, i), CONNECT_DEFERRED);
- name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out), varray(name_box, p_id, i, false), CONNECT_DEFERRED);
+ name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_input_port_name).bind(name_box, p_id, i), CONNECT_DEFERRED);
+ name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, false), CONNECT_DEFERRED);
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_input_port), varray(p_id, i), CONNECT_DEFERRED);
+ remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_input_port).bind(p_id, i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
} else {
Label *label = memnew(Label);
@@ -787,7 +787,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
Button *remove_btn = memnew(Button);
remove_btn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
remove_btn->set_tooltip(TTR("Remove") + " " + name_left);
- remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_output_port), varray(p_id, i), CONNECT_DEFERRED);
+ remove_btn->connect("pressed", callable_mp(editor, &VisualShaderEditor::_remove_output_port).bind(p_id, i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
LineEdit *name_box = memnew(LineEdit);
@@ -795,8 +795,8 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
name_box->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
name_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
name_box->set_text(name_right);
- name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_output_port_name), varray(name_box, p_id, i), CONNECT_DEFERRED);
- name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out), varray(name_box, p_id, i, true), CONNECT_DEFERRED);
+ name_box->connect("text_submitted", callable_mp(editor, &VisualShaderEditor::_change_output_port_name).bind(name_box, p_id, i), CONNECT_DEFERRED);
+ name_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, i, true), CONNECT_DEFERRED);
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
@@ -809,7 +809,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
type_box->add_item(TTR("Transform"));
type_box->select(group_node->get_output_port_type(i));
type_box->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
- type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_output_port_type), varray(p_id, i), CONNECT_DEFERRED);
+ type_box->connect("item_selected", callable_mp(editor, &VisualShaderEditor::_change_output_port_type).bind(p_id, i), CONNECT_DEFERRED);
} else {
Label *label = memnew(Label);
label->set_text(name_right);
@@ -827,7 +827,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
expand->set_pressed_texture(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), varray(p_id, i, !vsnode->_is_output_port_expanded(i)), CONNECT_DEFERRED);
+ expand->connect("pressed", callable_mp(editor, &VisualShaderEditor::_expand_output_port).bind(p_id, i, !vsnode->_is_output_port_expanded(i)), CONNECT_DEFERRED);
hb->add_child(expand);
}
if (vsnode->has_output_port_preview(i) && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) {
@@ -839,7 +839,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
register_output_port(p_id, j, preview);
- preview->connect("pressed", callable_mp(editor, &VisualShaderEditor::_preview_select_port), varray(p_id, j), CONNECT_DEFERRED);
+ preview->connect("pressed", callable_mp(editor, &VisualShaderEditor::_preview_select_port).bind(p_id, j), CONNECT_DEFERRED);
hb->add_child(preview);
}
}
@@ -1021,7 +1021,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
expression_box->set_context_menu_enabled(false);
expression_box->set_draw_line_numbers(true);
- expression_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_expression_focus_out), varray(expression_box, p_id));
+ expression_box->connect("focus_exited", callable_mp(editor, &VisualShaderEditor::_expression_focus_out).bind(expression_box, p_id));
}
if (is_comment) {
@@ -4563,9 +4563,9 @@ void VisualShaderEditor::_preview_size_changed() {
preview_vbox->set_custom_minimum_size(preview_window->get_size());
}
-static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
- RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
- return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
+static ShaderLanguage::DataType _get_global_shader_uniform_type(const StringName &p_variable) {
+ RS::GlobalShaderUniformType gvt = RS::get_singleton()->global_shader_uniform_get_type(p_variable);
+ return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
}
void VisualShaderEditor::_update_preview() {
@@ -4582,7 +4582,7 @@ void VisualShaderEditor::_update_preview() {
info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(visual_shader->get_mode()));
info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(visual_shader->get_mode()));
info.shader_types = ShaderTypes::get_singleton()->get_types();
- info.global_variable_type_func = _get_global_variable_type;
+ info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
ShaderLanguage sl;
@@ -4666,13 +4666,13 @@ VisualShaderEditor::VisualShaderEditor() {
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SAMPLER);
//graph->add_valid_left_disconnect_type(0);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
- graph->connect("connection_request", callable_mp(this, &VisualShaderEditor::_connection_request), varray(), CONNECT_DEFERRED);
- graph->connect("disconnection_request", callable_mp(this, &VisualShaderEditor::_disconnection_request), varray(), CONNECT_DEFERRED);
+ graph->connect("connection_request", callable_mp(this, &VisualShaderEditor::_connection_request), CONNECT_DEFERRED);
+ graph->connect("disconnection_request", callable_mp(this, &VisualShaderEditor::_disconnection_request), CONNECT_DEFERRED);
graph->connect("node_selected", callable_mp(this, &VisualShaderEditor::_node_selected));
graph->connect("scroll_offset_changed", callable_mp(this, &VisualShaderEditor::_scroll_changed));
graph->connect("duplicate_nodes_request", callable_mp(this, &VisualShaderEditor::_duplicate_nodes));
- graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes), varray(false));
- graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes), varray(false, Point2()));
+ graph->connect("copy_nodes_request", callable_mp(this, &VisualShaderEditor::_copy_nodes).bind(false));
+ graph->connect("paste_nodes_request", callable_mp(this, &VisualShaderEditor::_paste_nodes).bind(false, Point2()));
graph->connect("delete_nodes_request", callable_mp(this, &VisualShaderEditor::_delete_nodes_request));
graph->connect("gui_input", callable_mp(this, &VisualShaderEditor::_graph_gui_input));
graph->connect("connection_to_empty", callable_mp(this, &VisualShaderEditor::_connection_to_empty));
@@ -4775,7 +4775,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->add_child(add_node);
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog), varray(false, VisualShaderNode::PORT_TYPE_MAX, VisualShaderNode::PORT_TYPE_MAX));
+ 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);
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 2feed6108a..ecaad1e540 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -33,6 +33,7 @@
#include "editor/editor_plugin.h"
#include "editor/plugins/curve_editor_plugin.h"
+#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/property_editor.h"
#include "scene/gui/button.h"
#include "scene/gui/code_edit.h"
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index 6fc6c1ad39..e3b2be33df 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -139,7 +139,7 @@ void VoxelGIEditorPlugin::_voxel_gi_save_path_and_bake(const String &p_path) {
if (voxel_gi) {
voxel_gi->bake();
ERR_FAIL_COND(voxel_gi->get_probe_data().is_null());
- ResourceSaver::save(p_path, voxel_gi->get_probe_data(), ResourceSaver::FLAG_CHANGE_PATH);
+ ResourceSaver::save(voxel_gi->get_probe_data(), p_path, ResourceSaver::FLAG_CHANGE_PATH);
}
}
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index 6437e19404..658258d98b 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -120,7 +120,7 @@ static const char *enum_renames[][2] = {
{ "JOINT_PIN", "JOINT_TYPE_PIN" }, // PhysicsServer2D
{ "JOINT_SLIDER", "JOINT_TYPE_SLIDER" }, // PhysicsServer3D
{ "KEY_CONTROL", "KEY_CTRL" }, // Globals
- { "LOOP_PING_PONG", "LOOP_PINGPONG" }, //AudioStreamSample
+ { "LOOP_PING_PONG", "LOOP_PINGPONG" }, // AudioStreamWAV
{ "MATH_RAND", "MATH_RANDF_RANGE" }, // VisualScriptBuiltinFunc
{ "MATH_RANDOM", "MATH_RANDI_RANGE" }, // VisualScriptBuiltinFunc
{ "MATH_STEPIFY", "MATH_STEP_DECIMALS" }, // VisualScriptBuiltinFunc
@@ -1250,7 +1250,9 @@ static const char *class_renames[][2] = {
{ "AnimatedSprite", "AnimatedSprite2D" },
{ "AnimationTreePlayer", "AnimationTree" },
{ "Area", "Area3D" }, // Be careful, this will be used everywhere
+ { "AudioStreamOGGVorbis", "AudioStreamOggVorbis" },
{ "AudioStreamRandomPitch", "AudioStreamRandomizer" },
+ { "AudioStreamSample", "AudioStreamWAV" },
{ "BakedLightmap", "LightmapGI" },
{ "BakedLightmapData", "LightmapGIData" },
{ "BitmapFont", "FontFile" },
@@ -1896,14 +1898,14 @@ Vector<String> ProjectConverter3To4::check_for_files() {
continue;
}
if (dir.current_is_dir()) {
- directories_to_check.append(current_dir + file_name + "/");
+ directories_to_check.append(current_dir.plus_file(file_name) + "/");
} else {
bool proper_extension = false;
if (file_name.ends_with(".gd") || file_name.ends_with(".shader") || file_name.ends_with(".tscn") || file_name.ends_with(".tres") || file_name.ends_with(".godot") || file_name.ends_with(".cs") || file_name.ends_with(".csproj"))
proper_extension = true;
if (proper_extension) {
- collected_files.append(current_dir + file_name);
+ collected_files.append(current_dir.plus_file(file_name));
}
}
file_name = dir.get_next();
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 327ff6bb2d..8395fa996a 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -491,7 +491,7 @@ private:
if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("project.godot"), initial_settings, Vector<String>(), false) != OK) {
set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR);
} else {
- ResourceSaver::save(dir.plus_file("icon.png"), create_unscaled_default_project_icon());
+ ResourceSaver::save(create_unscaled_default_project_icon(), dir.plus_file("icon.png"));
EditorVCSInterface::create_vcs_metadata_files(EditorVCSInterface::VCSMetadata(vcs_metadata_selection->get_selected()), dir);
}
} else if (mode == MODE_INSTALL) {
@@ -646,14 +646,6 @@ private:
protected:
static void _bind_methods() {
- ClassDB::bind_method("_browse_path", &ProjectDialog::_browse_path);
- ClassDB::bind_method("_create_folder", &ProjectDialog::_create_folder);
- ClassDB::bind_method("_text_changed", &ProjectDialog::_text_changed);
- ClassDB::bind_method("_path_text_changed", &ProjectDialog::_path_text_changed);
- ClassDB::bind_method("_path_selected", &ProjectDialog::_path_selected);
- ClassDB::bind_method("_file_selected", &ProjectDialog::_file_selected);
- ClassDB::bind_method("_install_path_selected", &ProjectDialog::_install_path_selected);
- ClassDB::bind_method("_browse_install_path", &ProjectDialog::_browse_install_path);
ADD_SIGNAL(MethodInfo("project_created"));
ADD_SIGNAL(MethodInfo("projects_updated"));
}
@@ -1348,8 +1340,8 @@ void ProjectList::create_project_item_control(int p_index) {
Color font_color = get_theme_color(SNAME("font_color"), SNAME("Tree"));
ProjectListItemControl *hb = memnew(ProjectListItemControl);
- hb->connect("draw", callable_mp(this, &ProjectList::_panel_draw), varray(hb));
- hb->connect("gui_input", callable_mp(this, &ProjectList::_panel_input), varray(hb));
+ hb->connect("draw", callable_mp(this, &ProjectList::_panel_draw).bind(hb));
+ hb->connect("gui_input", callable_mp(this, &ProjectList::_panel_input).bind(hb));
hb->add_theme_constant_override("separation", 10 * EDSCALE);
hb->set_tooltip(item.description);
@@ -1360,7 +1352,7 @@ void ProjectList::create_project_item_control(int p_index) {
favorite->set_normal_texture(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), varray(hb));
+ favorite->connect("pressed", callable_mp(this, &ProjectList::_favorite_pressed).bind(hb));
favorite_box->add_child(favorite);
favorite_box->set_alignment(BoxContainer::ALIGNMENT_CENTER);
hb->add_child(favorite_box);
@@ -1433,7 +1425,7 @@ void ProjectList::create_project_item_control(int p_index) {
path_hb->add_child(show);
if (!item.missing) {
- show->connect("pressed", callable_mp(this, &ProjectList::_show_project), varray(item.path));
+ show->connect("pressed", callable_mp(this, &ProjectList::_show_project).bind(item.path));
show->set_tooltip(TTR("Show in File Manager"));
} else {
show->set_tooltip(TTR("Error: Project is missing on the filesystem."));
@@ -2451,7 +2443,7 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) {
}
if (confirm) {
multi_scan_ask->get_ok_button()->disconnect("pressed", callable_mp(this, &ProjectManager::_scan_multiple_folders));
- multi_scan_ask->get_ok_button()->connect("pressed", callable_mp(this, &ProjectManager::_scan_multiple_folders), varray(folders));
+ multi_scan_ask->get_ok_button()->connect("pressed", callable_mp(this, &ProjectManager::_scan_multiple_folders).bind(folders));
multi_scan_ask->set_text(
vformat(TTR("Are you sure to scan %s folders for existing Godot projects?\nThis could take a while."), folders.size()));
multi_scan_ask->popup_centered();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 49707355a0..fba8c5c522 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -31,10 +31,10 @@
#include "project_settings_editor.h"
#include "core/config/project_settings.h"
-#include "editor/editor_export.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "servers/movie_writer/movie_writer.h"
ProjectSettingsEditor *ProjectSettingsEditor::singleton = nullptr;
@@ -75,8 +75,13 @@ void ProjectSettingsEditor::_setting_edited(const String &p_name) {
queue_save();
}
+void ProjectSettingsEditor::_update_advanced(bool p_is_advanced) {
+ custom_properties->set_visible(p_is_advanced);
+}
+
void ProjectSettingsEditor::_advanced_toggled(bool p_button_pressed) {
EditorSettings::get_singleton()->set_project_metadata("project_settings", "advanced_mode", p_button_pressed);
+ _update_advanced(p_button_pressed);
general_settings_inspector->set_restrict_to_basic_settings(!p_button_pressed);
}
@@ -585,35 +590,35 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
advanced->connect("toggled", callable_mp(this, &ProjectSettingsEditor::_advanced_toggled));
search_bar->add_child(advanced);
- HBoxContainer *header = memnew(HBoxContainer);
- general_editor->add_child(header);
+ custom_properties = memnew(HBoxContainer);
+ general_editor->add_child(custom_properties);
property_box = memnew(LineEdit);
property_box->set_placeholder(TTR("Select a Setting or Type its Name"));
property_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
property_box->connect("text_changed", callable_mp(this, &ProjectSettingsEditor::_property_box_changed));
- header->add_child(property_box);
+ custom_properties->add_child(property_box);
feature_box = memnew(OptionButton);
feature_box->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
feature_box->connect("item_selected", callable_mp(this, &ProjectSettingsEditor::_feature_selected));
- header->add_child(feature_box);
+ custom_properties->add_child(feature_box);
type_box = memnew(OptionButton);
type_box->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
- header->add_child(type_box);
+ custom_properties->add_child(type_box);
add_button = memnew(Button);
add_button->set_text(TTR("Add"));
add_button->set_disabled(true);
add_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_add_setting));
- header->add_child(add_button);
+ custom_properties->add_child(add_button);
del_button = memnew(Button);
del_button->set_text(TTR("Delete"));
del_button->set_disabled(true);
del_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_delete_setting));
- header->add_child(del_button);
+ custom_properties->add_child(del_button);
general_settings_inspector = memnew(SectionedInspector);
general_settings_inspector->get_inspector()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo());
@@ -670,10 +675,10 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
autoload_settings->connect("autoload_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
tab_container->add_child(autoload_settings);
- shaders_global_variables_editor = memnew(ShaderGlobalsEditor);
- shaders_global_variables_editor->set_name(TTR("Shader Globals"));
- shaders_global_variables_editor->connect("globals_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
- tab_container->add_child(shaders_global_variables_editor);
+ shaders_global_shader_uniforms_editor = memnew(ShaderGlobalsEditor);
+ shaders_global_shader_uniforms_editor->set_name(TTR("Shader Globals"));
+ shaders_global_shader_uniforms_editor->connect("globals_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
+ tab_container->add_child(shaders_global_shader_uniforms_editor);
plugin_settings = memnew(EditorPluginSettings);
plugin_settings->set_name(TTR("Plugins"));
@@ -694,6 +699,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
advanced->set_pressed(true);
}
+ _update_advanced(use_advanced);
general_settings_inspector->set_restrict_to_basic_settings(!use_advanced);
import_defaults_editor = memnew(ImportDefaultsEditor);
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 24d61db443..849c50b9ba 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -55,12 +55,13 @@ class ProjectSettingsEditor : public AcceptDialog {
ActionMapEditor *action_map_editor = nullptr;
LocalizationEditor *localization_editor = nullptr;
EditorAutoloadSettings *autoload_settings = nullptr;
- ShaderGlobalsEditor *shaders_global_variables_editor = nullptr;
+ ShaderGlobalsEditor *shaders_global_shader_uniforms_editor = nullptr;
EditorPluginSettings *plugin_settings = nullptr;
LineEdit *search_box = nullptr;
CheckButton *advanced = nullptr;
+ HBoxContainer *custom_properties = nullptr;
LineEdit *property_box = nullptr;
OptionButton *feature_box = nullptr;
OptionButton *type_box = nullptr;
@@ -77,6 +78,7 @@ class ProjectSettingsEditor : public AcceptDialog {
UndoRedo *undo_redo = nullptr;
void _advanced_toggled(bool p_button_pressed);
+ void _update_advanced(bool p_is_advanced);
void _property_box_changed(const String &p_text);
void _update_property_box();
void _feature_selected(int p_index);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 488a084903..4092cc47e3 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -43,7 +43,6 @@
#include "editor/array_property_edit.h"
#include "editor/create_dialog.h"
#include "editor/dictionary_property_edit.h"
-#include "editor/editor_export.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_help.h"
@@ -52,6 +51,7 @@
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
#include "editor/multi_node_edit.h"
+#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/property_selector.h"
#include "editor/scene_tree_dock.h"
#include "scene/gui/label.h"
@@ -60,39 +60,6 @@
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
-void EditorResourceConversionPlugin::_bind_methods() {
- GDVIRTUAL_BIND(_converts_to);
- GDVIRTUAL_BIND(_handles, "resource");
- GDVIRTUAL_BIND(_convert, "resource");
-}
-
-String EditorResourceConversionPlugin::converts_to() const {
- String ret;
- if (GDVIRTUAL_CALL(_converts_to, ret)) {
- return ret;
- }
-
- return "";
-}
-
-bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
- bool ret;
- if (GDVIRTUAL_CALL(_handles, p_resource, ret)) {
- return ret;
- }
-
- return false;
-}
-
-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>();
-}
-
void CustomPropertyEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_WM_CLOSE_REQUEST: {
@@ -828,7 +795,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_vbox->add_child(color_picker);
color_picker->hide();
color_picker->connect("color_changed", callable_mp(this, &CustomPropertyEditor::_color_changed));
- color_picker->connect("show", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(color_picker));
+ color_picker->connect("show", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker).bind(color_picker));
}
color_picker->show();
@@ -1814,7 +1781,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
checks20[i]->set_focus_mode(Control::FOCUS_NONE);
checks20gc->add_child(checks20[i]);
checks20[i]->hide();
- checks20[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), make_binds(i));
+ checks20[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed).bind(i));
checks20[i]->set_tooltip(vformat(TTR("Bit %d, val %d."), i, 1 << i));
}
@@ -1891,9 +1858,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
action_buttons[i] = memnew(Button);
action_buttons[i]->hide();
action_hboxes->add_child(action_buttons[i]);
- Vector<Variant> binds;
- binds.push_back(i);
- action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed), binds);
+ action_buttons[i]->connect("pressed", callable_mp(this, &CustomPropertyEditor::_action_pressed).bind(i));
}
create_dialog = nullptr;
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 27d1cabc3d..195eb89b81 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -51,22 +51,6 @@ class EditorFileDialog;
class PropertyValueEvaluator;
class PropertySelector;
-class EditorResourceConversionPlugin : public RefCounted {
- GDCLASS(EditorResourceConversionPlugin, RefCounted);
-
-protected:
- static void _bind_methods();
-
- GDVIRTUAL0RC(String, _converts_to)
- GDVIRTUAL1RC(bool, _handles, Ref<Resource>)
- GDVIRTUAL1RC(Ref<Resource>, _convert, Ref<Resource>)
-
-public:
- virtual String converts_to() const;
- virtual bool handles(const Ref<Resource> &p_resource) const;
- virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const;
-};
-
class CustomPropertyEditor : public PopupPanel {
GDCLASS(CustomPropertyEditor, PopupPanel);
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index 255187e4ed..665aca6a37 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -42,6 +42,7 @@
#include "plugins/script_editor_plugin.h"
#include "scene/gui/control.h"
#include "scene/gui/label.h"
+#include "scene/gui/separator.h"
#include "scene/gui/tab_container.h"
RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_undo_redo) {
@@ -139,7 +140,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_name->set_text("NAME");
but_insert_name->set_tooltip(String("${NAME}\n") + TTR("Node name."));
but_insert_name->set_focus_mode(Control::FOCUS_NONE);
- but_insert_name->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${NAME}"));
+ but_insert_name->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${NAME}"));
but_insert_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_name);
@@ -149,7 +150,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_parent->set_text("PARENT");
but_insert_parent->set_tooltip(String("${PARENT}\n") + TTR("Node's parent name, if available."));
but_insert_parent->set_focus_mode(Control::FOCUS_NONE);
- but_insert_parent->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${PARENT}"));
+ but_insert_parent->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${PARENT}"));
but_insert_parent->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_parent);
@@ -159,7 +160,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_type->set_text("TYPE");
but_insert_type->set_tooltip(String("${TYPE}\n") + TTR("Node type."));
but_insert_type->set_focus_mode(Control::FOCUS_NONE);
- but_insert_type->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${TYPE}"));
+ but_insert_type->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${TYPE}"));
but_insert_type->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_type);
@@ -169,7 +170,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_scene->set_text("SCENE");
but_insert_scene->set_tooltip(String("${SCENE}\n") + TTR("Current scene name."));
but_insert_scene->set_focus_mode(Control::FOCUS_NONE);
- but_insert_scene->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${SCENE}"));
+ but_insert_scene->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${SCENE}"));
but_insert_scene->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_scene);
@@ -179,7 +180,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_root->set_text("ROOT");
but_insert_root->set_tooltip(String("${ROOT}\n") + TTR("Root node name."));
but_insert_root->set_focus_mode(Control::FOCUS_NONE);
- but_insert_root->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${ROOT}"));
+ but_insert_root->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${ROOT}"));
but_insert_root->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_root);
@@ -189,7 +190,7 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
but_insert_count->set_text("COUNTER");
but_insert_count->set_tooltip(String("${COUNTER}\n") + TTR("Sequential integer counter.\nCompare counter options."));
but_insert_count->set_focus_mode(Control::FOCUS_NONE);
- but_insert_count->connect("pressed", callable_mp(this, &RenameDialog::_insert_text), make_binds("${COUNTER}"));
+ but_insert_count->connect("pressed", callable_mp(this, &RenameDialog::_insert_text).bind("${COUNTER}"));
but_insert_count->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grd_substitute->add_child(but_insert_count);
@@ -321,9 +322,9 @@ RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_und
spn_count_padding->connect("value_changed", callable_mp(this, &RenameDialog::_update_preview_int));
opt_style->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
opt_case->connect("item_selected", callable_mp(this, &RenameDialog::_update_preview_int));
- cbut_substitute->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
- cbut_regex->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
- cbut_process->connect("pressed", callable_mp(this, &RenameDialog::_update_preview), varray(""));
+ cbut_substitute->connect("pressed", callable_mp(this, &RenameDialog::_update_preview).bind(""));
+ cbut_regex->connect("pressed", callable_mp(this, &RenameDialog::_update_preview).bind(""));
+ cbut_process->connect("pressed", callable_mp(this, &RenameDialog::_update_preview).bind(""));
but_reset->connect("pressed", callable_mp(this, &RenameDialog::reset));
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index ca1771bedf..d19a40599f 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -39,6 +39,7 @@
#include "editor/editor_feature_profile.h"
#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/multi_node_edit.h"
@@ -1257,19 +1258,19 @@ void SceneTreeDock::_notification(int p_what) {
beginner_node_shortcuts->add_child(button_2d);
button_2d->set_text(TTR("2D Scene"));
button_2d->set_icon(get_theme_icon(SNAME("Node2D"), SNAME("EditorIcons")));
- button_2d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_2D_SCENE, false));
+ button_2d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_2D_SCENE, false));
button_3d = memnew(Button);
beginner_node_shortcuts->add_child(button_3d);
button_3d->set_text(TTR("3D Scene"));
button_3d->set_icon(get_theme_icon(SNAME("Node3D"), SNAME("EditorIcons")));
- button_3d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_3D_SCENE, false));
+ button_3d->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_3D_SCENE, false));
button_ui = memnew(Button);
beginner_node_shortcuts->add_child(button_ui);
button_ui->set_text(TTR("User Interface"));
button_ui->set_icon(get_theme_icon(SNAME("Control"), SNAME("EditorIcons")));
- button_ui->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_CREATE_USER_INTERFACE, false));
+ button_ui->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_USER_INTERFACE, false));
VBoxContainer *favorite_node_shortcuts = memnew(VBoxContainer);
favorite_node_shortcuts->set_name("FavoriteNodeShortcuts");
@@ -1279,19 +1280,19 @@ void SceneTreeDock::_notification(int p_what) {
node_shortcuts->add_child(button_custom);
button_custom->set_text(TTR("Other Node"));
button_custom->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
- button_custom->connect("pressed", callable_bind(callable_mp(this, &SceneTreeDock::_tool_selected), TOOL_NEW, false));
+ button_custom->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_NEW, false));
button_clipboard = memnew(Button);
node_shortcuts->add_child(button_clipboard);
button_clipboard->set_text(TTR("Paste From Clipboard"));
button_clipboard->set_icon(get_theme_icon(SNAME("ActionPaste"), SNAME("EditorIcons")));
- button_clipboard->connect("pressed", callable_bind(callable_mp(this, &SceneTreeDock::_tool_selected), TOOL_PASTE, false));
+ button_clipboard->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_PASTE, false));
_update_create_root_dialog();
} break;
case NOTIFICATION_ENTER_TREE: {
- clear_inherit_confirm->connect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false));
+ 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);
} break;
@@ -1952,17 +1953,36 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
return;
}
- editor_data->get_undo_redo().create_action(TTR("Attach Script"));
- for (Node *E : selected) {
- Ref<Script> existing = E->get_script();
- 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);
+ 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"));
+ 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"));
+ for (List<Node *>::Element *E = selected.front(); E; E = E->next()) {
+ Ref<Script> existing = E->get()->get_script();
+ editor_data->get_undo_redo().add_do_method(InspectorDock::get_singleton(), "store_script_properties", E->get());
+ editor_data->get_undo_redo().add_undo_method(InspectorDock::get_singleton(), "store_script_properties", E->get());
+ editor_data->get_undo_redo().add_do_method(E->get(), "set_script", p_script);
+ editor_data->get_undo_redo().add_undo_method(E->get(), "set_script", existing);
+ editor_data->get_undo_redo().add_do_method(InspectorDock::get_singleton(), "apply_script_properties", E->get());
+ editor_data->get_undo_redo().add_undo_method(InspectorDock::get_singleton(), "apply_script_properties", E->get());
+ 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();
}
- editor_data->get_undo_redo().commit_action();
-
_push_item(p_script.operator->());
_update_script_button();
}
@@ -2347,7 +2367,7 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
if (!(c.flags & Object::CONNECT_PERSIST)) {
continue;
}
- newnode->connect(c.signal.get_name(), c.callable, c.binds, Object::CONNECT_PERSIST);
+ newnode->connect(c.signal.get_name(), c.callable, Object::CONNECT_PERSIST);
}
}
@@ -2437,7 +2457,7 @@ void SceneTreeDock::_new_scene_from(String p_file) {
flg |= ResourceSaver::FLAG_COMPRESS;
}
- err = ResourceSaver::save(p_file, sdata, flg);
+ err = ResourceSaver::save(sdata, p_file, flg);
if (err != OK) {
accept->set_text(TTR("Error saving scene."));
accept->popup_centered();
@@ -2586,11 +2606,14 @@ 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());
- Node *n = get_node(p_to);
- if (n) {
+ if (Node *n = get_node(p_to)) {
editor_data->get_undo_redo().create_action(TTR("Attach Script"));
+ 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();
@@ -3177,7 +3200,7 @@ void SceneTreeDock::_update_create_root_dialog() {
favorite_nodes->get_child(i)->queue_delete();
}
- Ref<FileAccess> f = FileAccess::open(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("favorites.Node"), FileAccess::READ);
+ Ref<FileAccess> f = FileAccess::open(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("favorites.Node"), FileAccess::READ);
if (f.is_valid()) {
while (!f->eof_reached()) {
String l = f->get_line().strip_edges();
@@ -3192,7 +3215,7 @@ void SceneTreeDock::_update_create_root_dialog() {
name = ScriptServer::get_global_class_native_base(name);
}
button->set_icon(EditorNode::get_singleton()->get_class_icon(name));
- button->connect("pressed", callable_mp(this, &SceneTreeDock::_favorite_root_selected), make_binds(l));
+ button->connect("pressed", callable_mp(this, &SceneTreeDock::_favorite_root_selected).bind(l));
}
}
}
@@ -3374,14 +3397,14 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
button_add = memnew(Button);
button_add->set_flat(true);
- button_add->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_NEW, false));
+ button_add->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_NEW, false));
button_add->set_tooltip(TTR("Add/Create a New Node."));
button_add->set_shortcut(ED_GET_SHORTCUT("scene_tree/add_child_node"));
filter_hbc->add_child(button_add);
button_instance = memnew(Button);
button_instance->set_flat(true);
- button_instance->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_INSTANTIATE, false));
+ button_instance->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_INSTANTIATE, false));
button_instance->set_tooltip(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"));
filter_hbc->add_child(button_instance);
@@ -3396,7 +3419,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
button_create_script = memnew(Button);
button_create_script->set_flat(true);
- button_create_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_ATTACH_SCRIPT, false));
+ button_create_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_ATTACH_SCRIPT, false));
button_create_script->set_tooltip(TTR("Attach a new or existing script to the selected node."));
button_create_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/attach_script"));
filter_hbc->add_child(button_create_script);
@@ -3404,7 +3427,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
button_detach_script = memnew(Button);
button_detach_script->set_flat(true);
- button_detach_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(TOOL_DETACH_SCRIPT, false));
+ button_detach_script->connect("pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_DETACH_SCRIPT, false));
button_detach_script->set_tooltip(TTR("Detach the script from the selected node."));
button_detach_script->set_shortcut(ED_GET_SHORTCUT("scene_tree/detach_script"));
filter_hbc->add_child(button_detach_script);
@@ -3417,7 +3440,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
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), make_binds(false));
+ tree_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
button_hb = memnew(HBoxContainer);
vbc->add_child(button_hb);
@@ -3454,8 +3477,8 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
scene_tree->set_v_size_flags(SIZE_EXPAND | SIZE_FILL);
scene_tree->connect("rmb_pressed", callable_mp(this, &SceneTreeDock::_tree_rmb));
- scene_tree->connect("node_selected", callable_mp(this, &SceneTreeDock::_node_selected), varray(), CONNECT_DEFERRED);
- scene_tree->connect("node_renamed", callable_mp(this, &SceneTreeDock::_node_renamed), varray(), CONNECT_DEFERRED);
+ scene_tree->connect("node_selected", callable_mp(this, &SceneTreeDock::_node_selected), CONNECT_DEFERRED);
+ scene_tree->connect("node_renamed", callable_mp(this, &SceneTreeDock::_node_renamed), CONNECT_DEFERRED);
scene_tree->connect("node_prerename", callable_mp(this, &SceneTreeDock::_node_prerenamed));
scene_tree->connect("open", callable_mp(this, &SceneTreeDock::_load_request));
scene_tree->connect("open_script", callable_mp(this, &SceneTreeDock::_script_open_request));
@@ -3505,7 +3528,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm), varray(false));
+ delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm).bind(false));
editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(editable_instance_remove_dialog);
@@ -3522,11 +3545,11 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(false));
+ menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu_subresources = memnew(PopupMenu);
menu_subresources->set_name("Sub-Resources");
- menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected), make_binds(false));
+ menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu->add_child(menu_subresources);
menu_properties = memnew(PopupMenu);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 5e1f5ab750..c74a4c884d 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -358,7 +358,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (can_open_instance && undo_redo) { //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), varray(p_node));
+ p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
}
Ref<Script> script = p_node->get_script();
@@ -386,7 +386,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
- p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
+ p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed).bind(p_node));
}
_update_visibility_color(p_node, item);
@@ -399,7 +399,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
- p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
+ p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed).bind(p_node));
}
} else if (p_node->is_class("Node3D")) {
if (p_node->has_meta("_edit_lock_")) {
@@ -418,7 +418,7 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
- p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
+ p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed).bind(p_node));
}
_update_visibility_color(p_node, item);
@@ -733,7 +733,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), varray(), CONNECT_DEFERRED);
+ get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &SceneTreeEditor::_warning_changed), CONNECT_DEFERRED);
tree->connect("item_collapsed", callable_mp(this, &SceneTreeEditor::_cell_collapsed));
@@ -1301,7 +1301,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
blocked = 0;
update_timer = memnew(Timer);
- update_timer->connect("timeout", callable_mp(this, &SceneTreeEditor::_update_tree), varray(false));
+ update_timer->connect("timeout", callable_mp(this, &SceneTreeEditor::_update_tree).bind(false));
update_timer->set_one_shot(true);
update_timer->set_wait_time(0.5);
add_child(update_timer);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index f2eabdd208..77e0321f83 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -38,6 +38,7 @@
#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_scale.h"
#include "editor/editor_settings.h"
@@ -384,7 +385,7 @@ void ScriptCreateDialog::_create_new() {
} else {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
scr->set_path(lpath);
- Error err = ResourceSaver::save(lpath, scr, ResourceSaver::FLAG_CHANGE_PATH);
+ Error err = ResourceSaver::save(scr, lpath, ResourceSaver::FLAG_CHANGE_PATH);
if (err != OK) {
alert->set_text(TTR("Error - Could not create script in filesystem."));
alert->popup_centered();
@@ -620,9 +621,9 @@ void ScriptCreateDialog::_update_template_menu() {
} else {
String template_directory;
if (template_location == ScriptLanguage::TEMPLATE_PROJECT) {
- template_directory = EditorSettings::get_singleton()->get_project_script_templates_dir();
+ template_directory = EditorPaths::get_singleton()->get_project_script_templates_dir();
} else {
- template_directory = EditorSettings::get_singleton()->get_script_templates_dir();
+ template_directory = EditorPaths::get_singleton()->get_script_templates_dir();
}
templates_found = _get_user_templates(language, current_node, template_directory, template_location);
}
@@ -1008,7 +1009,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
parent_search_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_class_in_tree));
hb->add_child(parent_search_button);
parent_browse_button = memnew(Button);
- parent_browse_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path), varray(true, false));
+ parent_browse_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path).bind(true, false));
hb->add_child(parent_browse_button);
gc->add_child(memnew(Label(TTR("Inherits:"))));
gc->add_child(hb);
@@ -1057,7 +1058,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
file_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb->add_child(file_path);
path_button = memnew(Button);
- path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path), varray(false, true));
+ path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path).bind(false, true));
hb->add_child(path_button);
Label *label = memnew(Label(TTR("Path:")));
gc->add_child(label);
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 7ae03ee96f..bd1f2529ca 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -211,7 +211,7 @@ void ShaderCreateDialog::_create_new() {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
shader_inc->set_path(lpath);
- Error error = ResourceSaver::save(lpath, shader_inc, ResourceSaver::FLAG_CHANGE_PATH);
+ Error error = ResourceSaver::save(shader_inc, lpath, ResourceSaver::FLAG_CHANGE_PATH);
if (error != OK) {
alert->set_text(TTR("Error - Could not create shader include in filesystem."));
alert->popup_centered();
@@ -224,7 +224,7 @@ void ShaderCreateDialog::_create_new() {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
shader->set_path(lpath);
- Error error = ResourceSaver::save(lpath, shader, ResourceSaver::FLAG_CHANGE_PATH);
+ Error error = ResourceSaver::save(shader, lpath, ResourceSaver::FLAG_CHANGE_PATH);
if (error != OK) {
alert->set_text(TTR("Error - Could not create shader in filesystem."));
alert->popup_centered();
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 26bd3a5979..1cd1b4ea00 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -79,7 +79,7 @@ protected:
}
bool _set(const StringName &p_name, const Variant &p_value) {
- Variant existing = RS::get_singleton()->global_variable_get(p_name);
+ Variant existing = RS::get_singleton()->global_shader_uniform_get(p_name);
if (existing.get_type() == Variant::NIL) {
return false;
@@ -88,9 +88,9 @@ protected:
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action(TTR("Set Shader Global Variable"));
- undo_redo->add_do_method(RS::get_singleton(), "global_variable_set", p_name, p_value);
- undo_redo->add_undo_method(RS::get_singleton(), "global_variable_set", p_name, existing);
- RS::GlobalVariableType type = RS::get_singleton()->global_variable_get_type(p_name);
+ undo_redo->add_do_method(RS::get_singleton(), "global_shader_uniform_set", p_name, p_value);
+ undo_redo->add_undo_method(RS::get_singleton(), "global_shader_uniform_set", p_name, existing);
+ RS::GlobalShaderUniformType type = RS::get_singleton()->global_shader_uniform_get_type(p_name);
Dictionary gv;
gv["type"] = global_var_type_names[type];
if (type >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
@@ -117,17 +117,17 @@ protected:
}
bool _get(const StringName &p_name, Variant &r_ret) const {
- r_ret = RS::get_singleton()->global_variable_get(p_name);
+ r_ret = RS::get_singleton()->global_shader_uniform_get(p_name);
return r_ret.get_type() != Variant::NIL;
}
void _get_property_list(List<PropertyInfo> *p_list) const {
Vector<StringName> variables;
- variables = RS::get_singleton()->global_variable_get_list();
+ variables = RS::get_singleton()->global_shader_uniform_get_list();
for (int i = 0; i < variables.size(); i++) {
PropertyInfo pinfo;
pinfo.name = variables[i];
- switch (RS::get_singleton()->global_variable_get_type(variables[i])) {
+ switch (RS::get_singleton()->global_shader_uniform_get_type(variables[i])) {
case RS::GLOBAL_VAR_TYPE_BOOL: {
pinfo.type = Variant::BOOL;
} break;
@@ -241,7 +241,7 @@ public:
}
};
-static Variant create_var(RS::GlobalVariableType p_type) {
+static Variant create_var(RS::GlobalShaderUniformType p_type) {
switch (p_type) {
case RS::GLOBAL_VAR_TYPE_BOOL: {
return false;
@@ -376,12 +376,12 @@ static Variant create_var(RS::GlobalVariableType p_type) {
void ShaderGlobalsEditor::_variable_added() {
String var = variable_name->get_text().strip_edges();
if (var.is_empty() || !var.is_valid_identifier()) {
- EditorNode::get_singleton()->show_warning(TTR("Please specify a valid variable identifier name."));
+ EditorNode::get_singleton()->show_warning(TTR("Please specify a valid shader uniform identifier name."));
return;
}
- if (RenderingServer::get_singleton()->global_variable_get(var).get_type() != Variant::NIL) {
- EditorNode::get_singleton()->show_warning(vformat(TTR("Global variable '%s' already exists'"), var));
+ if (RenderingServer::get_singleton()->global_shader_uniform_get(var).get_type() != Variant::NIL) {
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Global shader uniform '%s' already exists'"), var));
return;
}
@@ -395,11 +395,11 @@ void ShaderGlobalsEditor::_variable_added() {
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- Variant value = create_var(RS::GlobalVariableType(variable_type->get_selected()));
+ Variant value = create_var(RS::GlobalShaderUniformType(variable_type->get_selected()));
- undo_redo->create_action(TTR("Add Shader Global Variable"));
- undo_redo->add_do_method(RS::get_singleton(), "global_variable_add", var, RS::GlobalVariableType(variable_type->get_selected()), value);
- undo_redo->add_undo_method(RS::get_singleton(), "global_variable_remove", var);
+ undo_redo->create_action(TTR("Add Shader Global Uniform"));
+ undo_redo->add_do_method(RS::get_singleton(), "global_shader_uniform_add", var, RS::GlobalShaderUniformType(variable_type->get_selected()), value);
+ undo_redo->add_undo_method(RS::get_singleton(), "global_shader_uniform_remove", var);
Dictionary gv;
gv["type"] = global_var_type_names[variable_type->get_selected()];
gv["value"] = value;
@@ -414,9 +414,9 @@ void ShaderGlobalsEditor::_variable_added() {
void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action(TTR("Add Shader Global Variable"));
- undo_redo->add_do_method(RS::get_singleton(), "global_variable_remove", p_variable);
- undo_redo->add_undo_method(RS::get_singleton(), "global_variable_add", p_variable, RS::get_singleton()->global_variable_get_type(p_variable), RS::get_singleton()->global_variable_get(p_variable));
+ undo_redo->create_action(TTR("Add Shader Global Uniform"));
+ undo_redo->add_do_method(RS::get_singleton(), "global_shader_uniform_remove", p_variable);
+ undo_redo->add_undo_method(RS::get_singleton(), "global_shader_uniform_add", p_variable, RS::get_singleton()->global_shader_uniform_get_type(p_variable), RS::get_singleton()->global_shader_uniform_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));
@@ -479,7 +479,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
inspector->set_use_wide_editors(true);
inspector->set_property_name_style(EditorPropertyNameProcessor::STYLE_RAW);
inspector->set_use_deletable_properties(true);
- inspector->connect("property_deleted", callable_mp(this, &ShaderGlobalsEditor::_variable_deleted), varray(), CONNECT_DEFERRED);
+ inspector->connect("property_deleted", callable_mp(this, &ShaderGlobalsEditor::_variable_deleted), CONNECT_DEFERRED);
interface = memnew(ShaderGlobalsEditorInterface);
interface->connect("var_changed", Callable(this, "_changed"));
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 78dd7f2140..55fe58e1b0 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -2191,14 +2191,15 @@ msgstr "Gunstelinge:"
msgid "Recent:"
msgstr "Onlangse:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Soek:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Passendes:"
@@ -2260,8 +2261,8 @@ msgstr "Soek Vervanging Hulpbron:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5570,6 +5571,10 @@ msgid "Drag And Drop Selection"
msgstr "Alle Seleksie"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11868,6 +11873,11 @@ msgid "New Animation"
msgstr "Optimaliseer Animasie"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Eienskappe"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 87266564f8..36e71f130e 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -66,13 +66,15 @@
# Abderrahim <abdoudido117@gmail.com>, 2022.
# Jhon Smith <jhonsmaith3@gmail.com>, 2022.
# Oo mohab oO <mohab9225@gmail.com>, 2022.
+# عبد الرحمن أبو سعدة ||Abd Alrahman abo saada <abdalrahmanabs2005@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-07-09 21:11+0000\n"
-"Last-Translator: Oo mohab oO <mohab9225@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: عبد الرحمن أبو سعدة ||Abd Alrahman abo saada "
+"<abdalrahmanabs2005@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -81,7 +83,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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -452,7 +454,7 @@ 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
@@ -486,7 +488,7 @@ msgstr "الموقع العالمي"
#: core/os/input_event.cpp
msgid "Factor"
-msgstr "المعامل"
+msgstr "العامل"
#: core/os/input_event.cpp
msgid "Button Index"
@@ -553,7 +555,7 @@ msgstr "قناة"
#: core/os/input_event.cpp main/main.cpp
msgid "Message"
-msgstr "الرسالة"
+msgstr "رسالة"
#: core/os/input_event.cpp
msgid "Pitch"
@@ -585,7 +587,7 @@ msgstr "التطبيق"
#: core/project_settings.cpp main/main.cpp
msgid "Config"
-msgstr "تعديل"
+msgstr "إعداد"
#: core/project_settings.cpp
msgid "Project Settings Override"
@@ -602,7 +604,7 @@ msgstr "تجاوز إعدادات المشروع"
#: scene/3d/skeleton.cpp scene/main/node.cpp scene/resources/mesh_library.cpp
#: scene/resources/skin.cpp
msgid "Name"
-msgstr "الأسم"
+msgstr "الاسم"
#: core/project_settings.cpp editor/editor_help.cpp
#: modules/visual_script/visual_script_nodes.cpp platform/uwp/export/export.cpp
@@ -862,9 +864,8 @@ msgid "Compression"
msgstr "ضغط"
#: core/project_settings.cpp
-#, fuzzy
msgid "Formats"
-msgstr "البنية (اللاحقة)"
+msgstr "التنسيقات"
#: core/project_settings.cpp
#, fuzzy
@@ -944,7 +945,7 @@ msgstr "المسار"
#: core/script_language.cpp
msgid "Source Code"
-msgstr "مصدر الرمز"
+msgstr "الكود المصدري || Ø§Ù„Ø´ÙØ±Ø© المصدرية"
#: core/translation.cpp editor/project_settings_editor.cpp
msgid "Locale"
@@ -956,7 +957,7 @@ msgstr "إختبار"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr "تقهقر"
+msgstr "تراجع | انسحاب"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -1014,7 +1015,7 @@ msgstr "حجم Ùهرس المخزن المؤقت للوحة المضلعات (K
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
msgid "2D"
-msgstr "2D"
+msgstr "ثنائي الأبعاد"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -2177,14 +2178,15 @@ msgstr "Ø§Ù„Ù…ÙØ¶Ù„Ø©:"
msgid "Recent:"
msgstr "الحالي:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "بحث:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "يطابق:"
@@ -2244,8 +2246,8 @@ msgstr "البحث عن مورد بديل:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -4868,7 +4870,7 @@ msgstr "نظام Ø§Ù„Ù…Ù„ÙØ§Øª"
#: editor/editor_node.cpp
msgid "Expand Bottom Panel"
-msgstr "توسيع التبويب السÙلي"
+msgstr "توسيع القائمة السÙلية"
#: editor/editor_node.cpp
msgid "Don't Save"
@@ -5608,6 +5610,10 @@ msgid "Drag And Drop Selection"
msgstr "تحديد الملئ خريطة-الشبكة"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "المظهر"
@@ -11847,6 +11853,11 @@ msgid "New Animation"
msgstr "رسومية متحركة جديدة"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ترشيح الدوال"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "السرعة:"
@@ -16283,26 +16294,24 @@ msgid "Set Room Point Position"
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
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "حدد موقع نقطة الإنحناء"
+msgstr "حدد موقع نقطة البوابة"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Front"
-msgstr ""
+msgstr "واجهة البوابة"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16341,18 +16350,16 @@ msgid "Occluder Polygon Front"
msgstr "أنشئ شكل Ù…ÙØ·Ø¨Ù‚"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Back"
-msgstr "أنشئ شكل Ù…ÙØ·Ø¨Ù‚"
+msgstr ""
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Hole"
-msgstr "أنشئ شكل Ù…ÙØ·Ø¨Ù‚"
+msgstr ""
#: main/main.cpp
msgid "Godot Physics"
-msgstr ""
+msgstr "Ùيزيائيات جودو"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
@@ -16431,9 +16438,8 @@ msgid "Driver"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Driver Name"
-msgstr "اسم النص البرمجي:"
+msgstr "اسم النص البرمجي"
#: main/main.cpp
msgid "Fallback To GLES2"
@@ -16452,22 +16458,20 @@ msgid "Allow hiDPI"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "V-Sync"
-msgstr "مزامنة"
+msgstr "مزامنة (مزامنة كرت الشاشة)"
#: main/main.cpp
-#, fuzzy
msgid "Use V-Sync"
-msgstr "استخدام المحاذاة"
+msgstr "استخدام مزامنة كرت الشاشة"
#: main/main.cpp
msgid "Per Pixel Transparency"
-msgstr ""
+msgstr "Ø´ÙØ§Ùية بيكسل القلم"
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "مسموح"
#: main/main.cpp
msgid "Intended Usage"
@@ -16479,18 +16483,16 @@ msgid "Framebuffer Allocation"
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"
@@ -16508,9 +16510,8 @@ 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
@@ -16530,7 +16531,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"
@@ -16554,9 +16555,8 @@ msgid "Physics Interpolation"
msgstr "وضعية Ø§Ù„Ø£Ø³ØªÙŠÙØ§Ø¡"
#: main/main.cpp
-#, fuzzy
msgid "Enable Warnings"
-msgstr "تمكين الترشيح Filtering"
+msgstr "ØªÙØ¹ÙŠÙ„ التحذيرات"
#: main/main.cpp
#, fuzzy
@@ -16573,25 +16573,23 @@ msgstr ""
#: main/main.cpp
msgid "iOS"
-msgstr ""
+msgstr "IOS"
#: main/main.cpp
msgid "Hide Home Indicator"
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"
@@ -16633,7 +16631,7 @@ msgstr ""
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "الحجم الكامل"
#: main/main.cpp scene/resources/dynamic_font.cpp
#, fuzzy
@@ -16706,21 +16704,20 @@ msgstr "انتهت المهلة."
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "اثناء التشغيل"
#: main/main.cpp
msgid "Unhandled Exception Policy"
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
@@ -16775,38 +16772,33 @@ msgstr "تغيير نص٠قطر الدائرة الداخلي"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Outer Radius"
-msgstr "تعديل نص٠القطر الخارجي للطارة 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
@@ -16826,37 +16818,32 @@ msgid "Radial Segments"
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 ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Inner Radius"
-msgstr "تغيير نص٠قطر الدائرة الداخلي"
+msgstr "القطر الداخلي"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Outer Radius"
-msgstr "تعديل نص٠القطر الخارجي للطارة Torus Outer Radius"
+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
@@ -16867,16 +16854,15 @@ 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
@@ -16907,9 +16893,8 @@ msgid "Path Continuous U"
msgstr "متواصل"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path U Distance"
-msgstr "اختر Ø§Ù„Ù…Ø³Ø§ÙØ©:"
+msgstr "المسار المحلي"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16917,28 +16902,26 @@ msgid "Path Joined"
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
+#, fuzzy
msgid "Server Relay"
-msgstr ""
+msgstr "تناوب الخادم"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Verify"
@@ -16962,30 +16945,25 @@ msgid "Use FBX"
msgstr ""
#: 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
@@ -17003,7 +16981,7 @@ msgstr "اختر تبعيات المكتبة لأجل هذا الإدخال"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Remove current entry"
-msgstr "مسح المدخلة الحالية"
+msgstr "مسح المدخلات الحالية"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
@@ -17052,9 +17030,8 @@ msgid "Script Class"
msgstr "اسم النص البرمجي:"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "مسار التركيز"
+msgstr "مسار الأيقونة"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -17062,18 +17039,16 @@ msgstr "لغة البرمجة GDNative"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#: modules/gdscript/gdscript.cpp
-#, fuzzy
msgid "GDScript"
-msgstr "النص البرمجي"
+msgstr "لغة جي دي"
#: 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"
@@ -17101,11 +17076,11 @@ msgstr "ليس نص برمجي مع نموذج"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not based on a script"
-msgstr "لا تستند الى نص برمجي"
+msgstr "غير مبني على نص برمجي"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not based on a resource file"
-msgstr "لا يعتمد على مل٠موارد"
+msgstr "غير مبني على مل٠موارد"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (missing @path)"
@@ -17128,14 +17103,12 @@ 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"
@@ -17143,7 +17116,7 @@ msgstr ""
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Use Thread"
-msgstr ""
+msgstr "استخدم المسار"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
#, fuzzy
@@ -17166,14 +17139,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
@@ -17181,14 +17152,12 @@ 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
@@ -17238,7 +17207,7 @@ msgstr "جميع الأجهزة"
#: modules/gltf/gltf_camera.cpp
#, fuzzy
msgid "FOV Size"
-msgstr "الحجم:"
+msgstr "حجم مساحةالرؤية"
#: modules/gltf/gltf_camera.cpp
msgid "Zfar"
@@ -17257,27 +17226,25 @@ 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
@@ -17290,9 +17257,8 @@ msgid "Instance Materials"
msgstr "تغيرات المادة:"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
-#, fuzzy
msgid "Parent"
-msgstr "إعادة اختيار الأبوة"
+msgstr "أب"
#: modules/gltf/gltf_node.cpp
#, fuzzy
@@ -17316,20 +17282,20 @@ 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 "عقدة جودو العظمية"
#: modules/gltf/gltf_skin.cpp
#, fuzzy
@@ -17346,9 +17312,8 @@ msgid "Inverse Binds"
msgstr ""
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Non Joints"
-msgstr "تحريك النÙقطة"
+msgstr "بلا Ù…ÙØ§ØµÙ„"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
@@ -17372,12 +17337,11 @@ msgstr ""
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Gloss Factor"
-msgstr ""
+msgstr "عامل اللمعان"
#: modules/gltf/gltf_spec_gloss.cpp
-#, fuzzy
msgid "Specular Factor"
-msgstr "Ù…ÙØ´ØºÙ„ الكمية القياسية Scalar."
+msgstr "عامل ال"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Spec Gloss Img"
@@ -17385,17 +17349,15 @@ msgstr ""
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "جيسون"
#: 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
@@ -17416,9 +17378,8 @@ msgid "Accessors"
msgstr ""
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Scene Name"
-msgstr "المسار للمشهد:"
+msgstr "اسم المشهد"
#: modules/gltf/gltf_state.cpp
#, fuzzy
@@ -17433,21 +17394,19 @@ 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
@@ -17455,37 +17414,32 @@ 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 "مصدر الصورة"
#: 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
@@ -17493,19 +17447,16 @@ msgid "Octant Size"
msgstr "الواجهة View الأمامية"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center X"
-msgstr "المنتصÙ"
+msgstr "منتص٠س"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Y"
-msgstr "المنتصÙ"
+msgstr "منتص٠ص"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Center Z"
-msgstr "المنتصÙ"
+msgstr "منتصÙ"
#: 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
@@ -17671,14 +17622,12 @@ msgid "Generate buffers"
msgstr "ولد AABB"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "الاتجاهات"
+msgstr "إضاءة مباشرة"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Ø§Ù„Ù…Ø³Ø§ÙØ© البادئة يميناً"
+msgstr "إضاءة غير مباشرة"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
@@ -17714,27 +17663,24 @@ 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"
-msgstr ""
+msgstr "Ø§Ø±ØªÙØ§Ø¹ الغين"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "IOD"
msgstr ""
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display Width"
-msgstr "عرض Ø§Ù„Ù…ÙØ®Ø·Ø· Wireframe"
+msgstr "عرض الشاشة"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display To Lens"
-msgstr "عرض من غير ظلال"
+msgstr "شاشة إلى عدسة"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
@@ -17753,14 +17699,12 @@ msgid "Class name can't be a reserved keyword"
msgstr "لا يمكن أن يكون اسم الص٠كلمة محجوزة"
#: modules/mono/csharp_script.cpp
-#, fuzzy
msgid "Build Solution"
-msgstr "تعبئة Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
+msgstr ""
#: modules/mono/editor/csharp_project.cpp
-#, fuzzy
msgid "Auto Update Project"
-msgstr "مشروع غير مسمى"
+msgstr "تحديث المشروع تلقائيًا"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17837,9 +17781,8 @@ msgid "Seamless"
msgstr ""
#: modules/opensimplex/noise_texture.cpp
-#, fuzzy
msgid "As Normal Map"
-msgstr "حجم عشوائي:"
+msgstr "كخريطة عادية"
#: modules/opensimplex/noise_texture.cpp
msgid "Bump Strength"
@@ -17847,7 +17790,7 @@ msgstr ""
#: modules/opensimplex/noise_texture.cpp
msgid "Noise"
-msgstr ""
+msgstr "ضوضاء"
#: modules/opensimplex/noise_texture.cpp
#, fuzzy
@@ -17860,7 +17803,7 @@ msgstr ""
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
-msgstr ""
+msgstr "ÙØªØ±Ø©"
#: modules/opensimplex/open_simplex_noise.cpp
#, fuzzy
@@ -17876,14 +17819,12 @@ msgid "Subject"
msgstr ""
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
-msgstr "الأسم"
+msgstr "الأسماء"
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Strings"
-msgstr "الإعدادات:"
+msgstr "النصوص"
#: modules/upnp/upnp.cpp
msgid "Discover Multicast If"
@@ -17898,14 +17839,12 @@ msgid "Discover IPv6"
msgstr ""
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Description URL"
-msgstr "الوصÙ"
+msgstr "وص٠الرابط"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Service Type"
-msgstr "تحيد نوع المتغير"
+msgstr "نوع الخدمة"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
@@ -17959,9 +17898,8 @@ msgid "Stack overflow with stack depth:"
msgstr "حدوث تجاوز للتكدس ( Stack overflow) مع عمق التكدس:"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Visual Script"
-msgstr "بحث VisualScript"
+msgstr "البرمجة المرئية"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -17992,14 +17930,12 @@ msgid "Add Output Port"
msgstr "Ø£Ø¶Ù Ù…Ù†ÙØ° إخراج"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "تغيير النوع"
+msgstr "تغيير نوع Ø§Ù„Ù…Ù†ÙØ°"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "غيّر اسم Ù…Ù†ÙØ° Ø§Ù„Ù…ÙØ¯Ø®Ù„ات"
+msgstr "تغيير اسم Ø§Ù„Ù…Ù†ÙØ°"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -18185,7 +18121,7 @@ msgstr "تعديل قيمة الإدخال"
#: modules/visual_script/visual_script_editor.cpp
msgid "Resize Comment"
-msgstr "تغيير حجم التعليق"
+msgstr "تغيير حجم الملاحظة"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
@@ -22836,9 +22772,8 @@ 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"
@@ -23377,9 +23312,8 @@ msgid "Solver"
msgstr ""
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Exclude Nodes"
-msgstr "حذ٠العÙقد"
+msgstr "استثناء العÙقد"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23445,14 +23379,12 @@ msgid "Linear Ortho"
msgstr "نظر من الخل٠(متعامد/ليس له بعد ثالث)"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper Angle"
-msgstr "الأحر٠الكبيرة (Uppercase)"
+msgstr "الزاوية العلوية"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower Angle"
-msgstr "الأحر٠الصغيرة (Lowercase)"
+msgstr "الزاوية السÙلية"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23608,9 +23540,8 @@ msgid "Thickness"
msgstr ""
#: scene/3d/reflection_probe.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Update Mode"
-msgstr "وضع التدوير"
+msgstr "وضع التحديث"
#: scene/3d/reflection_probe.cpp
#, fuzzy
@@ -23709,7 +23640,7 @@ msgstr "يجب ØªÙˆØ§ÙØ± مدير-غر٠(RoomManager) واحد Ùقط ÙÙŠ Ø´Ø
#: scene/3d/room_manager.cpp
msgid "Main"
-msgstr ""
+msgstr "رئيسي | الرئيسي"
#: scene/3d/room_manager.cpp scene/animation/animation_blend_tree.cpp
#: scene/animation/animation_player.cpp scene/animation/animation_tree.cpp
@@ -23972,13 +23903,12 @@ msgid "Per-Wheel Motion"
msgstr "زر العجلة للأسÙÙ„"
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Engine Force"
-msgstr "مستندات الإنترنت"
+msgstr "قوة المحرك"
#: scene/3d/vehicle_body.cpp
msgid "Brake"
-msgstr ""
+msgstr "ÙØ±Ø§Ù…Ù„ | مكابح"
#: scene/3d/vehicle_body.cpp
msgid "Steering"
@@ -23998,9 +23928,8 @@ msgid "Use As Steering"
msgstr ""
#: scene/3d/vehicle_body.cpp
-#, fuzzy
msgid "Wheel"
-msgstr "العجلة نحو الأقصى."
+msgstr "عجلة"
#: scene/3d/vehicle_body.cpp
msgid "Roll Influence"
@@ -24130,14 +24059,12 @@ msgid "Fadeout Time"
msgstr "وقت التلاشي X (ثواني):"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Auto Restart"
-msgstr "إعادة تشغيل تلقائية:"
+msgstr "إعادة تشغيل تلقائية"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Autorestart"
-msgstr "إعادة تشغيل تلقائية:"
+msgstr "إعادة تشغيل تلقائية"
#: scene/animation/animation_blend_tree.cpp
msgid "Delay"
diff --git a/editor/translations/az.po b/editor/translations/az.po
index cd3e8def9b..3a59e8aa41 100644
--- a/editor/translations/az.po
+++ b/editor/translations/az.po
@@ -2163,14 +2163,15 @@ msgstr "Favoritlər:"
msgid "Recent:"
msgstr "Son:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Axtar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "UyÄŸunlaÅŸmalar:"
@@ -2230,8 +2231,8 @@ msgstr "ÆvÉ™zetmÉ™ mÉ™nbÉ™yini axtarın:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5410,6 +5411,10 @@ msgid "Drag And Drop Selection"
msgstr "Ölçmə seçimi"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11445,6 +11450,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Animasiyanı Təmizləmə"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 06d16ebe96..877823c869 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -2177,14 +2177,15 @@ msgstr "Любими:"
msgid "Recent:"
msgstr "ПоÑледни:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "ТърÑене:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "СъвпадениÑ:"
@@ -2244,8 +2245,8 @@ msgstr "ТърÑене на замеÑтващ реÑурÑ:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5494,6 +5495,10 @@ msgid "Drag And Drop Selection"
msgstr "ÐаÑтройки"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11659,6 +11664,11 @@ msgid "New Animation"
msgstr "Ðова анимациÑ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Филтриране на методите"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "СкороÑÑ‚:"
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index c2ed1a7596..8379e2de5b 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -2233,14 +2233,15 @@ msgstr "ফেবরিট/পà§à¦°à¦¿à¦¯à¦¼-সমূহ:"
msgid "Recent:"
msgstr "সামà§à¦ªà§à¦°à¦¤à¦¿à¦•:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "মিলসমূহ:"
@@ -2302,8 +2303,8 @@ msgstr "পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦• রিসোরà§à¦¸-à¦à¦° অনà§
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5821,6 +5822,10 @@ msgid "Drag And Drop Selection"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12482,6 +12487,11 @@ msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
+msgid "Filter animations"
+msgstr "ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Speed:"
msgstr "গতি (FPS):"
diff --git a/editor/translations/br.po b/editor/translations/br.po
index 2d7b6fe900..f86b01cc44 100644
--- a/editor/translations/br.po
+++ b/editor/translations/br.po
@@ -2108,14 +2108,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2171,8 +2172,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5318,6 +5319,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11309,6 +11314,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Tro Fiñvskeudenn"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 67f0296b05..b1ee6245f6 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -2143,14 +2143,15 @@ msgstr "Favorits:"
msgid "Recent:"
msgstr "Recents:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cerca:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Coincidències:"
@@ -2210,8 +2211,8 @@ msgstr "Cerca Recurs Reemplaçant:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5607,6 +5608,10 @@ msgid "Drag And Drop Selection"
msgstr "Elimina la Selecció del GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11962,6 +11967,11 @@ msgstr "Nova Animació"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrar mètodes"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Speed:"
msgstr "Velocitat (FPS):"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index a166951396..c27334b374 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -2238,14 +2238,15 @@ msgstr "Oblíbené:"
msgid "Recent:"
msgstr "Nedávné:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Hledat:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Shody:"
@@ -2305,8 +2306,8 @@ msgstr "Hledat náhradní zdroj:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5681,6 +5682,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap Vyplnit výběr"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11953,6 +11958,11 @@ msgid "New Animation"
msgstr "Nová animace"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrovat metody"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Rychlost:"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index b4f7334278..3dc6f52da1 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -2227,14 +2227,15 @@ msgstr "Favoritter:"
msgid "Recent:"
msgstr "Seneste:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Søgning:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Matches:"
@@ -2296,8 +2297,8 @@ msgstr "Søg Erstatnings Ressource:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5734,6 +5735,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap Slet Markerede"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12145,6 +12150,11 @@ msgid "New Animation"
msgstr "Ny Animation Navn:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filter mode:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 64b8268adb..5035a7aa5d 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -87,7 +87,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-07-09 21:11+0000\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
@@ -96,7 +96,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.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -520,9 +520,8 @@ msgid "Pressure"
msgstr "Druck"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pen Inverted"
-msgstr "Umkehren"
+msgstr "Stift invertiert"
#: core/os/input_event.cpp
msgid "Relative"
@@ -2169,14 +2168,15 @@ msgstr "Favoriten:"
msgid "Recent:"
msgstr "Kürzlich:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Suche:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Treffer:"
@@ -2236,8 +2236,8 @@ msgstr "Ersatzressource suchen:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5568,6 +5568,10 @@ msgid "Drag And Drop Selection"
msgstr "Auswahl ziehen und fallen lassen"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Aussehen"
@@ -11693,6 +11697,11 @@ msgid "New Animation"
msgstr "Neue Animation"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Methoden filtern"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Geschwindigkeit:"
@@ -23109,9 +23118,8 @@ msgstr ""
"geändert werden."
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "Globales Transform"
+msgstr "Globale Verschiebung"
#: scene/3d/spatial.cpp
msgid "Matrix"
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 231863615b..c207124fcb 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -2060,14 +2060,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2123,8 +2124,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5256,6 +5257,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11206,6 +11211,10 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Filter animations"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 8511b4fdd2..85005d903a 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -2184,14 +2184,15 @@ msgstr "Αγαπημένα:"
msgid "Recent:"
msgstr "ΠÏόσφατα:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Αναζήτηση:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Αντιστοιχίες:"
@@ -2251,8 +2252,8 @@ msgstr "Αναζήτηση αντικαταστάτη πόÏου:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5663,6 +5664,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap Γέμισμα Επιλογής"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12044,6 +12049,11 @@ msgid "New Animation"
msgstr "Îέα Κίνηση"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ΦιλτÏάÏισμα μεθόδων"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "ΤαχÏτητα:"
diff --git a/editor/translations/en_Shaw.po b/editor/translations/en_Shaw.po
index d69ca8d97f..45d0549a81 100644
--- a/editor/translations/en_Shaw.po
+++ b/editor/translations/en_Shaw.po
@@ -2083,14 +2083,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2146,8 +2147,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5284,6 +5285,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11257,6 +11262,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ð‘¦ð‘¯ð‘‘ð‘»ð‘ð‘©ð‘¤ð‘±ð‘–ð‘©ð‘¯ ð‘¥ð‘´ð‘›"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index 3b651b3e97..5a251ba489 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -2206,14 +2206,15 @@ msgstr "Favoritaj:"
msgid "Recent:"
msgstr "Lastatempe:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Serĉo:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Matĉoj:"
@@ -2273,8 +2274,8 @@ msgstr "Serĉi anstataŭiga risurco:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5656,6 +5657,10 @@ msgid "Drag And Drop Selection"
msgstr "Enkadrigi elekton"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11939,6 +11944,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Forigi animacion?"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 3c21955a46..872fedfdac 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -86,8 +86,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-06-29 10:04+0000\n"
-"Last-Translator: Esdras Caleb Oliveira Silva <acheicaleb@gmail.com>\n"
+"PO-Revision-Date: 2022-07-27 13:26+0000\n"
+"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -95,7 +95,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.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -467,9 +467,8 @@ msgid "Command"
msgstr "Command"
#: 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
@@ -523,7 +522,7 @@ msgstr "Presionado"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Pluma Invertida"
#: core/os/input_event.cpp
msgid "Relative"
@@ -725,14 +724,12 @@ msgid "Script Templates Search Path"
msgstr "Ruta de Búsqueda de Plantillas de Scripts"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Cargar automáticamente al inicio"
+msgstr "Carga Automática de Control de Versiones al Inicio"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Control de Versiones"
+msgstr "Nombre del Plugin de Control de Versiones"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -1222,21 +1219,19 @@ msgid "Type"
msgstr "Tipo"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
-msgstr "Establecer Manipulador"
+msgstr "En el Manipulador"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out Handle"
-msgstr "Establecer Manipulador"
+msgstr "Fuera del Manipulador"
#: 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 "Stream"
#: editor/animation_track_editor.cpp
msgid "Start Offset"
@@ -1257,9 +1252,8 @@ msgid "Animation"
msgstr "Animación"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing"
-msgstr "Entrada-Salida Suave"
+msgstr "Suavizar"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1414,19 +1408,16 @@ msgid "Stream:"
msgstr "Stream:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start (s):"
-msgstr "Reiniciar (s):"
+msgstr "Inicio (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End (s):"
-msgstr "Fundido de entrada (s):"
+msgstr "Fin (s):"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Clip:"
-msgstr "Animaciones:"
+msgstr "Clip de Animación:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -2180,14 +2171,15 @@ msgstr "Favoritos:"
msgid "Recent:"
msgstr "Recientes:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Buscar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Coincidencias:"
@@ -2247,8 +2239,8 @@ msgstr "Buscar Recurso de Reemplazo:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2257,7 +2249,7 @@ msgstr "Abrir"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Propietarios de: %s (Total: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2984,9 +2976,8 @@ msgid "Custom release template not found."
msgstr "Plantilla release personalizada no encontrada."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Prepare Template"
-msgstr "Administrar Plantillas"
+msgstr "Preparar Plantilla"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "The given export path doesn't exist."
@@ -3002,9 +2993,8 @@ msgstr "Fallo al copiar la plantilla de exportación."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
-#, fuzzy
msgid "PCK Embedding"
-msgstr "Relleno"
+msgstr "Integrar PCK"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3403,7 +3393,7 @@ msgstr "Mostrar/Ocultar archivos ocultos."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
-msgstr "Ver elementos como una cuadrícula de miniaturas."
+msgstr "Sesgo del nivel de división de la cuadrícula."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a list."
@@ -4583,7 +4573,7 @@ msgstr "Exportar…"
#: editor/editor_node.cpp
msgid "Install Android Build Template..."
-msgstr "Instalar plantilla de compilación de Android..."
+msgstr "Instalar Plantilla de Compilación de Android..."
#: editor/editor_node.cpp
msgid "Open User Data Folder"
@@ -4902,8 +4892,8 @@ msgstr ""
"personalizado al exportarlo (agregando módulos, cambiando el AndroidManifest."
"xml, etc.).\n"
"Ten en cuenta que para realizar compilaciones personalizadas en lugar de "
-"usar APKs predefinidos, la opción \"Use Custom Build\" debería estar "
-"habilitada en la configuración de exportación de Android."
+"usar APKs predefinidos, la opción \"Usar Compilación Personalizada\" debería "
+"estar habilitada en la configuración de exportación de Android."
#: editor/editor_node.cpp
msgid ""
@@ -5285,9 +5275,8 @@ msgstr ""
"preset existente como ejecutable."
#: editor/editor_run_native.cpp
-#, fuzzy
msgid "Project Run"
-msgstr "Proyecto"
+msgstr "Ejecutar Proyecto"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -5359,11 +5348,11 @@ msgstr "Atenuar Editor en Diálogo de Popup"
#: editor/editor_settings.cpp main/main.cpp
msgid "Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Modo de Reposo en Consumo Bajo del Procesador (µsec)"
#: editor/editor_settings.cpp
msgid "Unfocused Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Modo de Bajo Uso del Procesador Desconectado (µseg)"
#: editor/editor_settings.cpp
msgid "Separate Distraction Mode"
@@ -5375,7 +5364,7 @@ msgstr "Abrir Capturas De Pantalla Automáticamente"
#: editor/editor_settings.cpp
msgid "Max Array Dictionary Items Per Page"
-msgstr ""
+msgstr "Cantidad Máxima de Elementos del Diccionario por Página"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp
@@ -5453,7 +5442,7 @@ msgstr "Comprimir Recursos Binarios"
#: editor/editor_settings.cpp
msgid "Safe Save On Backup Then Rename"
-msgstr ""
+msgstr "Guardar de Forma Segura en el Backup y luego Renombrar"
#: editor/editor_settings.cpp
msgid "File Dialog"
@@ -5465,7 +5454,7 @@ msgstr "Tamaño de las Miniaturas"
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr ""
+msgstr "Paneles"
#: editor/editor_settings.cpp
msgid "Scene Tree"
@@ -5488,9 +5477,8 @@ msgid "Auto Refresh Interval"
msgstr "Intervalo de Auto Refrescar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Subresource Hue Tint"
-msgstr "Sub-Recursos"
+msgstr "Subrecurso Tinte del Tono"
#: editor/editor_settings.cpp
msgid "Color Theme"
@@ -5570,9 +5558,12 @@ msgid "Mouse Extra Buttons Navigate History"
msgstr "Botones Extra del Ratón Navegar por el Historial"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "Seleccionar GridMap"
+msgstr "Arrastrar y Soltar la Selección"
+
+#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
#: editor/editor_settings.cpp
msgid "Appearance"
@@ -5616,7 +5607,7 @@ msgstr "Directriz de longitud de Línea de Columna Flexible"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Hard Column"
-msgstr ""
+msgstr "Longitud de Línea de la Guía de la Columna Rígida"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Script List"
@@ -5806,7 +5797,7 @@ msgstr "Nivel Mínimo de División de Cuadrícula"
#: editor/editor_settings.cpp
msgid "Grid Division Level Bias"
-msgstr ""
+msgstr "Sesgo del Nivel de División de la Cuadrícula"
#: editor/editor_settings.cpp
msgid "Grid XZ Plane"
@@ -5865,23 +5856,20 @@ msgid "Orbit Modifier"
msgstr "Modificador de Órbita"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Modifier"
-msgstr "Modo desplazamiento lateral"
+msgstr "Modificador Panorámico"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Zoom Modifier"
-msgstr "Modificado/s"
+msgstr "Modificador de Zoom"
#: editor/editor_settings.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Warped Mouse Panning"
-msgstr ""
+msgstr "Paneo del Mouse Deformado"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Navigation Feel"
-msgstr "Modo de Navegación"
+msgstr "Sensación de Navegación"
#: editor/editor_settings.cpp
msgid "Orbit Sensitivity"
@@ -5924,9 +5912,8 @@ msgid "Freelook Activation Modifier"
msgstr "Modificador de Activación de Vista Libre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "Modificador de Velocidad de Vista Libre"
+msgstr "Velocidad de Zoom de Vista Libre"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Grid Color"
@@ -5974,7 +5961,7 @@ msgstr "Color del Borde del Viewport"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
-msgstr ""
+msgstr "Vista del Editor de Restricciones"
#: editor/editor_settings.cpp
msgid "Simple Panning"
@@ -6035,14 +6022,12 @@ msgstr "Ubicación de la Ventana"
#: 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 "Completo"
+msgstr "Rect"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "Establecer Posición de Salida de Curva"
+msgstr "Posición Personalizada de Rect"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
@@ -6108,24 +6093,23 @@ msgstr "Color de Palabra Clave"
#: editor/editor_settings.cpp
msgid "Control Flow Keyword Color"
-msgstr ""
+msgstr "Control de Flujo Color de Palabra Clave"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "Tipo Base"
+msgstr "Tipo de Color Base"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
-msgstr ""
+msgstr "Tipo de Color del Engine"
#: editor/editor_settings.cpp
msgid "User Type Color"
-msgstr ""
+msgstr "Tipo de Color del Usuario"
#: editor/editor_settings.cpp
msgid "Comment Color"
-msgstr ""
+msgstr "Color de los Comentarios"
#: editor/editor_settings.cpp
msgid "String Color"
@@ -6142,25 +6126,24 @@ msgid "Completion Background Color"
msgstr "Completar Color de Fondo"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Selected Color"
-msgstr "Importar Seleccionado"
+msgstr "Completar Color Seleccionado"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Existing Color"
-msgstr ""
+msgstr "Completar Color Existente"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Scroll Color"
-msgstr ""
+msgstr "Completar Color de Scroll"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Font Color"
-msgstr ""
+msgstr "Completar Color de la Fuente"
#: editor/editor_settings.cpp
msgid "Text Color"
-msgstr "Color de Texto"
+msgstr "Color del Texto"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Line Number Color"
@@ -6199,33 +6182,28 @@ msgid "Line Length Guideline Color"
msgstr ""
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Word Highlighted Color"
-msgstr "Resaltador de Sintaxis"
+msgstr "Color de la Palabra Resaltada"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Number Color"
msgstr ""
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Function Color"
-msgstr "Función"
+msgstr "Función Color"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Member Variable Color"
-msgstr "Cambiar nombre de variable"
+msgstr "Color de la Variable Miembro"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mark Color"
-msgstr "Seleccionar Color"
+msgstr "Marcar Color"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bookmark Color"
-msgstr "Marcadores"
+msgstr "Color del Marcador"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Breakpoint Color"
@@ -6240,14 +6218,12 @@ msgid "Code Folding Color"
msgstr ""
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Color"
-msgstr "Resultados de la Búsqueda"
+msgstr "Color del Resultado de Búsqueda"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Border Color"
-msgstr "Resultados de la Búsqueda"
+msgstr "Color de los Bordes del Resultado de Búsqueda"
#: editor/editor_spin_slider.cpp
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
@@ -6256,14 +6232,12 @@ msgstr ""
"la tecla Mayús para cambios más precisos."
#: editor/editor_spin_slider.cpp scene/gui/button.cpp
-#, fuzzy
msgid "Flat"
-msgstr "Plano 0"
+msgstr "Plano"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hide Slider"
-msgstr "Modo de Colisión"
+msgstr "Ocultar Deslizador"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -6941,9 +6915,8 @@ msgid "Use Ambient"
msgstr ""
#: editor/import/resource_importer_bitmask.cpp
-#, fuzzy
msgid "Create From"
-msgstr "Crear Carpeta"
+msgstr "Crear Desde"
#: editor/import/resource_importer_bitmask.cpp
#: servers/audio/effects/audio_effect_compressor.cpp
@@ -6963,9 +6936,8 @@ msgid "Delimiter"
msgstr "Delimitador"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "Corrección del Color"
+msgstr "Corrección de Color"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
@@ -6993,9 +6965,8 @@ msgstr "Filtro"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Mipmaps"
-msgstr "Señales"
+msgstr "Mipmaps"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp
@@ -7026,14 +6997,12 @@ msgid "Vertical"
msgstr "Vertical"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Generate Tangents"
-msgstr "Generar puntos"
+msgstr "Generar Tangentes"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Scale Mesh"
-msgstr "Modo de Escalado"
+msgstr "Escalar Mesh"
#: editor/import/resource_importer_obj.cpp
msgid "Offset Mesh"
@@ -7041,14 +7010,12 @@ msgstr "Offset de Malla"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Octahedral Compression"
-msgstr "Compresión"
+msgstr "Compresión Octaédrica"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "Tamaño de los Indicadores"
+msgstr "Optimizar Marcadores de Malla"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7092,29 +7059,24 @@ msgstr "Importar como Escenas y Materiales Múltiples"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Nodes"
msgstr "Nodos"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Type"
-msgstr "Regresar"
+msgstr "Tipo de Raíz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Name"
-msgstr "Nombre Remoto"
+msgstr "Nombre de Raíz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "Escala"
+msgstr "Escala de Raíz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Custom Script"
-msgstr "CustomNode"
+msgstr "Script Personalizado"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
msgid "Storage"
@@ -7129,62 +7091,52 @@ msgid "Materials"
msgstr "Materiales"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep On Reimport"
-msgstr "Reimportar"
+msgstr "Seguir Reimportando"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Meshes"
-msgstr "Malla"
+msgstr "Meshes"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Ensure Tangents"
-msgstr "Modificar Tangente de Curva"
+msgstr "Asegurar Tangentes"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Light Baking"
-msgstr "Lightmapping"
+msgstr "Bake de Luces"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Lightmap Texel Size"
-msgstr "Calcular Lightmaps"
+msgstr "Tamaño Lightmap Texel"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Skins"
msgstr ""
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Named Skins"
-msgstr "Usar Ajuste de Escalado"
+msgstr "Usar Skins con Nombre"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "Abrir un Archivo"
+msgstr "Archivos Externos"
#: editor/import/resource_importer_scene.cpp
msgid "Store In Subdir"
msgstr ""
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
-msgstr "Filtrar scripts"
+msgstr "Filtrar Script"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "Transformar"
+msgstr "Mantener Pistas Personalizadas"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Optimizer"
-msgstr "Optimizar"
+msgstr "Optimizador"
#: editor/import/resource_importer_scene.cpp
#: editor/plugins/item_list_editor_plugin.cpp main/main.cpp
@@ -7198,9 +7150,8 @@ msgstr "Optimizar"
#: 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 "Activar"
+msgstr "Activado"
#: editor/import/resource_importer_scene.cpp
msgid "Max Linear Error"
@@ -7211,19 +7162,16 @@ msgid "Max Angular Error"
msgstr "Error Angular Máximo"
#: 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 "Eliminar Pista de Animación"
+msgstr "Eliminar Pistas Sin Usar"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "Clips de Animación"
+msgstr "Clips"
#: 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
@@ -7290,18 +7238,16 @@ msgid "2D, Detect 3D"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D Pixel"
-msgstr "Pixeles Sólidos"
+msgstr "Pixel 2D"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
msgid "Lossy Quality"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "HDR Mode"
-msgstr "Modo de Selección"
+msgstr "Modo HDR"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
@@ -7315,45 +7261,40 @@ msgid "Normal Map"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Process"
-msgstr "Post procesado"
+msgstr "Proceso"
#: editor/import/resource_importer_texture.cpp
msgid "Fix Alpha Border"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Premult Alpha"
-msgstr "Editar Polígono"
+msgstr "Premult Alpha"
#: editor/import/resource_importer_texture.cpp
msgid "Hdr As Srgb"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Invert Color"
-msgstr "Vértice"
+msgstr "Invertir Color"
#: editor/import/resource_importer_texture.cpp
msgid "Normal Map Invert Y"
msgstr "Invertir Y en Mapa Normal"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Size Limit"
-msgstr "Límites"
+msgstr "Tamaño Límite"
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
msgstr ""
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "SVG"
-msgstr "HSV"
+msgstr "SVG"
#: editor/import/resource_importer_texture.cpp
msgid ""
@@ -7370,18 +7311,16 @@ msgid "Import Mode"
msgstr "Modo de Importación"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Crop To Region"
-msgstr "Establecer Región de Tile"
+msgstr "Recortar la Región"
#: editor/import/resource_importer_texture_atlas.cpp
msgid "Trim Alpha Border From Region"
msgstr ""
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "Forzar Push"
+msgstr "Fuerza"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
@@ -7393,41 +7332,35 @@ msgid "Mono"
msgstr ""
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate"
-msgstr "Nodo Mix"
+msgstr "Tasa Máxima"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate Hz"
-msgstr "Nodo Mix"
+msgstr "Tasa Máxima Hz"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
msgstr ""
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "Formato"
+msgstr "Normalizar"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Mode"
-msgstr "Modo de Movimiento"
+msgstr "Modo Bucle"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Begin"
-msgstr "Modo de Movimiento"
+msgstr "Inicio del Bucle"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop End"
-msgstr "Modo de Movimiento"
+msgstr "Fin del Bucle"
#: editor/import_defaults_editor.cpp
msgid "Select Importer"
@@ -7514,14 +7447,12 @@ msgid "Raw"
msgstr "Raw"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Capitalized"
-msgstr "Capitalizar"
+msgstr "Capitalización"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "Idioma"
+msgstr "Localizado"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
@@ -8075,9 +8006,8 @@ msgid "New"
msgstr "Nuevo"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Paste As Reference"
-msgstr "%s Referencia de Clase"
+msgstr "Pegar Como Referencia"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -8569,25 +8499,21 @@ msgid "Loading..."
msgstr "Cargar..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "First"
msgstr "Primero"
#: 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 "Siguiente"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgctxt "Pagination"
msgid "Last"
msgstr "Último"
@@ -9206,9 +9132,8 @@ msgid "View"
msgstr "Ver"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "Ver Cuadrícula"
+msgstr "Mostrar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show When Snapping"
@@ -9216,12 +9141,11 @@ msgstr "Mostrar Al Ajustar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+msgstr "Ocultar"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Grid"
-msgstr "Cambiar Modo"
+msgstr "Cambiar Cuadrícula"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
@@ -9843,7 +9767,6 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
msgstr "Librería de Mallas"
@@ -9868,14 +9791,12 @@ msgid "Update from Scene"
msgstr "Actualizar desde escena"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply without Transforms"
-msgstr "Aplicar Transformaciones al MeshInstance"
+msgstr "Aplicar sin Transformaciones"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply with Transforms"
-msgstr "Aplicar Transformaciones al MeshInstance"
+msgstr "Aplicar con Transformaciones"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
@@ -10744,19 +10665,16 @@ msgid "External"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "Depurar con Editor Externo"
+msgstr "Usar un Editor Externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "Ruta de Exportación"
+msgstr "Ruta de Ejecución"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "Seleccionar el archivo de la plantilla"
+msgstr "Temperatura del Script Activada"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
@@ -10771,14 +10689,12 @@ msgid "Current Script Background Color"
msgstr "Color de Fondo del Script Actual"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "Agrupar Seleccionados"
+msgstr "Páginas de Ayuda para Grupos"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Sort Scripts By"
-msgstr "Crear Script"
+msgstr "Ordenar Scripts por"
#: editor/plugins/script_editor_plugin.cpp
msgid "List Script Names As"
@@ -10995,8 +10911,8 @@ msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
-"Este shader ha sido modificado en disco.\n"
-"¿Qué acciones deben tomarse?"
+"Este shader ha sido modificado en el disco.\n"
+"¿Qué acción debe tomarse?"
#: editor/plugins/shader_editor_plugin.cpp scene/resources/material.cpp
msgid "Shader"
@@ -11610,9 +11526,8 @@ msgid "Manipulator Gizmo Opacity"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "Bloquear Rotación de Vista"
+msgstr "Mostrar Gizmo de Rotación del Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -11664,9 +11579,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "Geometría inválida, no puede ser reemplazada por una malla."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Convertir a Mesh2D"
+msgstr "Convertir a MeshInstance2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11769,6 +11683,11 @@ msgid "New Animation"
msgstr "Nueva Animación"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrar métodos"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocidad:"
@@ -12066,9 +11985,8 @@ msgstr ""
"¿Cerrar de todos modos?"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Type"
-msgstr "Eliminar Tile"
+msgstr "Eliminar Tipo"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -12112,14 +12030,12 @@ msgstr ""
"Añade más propiedades manualmente o impórtalas desde otro Theme."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Type"
-msgstr "Añadir Tipo de Elemento"
+msgstr "Añadir Tipo de Theme"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Theme Type"
-msgstr "Eliminar Remoto"
+msgstr "Eliminar Tipo de Theme"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12566,55 +12482,46 @@ msgid "Clear Transform"
msgstr "Reestablecer Transformación"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Tile Map"
-msgstr "Dibujar TileMap"
+msgstr "Mapa de Tiles"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Palette Min Width"
-msgstr ""
+msgstr "Ancho Mínimo de la Paleta"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Palette Item H Separation"
-msgstr "Separador con nombre"
+msgstr "Separación del Elemento H de la Paleta"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Names"
-msgstr "Mostrar Todos los Idiomas"
+msgstr "Mostrar Nombres de Tiles"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Ids"
-msgstr "Mostrar Reglas"
+msgstr "Mostrar ID de los Tiles"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Sort Tiles By Name"
-msgstr "Ordenar archivos"
+msgstr "Ordenar Tiles por Nombre"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill Preview"
-msgstr "Bote de Relleno"
+msgstr "Vista previa del Bote de Relleno"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Editor Side"
-msgstr "Editor"
+msgstr "Lado del Editor"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Display Grid"
-msgstr "Mostrar Overdraw"
+msgstr "Mostrar Cuadrícula"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Axis Color"
-msgstr "Seleccionar Color"
+msgstr "Color de los Ejes"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Add Texture(s) to TileSet."
@@ -12953,7 +12860,6 @@ msgid "This property can't be changed."
msgstr "Esta propiedad no se puede cambiar."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Snap Options"
msgstr "Opciones de Ajuste"
@@ -12982,9 +12888,8 @@ msgid "Separation"
msgstr "Separación"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Tile"
-msgstr "Seleccionar"
+msgstr "Tiles Seleccionados"
#: 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
@@ -12993,14 +12898,12 @@ msgstr "Seleccionar"
#: 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 "Desplazamiento de Byte"
+msgstr "Desplazamiento de Textura"
#: editor/plugins/tile_set_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/2d/canvas_item.cpp scene/2d/particles_2d.cpp
@@ -13010,79 +12913,64 @@ 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 "Rellenar"
+msgstr "Modular"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tile Mode"
-msgstr "Cambiar Modo"
+msgstr "Modo Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Autotile Bitmask Mode"
-msgstr "Modo de Bitmask"
+msgstr "Modo Bitmask Automático"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
-msgstr "Tamaño del Contorno"
+msgstr "Tamaño de Subtile"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Spacing"
-msgstr "Espaciado de Línea"
+msgstr "Espaciado de Subtile"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occluder Offset"
-msgstr "Crear Polígono Oclusor"
+msgstr "Desplazamiento del Oclusor"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Offset"
-msgstr "Modo de Navegación"
+msgstr "Desplazamiento de Navegación"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Offset"
-msgstr "Desplazamiento Base"
+msgstr "Desplazamiento del Shape"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "Transformar"
+msgstr "Transformar Shape"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision"
-msgstr "Colisión"
+msgstr "Colisión Seleccionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way"
-msgstr "Sólo selección"
+msgstr "Colisión Seleccionada en Una Dirección"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Collision One Way Margin"
-msgstr "Modo de Colisión"
+msgstr "Margen Seleccionado de Colisión en Una Dirección"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Navigation"
-msgstr "Navegación Visible"
+msgstr "Navegación Seleccionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Selected Occlusion"
-msgstr "Seleccionar"
+msgstr "Oclusión Seleccionada"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Tileset Script"
-msgstr "Filtrar scripts"
+msgstr "Script de Tileset"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
@@ -14293,9 +14181,8 @@ msgid ""
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "More Info..."
-msgstr "Mover a..."
+msgstr "Más información..."
#: editor/project_export.cpp
msgid "Export PCK/Zip..."
@@ -14322,18 +14209,16 @@ msgid "ZIP File"
msgstr "Archivo ZIP"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Godot Game Pack"
+msgstr "Paquete de Proyectos de Godot"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Faltan plantillas de exportación para esta plataforma:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "Fundadores del Proyecto"
+msgstr "Exportación del Proyecto"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14648,7 +14533,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 "Administrador de Proyectos"
@@ -15456,14 +15340,12 @@ msgid "Another node already uses this unique name in the scene."
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Enable Scene Unique Name"
-msgstr "Nombre Único"
+msgstr "Activar Nombre Único de Escena"
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Disable Scene Unique Name"
-msgstr "Nombre Único"
+msgstr "Desactivar Nombre Único de Escena"
#: editor/scene_tree_dock.cpp
msgid "New Scene Root"
@@ -15638,18 +15520,16 @@ msgid "Clear Inheritance? (No Undo!)"
msgstr "¿Quieres limpiar la herencia? (No se puede deshacer)"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Show Scene Tree Root Selection"
-msgstr "Centrar Selección"
+msgstr "Mostrar Selección de la Raíz del Ãrbol de Escenas"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Use Favorites Root Selection"
-msgstr "Seleccionar Fotogramas"
+msgstr "Usar Selección de Raíces Favoritas"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -16108,23 +15988,20 @@ msgid "Change Particles AABB"
msgstr "Cambiar partículas AABB"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Reflection Probe"
-msgstr "Seleccionar Propiedad"
+msgstr "Sonda de Reflexión"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
msgstr "Cambiar Alcance de la Sonda"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "GI Probe"
-msgstr "Calcular GI Probe"
+msgstr "Sonda GI"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Baked Indirect Light"
-msgstr "Iluminación indirecta"
+msgstr "Iluminación Indirecta Bakeada"
#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
msgid "Change Sphere Shape Radius"
@@ -16155,24 +16032,20 @@ msgid "Change Ray Shape Length"
msgstr "Cambiar Longitud de la Forma del Rayo"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge"
-msgstr "Modo de Navegación"
+msgstr "Borde de Navegación"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge Disabled"
-msgstr "Modo de Navegación"
+msgstr "Borde de Navegación Desactivado"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid"
-msgstr "Modo de Navegación"
+msgstr "Navegación Sólida"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid Disabled"
-msgstr "Modo de Navegación"
+msgstr "Navegación Sólida Desactivada"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body A"
@@ -16195,9 +16068,8 @@ msgid "Set Room Point Position"
msgstr "Establecer Posición del Room Point"
#: editor/spatial_editor_gizmos.cpp scene/3d/portal.cpp
-#, fuzzy
msgid "Portal Margin"
-msgstr "Asignar Margen"
+msgstr "Margen del Portal"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Edge"
@@ -16216,15 +16088,13 @@ msgid "Portal Front"
msgstr ""
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Portal Back"
-msgstr "Retroceder"
+msgstr "Portal de Regreso"
#: editor/spatial_editor_gizmos.cpp scene/2d/light_occluder_2d.cpp
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Occluder"
-msgstr "Modo de Oclusión"
+msgstr "Oclusor"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Occluder Sphere Radius"
@@ -16243,19 +16113,16 @@ msgid "Set Occluder Hole Point Position"
msgstr "Establecer posición del orificio del oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Front"
-msgstr "Crear Polígono Oclusor"
+msgstr "Frente del Polígono Oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Polygon Back"
-msgstr "Crear Polígono Oclusor"
+msgstr "Posterior del Polígono Oclusor"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Occluder Hole"
-msgstr "Crear Polígono Oclusor"
+msgstr "Orificio Oclusor"
#: main/main.cpp
msgid "Godot Physics"
@@ -16264,32 +16131,28 @@ msgstr ""
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
msgid "Use BVH"
-msgstr ""
+msgstr "Usar BVH"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
-#, fuzzy
msgid "BVH Collision Margin"
-msgstr "Modo de Colisión"
+msgstr "Margen de Colisión BVH"
#: main/main.cpp
-#, fuzzy
msgid "Crash Handler"
-msgstr "Establecer Manipulador"
+msgstr "Manipulador de Colisiones"
#: main/main.cpp
-#, fuzzy
msgid "Multithreaded Server"
-msgstr "Establecer multinodo"
+msgstr "Servidor Multihilo"
#: main/main.cpp
msgid "RID Pool Prealloc"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Debugger stdout"
-msgstr "Depurador"
+msgstr "Depurador stdout"
#: main/main.cpp
msgid "Max Chars Per Second"
@@ -16320,14 +16183,12 @@ msgid "File Logging"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Enable File Logging"
-msgstr "Habilitar Filtrado"
+msgstr "Activar Registro de Archivos"
#: main/main.cpp
-#, fuzzy
msgid "Log Path"
-msgstr "Copiar Ruta"
+msgstr "Ruta del Registro"
#: main/main.cpp
msgid "Max Log Files"
@@ -16358,14 +16219,12 @@ msgid "Allow hiDPI"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "V-Sync"
-msgstr "Sincronizar"
+msgstr "Sincronización Vertical"
#: main/main.cpp
-#, fuzzy
msgid "Use V-Sync"
-msgstr "Usar Snap"
+msgstr "Usar Sincronización Vertical"
#: main/main.cpp
msgid "Per Pixel Transparency"
@@ -16380,23 +16239,20 @@ msgid "Intended Usage"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Framebuffer Allocation"
-msgstr "Seleccionar Fotogramas"
+msgstr "Asignación del Buffer de Imágenes"
#: main/main.cpp platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Energy Saving"
-msgstr "Error al Guardar"
+msgstr "Ahorro de Energía"
#: main/main.cpp
msgid "Threads"
msgstr ""
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
-#, fuzzy
msgid "Thread Model"
-msgstr "Cambiar Modo"
+msgstr "Modelo de Hilo"
#: main/main.cpp
msgid "Thread Safe BVH"
@@ -16408,25 +16264,21 @@ msgstr ""
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Orientation"
-msgstr "Documentación en línea"
+msgstr "Orientación"
#: 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 "Comunidad"
+msgstr "Común"
#: main/main.cpp
-#, fuzzy
msgid "Physics FPS"
-msgstr "Fotogramas de Física %"
+msgstr "Física FPS"
#: main/main.cpp
-#, fuzzy
msgid "Force FPS"
-msgstr "Forzar Push"
+msgstr "Forzar FPS"
#: main/main.cpp
msgid "Enable Pause Aware Picking"
@@ -16455,19 +16307,16 @@ msgid "Verbose stdout"
msgstr ""
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
-#, fuzzy
msgid "Physics Interpolation"
-msgstr "Modo de Interpolación"
+msgstr "Interpolación de Física"
#: main/main.cpp
-#, fuzzy
msgid "Enable Warnings"
-msgstr "Habilitar Filtrado"
+msgstr "Activar Advertencias"
#: main/main.cpp
-#, fuzzy
msgid "Frame Delay Msec"
-msgstr "Seleccionar Fotogramas"
+msgstr "Retraso de los Fotogramas Msec"
#: main/main.cpp
msgid "Low Processor Mode"
@@ -16486,14 +16335,12 @@ msgid "Hide Home Indicator"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Input Devices"
-msgstr "Todos los Dispositivos"
+msgstr "Dispositivos de Entrada"
#: main/main.cpp
-#, fuzzy
msgid "Pointing"
-msgstr "Punto"
+msgstr "Apuntador"
#: main/main.cpp
msgid "Touch Delay"
@@ -16504,21 +16351,18 @@ msgid "GLES3"
msgstr ""
#: main/main.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Shaders"
-msgstr "Shader"
+msgstr "Shaders"
#: main/main.cpp
-#, fuzzy
msgid "Debug Shader Fallbacks"
-msgstr "Forzar Shader Fallbacks"
+msgstr "Depurar Fallbacks de Shader"
#: 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 "Ver Entorno"
+msgstr "Entorno"
#: main/main.cpp
msgid "Default Clear Color"
@@ -16529,9 +16373,8 @@ msgid "Boot Splash"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Show Image"
-msgstr "Mostrar Huesos"
+msgstr "Mostrar Imagen"
#: main/main.cpp
msgid "Image"
@@ -16546,14 +16389,12 @@ msgid "Use Filter"
msgstr "Usar Filtro"
#: main/main.cpp scene/resources/style_box.cpp
-#, fuzzy
msgid "BG Color"
-msgstr "Colores"
+msgstr "Color de Fondo"
#: main/main.cpp
-#, fuzzy
msgid "macOS Native Icon"
-msgstr "Establecer Icono de Tile"
+msgstr "Icono Nativo de macOS"
#: main/main.cpp
msgid "Windows Native Icon"
@@ -16576,14 +16417,12 @@ msgid "Emulate Mouse From Touch"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Mouse Cursor"
-msgstr "Botón del Mouse"
+msgstr "Cursor del Mouse"
#: main/main.cpp
-#, fuzzy
msgid "Custom Image"
-msgstr "CustomNode"
+msgstr "Imagen Personalizada"
#: main/main.cpp
msgid "Custom Image Hotspot"
@@ -16594,14 +16433,12 @@ msgid "Tooltip Position Offset"
msgstr "Offset de la Posición del Tooltip"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Debugger Agent"
-msgstr "Depurador"
+msgstr "Agente de Depuración"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait For Debugger"
-msgstr "Depurador"
+msgstr "Esperar al Depurador"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
msgid "Wait Timeout"
@@ -16616,20 +16453,17 @@ msgid "Unhandled Exception Policy"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Main Loop Type"
-msgstr "Buscar Tipo de Nodo"
+msgstr "Tipo de Bucle Principal"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
-#, fuzzy
msgid "Stretch"
-msgstr "Buscar"
+msgstr "Estirar"
#: main/main.cpp
-#, fuzzy
msgid "Aspect"
-msgstr "Inspector"
+msgstr "Aspecto"
#: main/main.cpp
msgid "Shrink"
@@ -16640,14 +16474,12 @@ msgid "Auto Accept Quit"
msgstr ""
#: main/main.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Quit On Go Back"
-msgstr "Retroceder"
+msgstr "Salir y Regresar"
#: main/main.cpp scene/main/viewport.cpp
-#, fuzzy
msgid "Snap Controls To Pixels"
-msgstr "Ajustar a los Lados del Nodo"
+msgstr "Ajustar Controles a Píxeles"
#: main/main.cpp
msgid "Dynamic Fonts"
@@ -16682,35 +16514,30 @@ msgid "Change Torus Outer Radius"
msgstr "Cambiar Radio Externo de Torus"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Operation"
-msgstr "Opciones"
+msgstr "Operación"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Use Collision"
-msgstr "Colisión"
+msgstr "Usar Colisión"
#: modules/csg/csg_shape.cpp servers/physics_2d_server.cpp
-#, fuzzy
msgid "Collision Layer"
-msgstr "Modo de Colisión"
+msgstr "Capa de Colisión"
#: 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 de Colisión"
+msgstr "Máscara de Colisión"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Invert Faces"
-msgstr "Convertir Mayúsculas/Minúsculas"
+msgstr "Invertir Caras"
#: modules/csg/csg_shape.cpp scene/2d/navigation_agent_2d.cpp
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_agent.cpp
@@ -16728,33 +16555,28 @@ msgid "Radial Segments"
msgstr "Segmentos Radiales"
#: modules/csg/csg_shape.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Rings"
-msgstr "Advertencias"
+msgstr "Anillos"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Smooth Faces"
-msgstr "Suavizado"
+msgstr "Caras Suaves"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Sides"
-msgstr "Mostrar Guías"
+msgstr "Lados"
#: modules/csg/csg_shape.cpp
msgid "Cone"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Inner Radius"
-msgstr "Cambiar Radio Interno de Torus"
+msgstr "Radio Interior"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Outer Radius"
-msgstr "Cambiar Radio Externo de Torus"
+msgstr "Radio Exterior"
#: modules/csg/csg_shape.cpp
msgid "Ring Sides"
@@ -16763,9 +16585,8 @@ 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 "Polígonos"
+msgstr "Polígono"
#: modules/csg/csg_shape.cpp
msgid "Spin Degrees"
@@ -16776,14 +16597,12 @@ msgid "Spin Sides"
msgstr ""
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Node"
-msgstr "Pegar Nodos"
+msgstr "Ruta del Nodo"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Interval Type"
-msgstr "Crear Vértice Interno"
+msgstr "Tipo de Intervalo de Ruta"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
@@ -16798,14 +16617,12 @@ msgid "Path Rotation"
msgstr "Rotación de Trayectoria"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Local"
-msgstr "Crear Local"
+msgstr "Ruta Local"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Continuous U"
-msgstr "Continuo"
+msgstr "Ruta Continua U"
#: modules/csg/csg_shape.cpp
msgid "Path U Distance"
@@ -16816,24 +16633,20 @@ msgid "Path Joined"
msgstr "Ruta Unida"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Compression Mode"
-msgstr "Modo de Colisión"
+msgstr "Modo de Compresión"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Transfer Channel"
-msgstr "Cambio de Transformación"
+msgstr "Canal de Transferencia"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Channel Count"
-msgstr "Instanciar"
+msgstr "Conteo de Canales"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Always Ordered"
-msgstr "Mostrar Siempre la Cuadrícula"
+msgstr "Siempre Ordenado"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Server Relay"
@@ -16848,9 +16661,8 @@ msgid "DTLS Hostname"
msgstr ""
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Use DTLS"
-msgstr "Usar Snap"
+msgstr "Usar DTLS"
#: modules/fbx/editor_scene_importer_fbx.cpp
msgid "FBX"
@@ -16865,24 +16677,21 @@ msgid "Config File"
msgstr "Archivo de Configuración"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Load Once"
-msgstr "Cargar Recurso"
+msgstr "Cargar Una Vez"
#: modules/gdnative/gdnative.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Singleton"
-msgstr "Esqueleto"
+msgstr "Singleton"
#: modules/gdnative/gdnative.cpp
msgid "Symbol Prefix"
msgstr "Prefijo de Símbolo"
#: modules/gdnative/gdnative.cpp
-#, fuzzy
msgid "Reloadable"
-msgstr "Recargar"
+msgstr "Recargable"
#: modules/gdnative/gdnative.cpp
#: modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -16947,9 +16756,8 @@ msgid "Script Class"
msgstr "Clase del Script"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "Foco en Ruta"
+msgstr "Ruta del Icono"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -16957,18 +16765,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 ""
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Node Path Color"
-msgstr "Copiar Ruta del Nodo"
+msgstr "Color de la Ruta del Nodo"
#: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp
msgid "Max Call Stack"
@@ -17031,9 +16837,8 @@ msgid "Language Server"
msgstr "Servidor de Lenguaje"
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Enable Smart Resolve"
-msgstr "No se puede resolver"
+msgstr "Activar Smart Resolve"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Show Native Symbols In Editor"
@@ -17052,42 +16857,36 @@ msgid "Export GLTF..."
msgstr "Exportar GLTF..."
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Buffer View"
-msgstr "Vista Trasera"
+msgstr "Vista del Buffer"
#: modules/gltf/gltf_accessor.cpp modules/gltf/gltf_buffer_view.cpp
msgid "Byte Offset"
msgstr "Desplazamiento de Byte"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Component Type"
-msgstr "Componentes"
+msgstr "Tipo de Componente"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Normalized"
-msgstr "Formato"
+msgstr "Normalizado"
#: modules/gltf/gltf_accessor.cpp
msgid "Count"
msgstr "Cuenta"
#: 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 "Mix"
+msgstr "Max"
#: modules/gltf/gltf_accessor.cpp
-#, fuzzy
msgid "Sparse Count"
-msgstr "Instanciar"
+msgstr "Recuento Parcial"
#: modules/gltf/gltf_accessor.cpp
msgid "Sparse Indices Buffer View"
@@ -17110,23 +16909,20 @@ msgid "Sparse Values Byte Offset"
msgstr ""
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Buffer"
-msgstr "Vista Trasera"
+msgstr "Buffer"
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Byte Length"
-msgstr "Theme Predeterminado"
+msgstr "Longitud de Bytes"
#: modules/gltf/gltf_buffer_view.cpp
msgid "Byte Stride"
msgstr ""
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Indices"
-msgstr "Todos los Dispositivos"
+msgstr "Ãndices"
#: modules/gltf/gltf_camera.cpp
msgid "FOV Size"
@@ -17137,9 +16933,8 @@ msgid "Zfar"
msgstr ""
#: modules/gltf/gltf_camera.cpp
-#, fuzzy
msgid "Znear"
-msgstr "Lineal"
+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
@@ -17149,9 +16944,8 @@ msgstr "Lineal"
#: 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 "Colores"
+msgstr "Color"
#: modules/gltf/gltf_light.cpp scene/3d/reflection_probe.cpp
#: scene/resources/environment.cpp
@@ -17159,9 +16953,8 @@ msgid "Intensity"
msgstr ""
#: modules/gltf/gltf_light.cpp scene/2d/light_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Range"
-msgstr "Cambiar"
+msgstr "Rango"
#: modules/gltf/gltf_light.cpp
msgid "Inner Cone Angle"
@@ -17172,42 +16965,36 @@ msgid "Outer Cone Angle"
msgstr ""
#: modules/gltf/gltf_mesh.cpp
-#, fuzzy
msgid "Blend Weights"
-msgstr "Calcular Lightmaps"
+msgstr "Mezcla de Pesos"
#: modules/gltf/gltf_mesh.cpp
msgid "Instance Materials"
msgstr "Materiales de Instancia"
#: modules/gltf/gltf_node.cpp scene/3d/skeleton.cpp
-#, fuzzy
msgid "Parent"
-msgstr "Reemparentar"
+msgstr "Padre"
#: 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 ""
#: modules/gltf/gltf_node.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Translation"
-msgstr "Traducciones"
+msgstr "Traducción"
#: modules/gltf/gltf_node.cpp
-#, fuzzy
msgid "Children"
-msgstr "Hijos Editables"
+msgstr "Hijos"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints"
-msgstr "Punto"
+msgstr "Articulaciones"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_skin.cpp
msgid "Roots"
@@ -17218,28 +17005,24 @@ msgid "Unique Names"
msgstr ""
#: modules/gltf/gltf_skeleton.cpp
-#, fuzzy
msgid "Godot Bone Node"
-msgstr "Obtener Nodo de Escena"
+msgstr "Nodo de Huesos de Godot"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Skin Root"
-msgstr "Nueva Raíz de Escena"
+msgstr "Raíz de la Skin"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints Original"
-msgstr "Foco en Origen"
+msgstr "Articulaciones Originales"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
msgstr ""
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Non Joints"
-msgstr "Mover Unión"
+msgstr "Sin Articulaciones"
#: modules/gltf/gltf_skin.cpp
msgid "Joint I To Bone I"
@@ -17278,28 +17061,24 @@ msgid "Json"
msgstr ""
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Major Version"
-msgstr "Versión"
+msgstr "Versión Mayor"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Minor Version"
-msgstr "Versión"
+msgstr "Versión Menor"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "GLB Data"
-msgstr "Con Datos"
+msgstr "Datos GLB"
#: modules/gltf/gltf_state.cpp
msgid "Use Named Skin Binds"
msgstr ""
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Buffer Views"
-msgstr "Vista Trasera"
+msgstr "Vistas del Buffer"
#: modules/gltf/gltf_state.cpp
msgid "Accessors"
@@ -17310,15 +17089,13 @@ msgid "Scene Name"
msgstr "Nombre de la Escena"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Root Nodes"
-msgstr "Nombre del nodo raíz"
+msgstr "Nodos Raíz"
#: modules/gltf/gltf_state.cpp scene/2d/particles_2d.cpp
#: scene/gui/texture_button.cpp scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Textures"
-msgstr "Características"
+msgstr "Texturas"
#: modules/gltf/gltf_state.cpp platform/uwp/export/export.cpp
msgid "Images"
@@ -17329,70 +17106,60 @@ msgid "Cameras"
msgstr ""
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Lights"
-msgstr "Luz"
+msgstr "Luces"
#: modules/gltf/gltf_state.cpp
msgid "Unique Animation Names"
msgstr "Nombres Únicos de Animación"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeletons"
-msgstr "Esqueleto"
+msgstr "Esqueletos"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Skeleton To Node"
-msgstr "Selecciona un Nodo"
+msgstr "Esqueleto a Nodo"
#: modules/gltf/gltf_state.cpp
msgid "Animations"
msgstr "Animaciones"
#: modules/gltf/gltf_texture.cpp
-#, fuzzy
msgid "Src Image"
-msgstr "Mostrar Huesos"
+msgstr "Imagen de Origen"
#: modules/gridmap/grid_map.cpp
msgid "Mesh Library"
msgstr "Librería de Mallas"
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Physics Material"
-msgstr "Fotogramas 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 "Calcular Lightmaps"
+msgstr "Uso en Luz Bakeada"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
msgstr ""
#: modules/gridmap/grid_map.cpp
-#, fuzzy
msgid "Octant Size"
-msgstr "Vista Frontal"
+msgstr "Tamaño del 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
@@ -17401,17 +17168,15 @@ msgid "Mask"
msgstr ""
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
-#, fuzzy
msgid "Bake Navigation"
-msgstr "Navegación"
+msgstr "Bakear Navegación"
#: 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 de Navegación"
+msgstr "Capas de Navegación"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -17571,9 +17336,8 @@ msgid "Plotting lightmaps"
msgstr "Trazar lightmaps"
#: modules/lightmapper_cpu/register_types.cpp
-#, fuzzy
msgid "CPU Lightmapper"
-msgstr "Calcular Lightmaps"
+msgstr "CPU Lightmapper"
#: modules/lightmapper_cpu/register_types.cpp
msgid "Low Quality Ray Count"
@@ -17607,14 +17371,12 @@ msgid "IOD"
msgstr ""
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display Width"
-msgstr "Mostrar Wireframe"
+msgstr "Ancho de Pantalla"
#: modules/mobile_vr/mobile_vr_interface.cpp
-#, fuzzy
msgid "Display To Lens"
-msgstr "Mostrar Sin Sombreado"
+msgstr "Pantalla a Lente"
#: modules/mobile_vr/mobile_vr_interface.cpp
msgid "Oversample"
@@ -17637,9 +17399,8 @@ msgid "Build Solution"
msgstr "Crear Solución"
#: modules/mono/editor/csharp_project.cpp
-#, fuzzy
msgid "Auto Update Project"
-msgstr "Proyecto Sin Nombre"
+msgstr "Actualización Automática del Proyecto"
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
@@ -17741,9 +17502,8 @@ msgid "Period"
msgstr ""
#: modules/opensimplex/open_simplex_noise.cpp
-#, fuzzy
msgid "Persistence"
-msgstr "Perspectiva"
+msgstr "Persistencia"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Lacunarity"
@@ -17754,9 +17514,8 @@ msgid "Subject"
msgstr ""
#: modules/regex/regex.cpp
-#, fuzzy
msgid "Names"
-msgstr "Nombre"
+msgstr "Nombres"
#: modules/regex/regex.cpp
msgid "Strings"
@@ -17775,32 +17534,28 @@ msgid "Discover IPv6"
msgstr ""
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Description URL"
-msgstr "Descripción"
+msgstr "Descripción URL"
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "Service Type"
-msgstr "Establecer Tipo de la Variable"
+msgstr "Tipo de Servicio"
#: modules/upnp/upnp_device.cpp
msgid "IGD Control URL"
msgstr ""
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Service Type"
-msgstr "Establecer Tipo de la Variable"
+msgstr "Tipo de Servicio IGD"
#: modules/upnp/upnp_device.cpp
msgid "IGD Our Addr"
msgstr ""
#: modules/upnp/upnp_device.cpp
-#, fuzzy
msgid "IGD Status"
-msgstr "Estado"
+msgstr "Estado del IGD"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -17841,9 +17596,8 @@ msgid "Stack overflow with stack depth:"
msgstr "Desbordamiento de pila con profundidad de pila:"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid "Visual Script"
-msgstr "Buscar en VisualScript"
+msgstr "Visual Script"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Signal Arguments"
@@ -18173,14 +17927,12 @@ msgid "Return"
msgstr "Regresar"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Enabled"
-msgstr "Ejecutable"
+msgstr "Retorno Activado"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Return Type"
-msgstr "Regresar"
+msgstr "Tipo de Retorno"
#: modules/visual_script/visual_script_flow_control.cpp
#: scene/resources/visual_shader_nodes.cpp
@@ -18228,9 +17980,8 @@ msgid "in order:"
msgstr "en orden:"
#: modules/visual_script/visual_script_flow_control.cpp
-#, fuzzy
msgid "Steps"
-msgstr "Paso"
+msgstr "Pasos"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Switch"
@@ -18250,9 +18001,8 @@ msgstr "¿Es %s?"
#: modules/visual_script/visual_script_flow_control.cpp
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Base Script"
-msgstr "Nuevo Script"
+msgstr "Script Base"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "On %s"
@@ -18264,36 +18014,31 @@ msgstr "Sobre Sí Mismo"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_yield_nodes.cpp
-#, fuzzy
msgid "Call Mode"
-msgstr "Modo de Escalado"
+msgstr "Modo de Llamada"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Basic Type"
-msgstr "Tipo Base"
+msgstr "Tipo Básico"
#: 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 Ruta del Nodo"
+msgstr "Ruta del Nodo"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Use Default Args"
-msgstr "Restablecer Valores por Defecto"
+msgstr "Usar Argumentos por Defecto"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Validate"
msgstr "Validar"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "RPC Call Mode"
-msgstr "Modo de Escalado"
+msgstr "Modo de Llamada RPC"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Subtract %s"
@@ -18332,14 +18077,12 @@ msgid "BitXor %s"
msgstr "BitXor %s"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Set Mode"
-msgstr "Modo de Selección"
+msgstr "Modo de Ajuste"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Assign Op"
-msgstr "Asignar"
+msgstr "Asignar Op"
#: modules/visual_script/visual_script_func_nodes.cpp
#: modules/visual_script/visual_script_nodes.cpp
@@ -18356,9 +18099,8 @@ msgid "Base object is not a Node!"
msgstr "¡El objeto base no es un nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Path does not lead to Node!"
-msgstr "¡La ruta no apunta a un Nodo!"
+msgstr "¡La ruta no lleva al nodo!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Invalid index property name '%s' in node %s."
@@ -18374,9 +18116,8 @@ msgstr "Ordenar 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
msgid "Invalid argument of type:"
@@ -18391,9 +18132,8 @@ msgid "a if cond, else b"
msgstr "a si cond, sino b"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Var Name"
-msgstr "Nombre"
+msgstr "Nombre de la Variable"
#: modules/visual_script/visual_script_nodes.cpp
msgid "VariableGet not found in script:"
@@ -18518,9 +18258,8 @@ msgid "%s sec(s)"
msgstr "%s seg(s)"
#: modules/visual_script/visual_script_yield_nodes.cpp scene/main/timer.cpp
-#, fuzzy
msgid "Wait Time"
-msgstr "Dibujar Tile"
+msgstr "Tiempo de Espera"
#: modules/visual_script/visual_script_yield_nodes.cpp
msgid "WaitSignal"
@@ -18535,18 +18274,16 @@ msgid "WaitInstanceSignal"
msgstr "WaitInstanceSignal"
#: modules/webrtc/webrtc_data_channel.cpp
-#, fuzzy
msgid "Write Mode"
-msgstr "Modo de Prioridad"
+msgstr "Modo de Escritura"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
msgstr ""
#: modules/webrtc/webrtc_data_channel.h
-#, fuzzy
msgid "Max Channel In Buffer (KB)"
-msgstr "Tamaño del buffer del índice del polígono del lienzo (KB)"
+msgstr "Buffer de Canal Máximo (KB)"
#: modules/websocket/websocket_client.cpp
msgid "Verify SSL"
@@ -18557,59 +18294,52 @@ msgid "Trusted SSL Certificate"
msgstr ""
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Client"
-msgstr "Red de Pares"
+msgstr "Cliente WebSocket"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max In Buffer (KB)"
-msgstr "Tamaño Máximo (KB)"
+msgstr "Buffer de Entrada Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max In Packets"
msgstr ""
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max Out Buffer (KB)"
-msgstr "Tamaño Máximo (KB)"
+msgstr "Buffer de Salida Máximo (KB)"
#: modules/websocket/websocket_macros.h
msgid "Max Out Packets"
msgstr ""
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "WebSocket Server"
-msgstr "Red de Pares"
+msgstr "Servidor WebSocket"
#: modules/websocket/websocket_server.cpp
msgid "Bind IP"
msgstr ""
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "Private Key"
-msgstr "Ruta de la Clave Privada SSH"
+msgstr "Clave Privada"
#: modules/websocket/websocket_server.cpp platform/javascript/export/export.cpp
msgid "SSL Certificate"
msgstr ""
#: modules/websocket/websocket_server.cpp
-#, fuzzy
msgid "CA Chain"
-msgstr "Reestrablecer cadena IK"
+msgstr "Cadena CA"
#: modules/websocket/websocket_server.cpp
msgid "Handshake Timeout"
msgstr "Tiempo de Espera del Handshake"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Session Mode"
-msgstr "Modo de Región"
+msgstr "Modo de Sesión"
#: modules/webxr/webxr_interface.cpp
msgid "Required Features"
@@ -18628,28 +18358,24 @@ msgid "Reference Space Type"
msgstr ""
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Visibility State"
-msgstr "Cambiar Visibilidad"
+msgstr "Estado de Visibilidad"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Bounds Geometry"
-msgstr "Reintentar"
+msgstr "Límites Geométricos"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Ajuste Inteligente"
+msgstr "Mapeo Estándar XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
msgstr ""
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Debug Keystore"
-msgstr "Depurador"
+msgstr "Debug Keystore"
#: platform/android/export/export.cpp
msgid "Debug Keystore User"
@@ -18711,84 +18437,72 @@ msgid "The package must have at least one '.' separator."
msgstr "El paquete debe tener al menos un '.' como separador."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Build"
-msgstr "CustomNode"
+msgstr "Build Personalizada"
#: platform/android/export/export_plugin.cpp
msgid "Use Custom Build"
-msgstr ""
+msgstr "Usar Compilación Personalizada"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Export Format"
-msgstr "Ruta de Exportación"
+msgstr "Formato de Exportación"
#: platform/android/export/export_plugin.cpp
msgid "Min SDK"
msgstr "SDK Mínimo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Target SDK"
-msgstr "Objetivo de FPS"
+msgstr "SDK de Destino"
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
-#, fuzzy
msgid "Architectures"
-msgstr "Añadir una entrada de arquitectura"
+msgstr "Arquitecturas"
#: 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 "Usuario de Depuración"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Password"
-msgstr "Contraseña"
+msgstr "Contraseña de Depuración"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release User"
-msgstr "Release"
+msgstr "Usuario de Release"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Release Password"
-msgstr "Contraseña"
+msgstr "Contraseña de Release"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Clear Previous Install"
-msgstr "Inspeccionar Instancia Anterior"
+msgstr "Limpiar Instalación Previa"
#: platform/android/export/export_plugin.cpp
msgid "Code"
msgstr ""
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Package"
-msgstr "Empaquetando"
+msgstr "Paquete"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Unique Name"
msgstr "Nombre Único"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Signed"
-msgstr "Señal"
+msgstr "Firmado"
#: platform/android/export/export_plugin.cpp
msgid "Classify As Game"
@@ -18799,33 +18513,28 @@ msgid "Retain Data On Uninstall"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Exclude From Recents"
-msgstr "Eliminar Nodos"
+msgstr "Excluir de los Recientes"
#: platform/android/export/export_plugin.cpp
msgid "Graphics"
msgstr "Gráficos"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "OpenGL Debug"
-msgstr "Abrir"
+msgstr "Depuración de OpenGL"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "XR Features"
-msgstr "Características"
+msgstr "Características del XR"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "XR Mode"
-msgstr "Modo desplazamiento lateral"
+msgstr "Modo XR"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Hand Tracking"
-msgstr "Empaquetando"
+msgstr "Seguimiento de Manos"
#: platform/android/export/export_plugin.cpp
msgid "Hand Tracking Frequency"
@@ -18836,71 +18545,60 @@ msgid "Passthrough"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Immersive Mode"
-msgstr "Modo de Prioridad"
+msgstr "Modo Inmersivo"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Small"
-msgstr "Soporte"
+msgstr "Soporte Pequeño"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Normal"
-msgstr "Soporte"
+msgstr "Soporte Normal"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Large"
-msgstr "Soporte"
+msgstr "Soporte Grande"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Support Xlarge"
-msgstr "Soporte"
+msgstr "Soporte Xlarge"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "User Data Backup"
-msgstr "Interfaz de usuario"
+msgstr "Backup de Datos del Usuario"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
msgstr ""
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
-#, fuzzy
msgid "Command Line"
-msgstr "Command"
+msgstr "Línea de Comandos"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
msgid "Extra Args"
msgstr "Argumentos extras"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "APK Expansion"
-msgstr "Expresión"
+msgstr "Expansión del APK"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Public Key"
-msgstr "Ruta de la clave pública SSH"
+msgstr "Clave Pública"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Permissions"
-msgstr "Máscara de Emisión"
+msgstr "Permisos"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Permissions"
-msgstr "Reproducir Escena Personalizada"
+msgstr "Permisos Personalizados"
#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
@@ -19029,34 +18727,33 @@ msgstr ""
#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
-msgstr "\"Use Custom Build\" debe estar activado para usar los plugins."
+msgstr ""
+"\"Usar Compilación Personalizada\" debe estar activado para usar los 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\" solo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
-"VrApi\" u \"OpenXR\"."
+"\"Seguimiento de Manos\" solo es válido cuando el \"Modo XR\" es \"Oculus "
+"Mobile VrApi\" u \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Passthrough\" is only valid when \"XR Mode\" is \"OpenXR\"."
-msgstr "\"Passthrough\" solo es válido cuando \"Xr Mode\" es \"OpenXR\"."
+msgstr "\"Passthrough\" solo es válido cuando el \"Modo XR\" es \"OpenXR\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-"\"Export AAB\" sólo es válido cuando \"Use Custom Build\" está activado."
+"\"Exportar AAB\" solo es válido cuando \"Usar Compilación Personalizada\" "
+"está activado."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Min SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"Cambiar el \"Min Sdk\" solo es válido cuando \"Use Custom Build\" está "
-"activado."
+"\"Min SDK\" solo puede sobrescribirse cuando está activada la opción \"Usar "
+"Compilación Personalizada\"."
#: platform/android/export/export_plugin.cpp
msgid "\"Min SDK\" should be a valid integer, but got \"%s\" which is invalid."
@@ -19069,36 +18766,36 @@ msgid ""
msgstr ""
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid ""
"\"Target SDK\" can only be overridden when \"Use Custom Build\" is enabled."
msgstr ""
-"Cambiar el \"Target Sdk\" solo es válido cuando \"Use Custom Build\" está "
-"activado."
+"\"SDK de Destino\" solo se puede sobrescribir cuando \"Usar Compilación "
+"Personalizada\" está activado."
#: platform/android/export/export_plugin.cpp
msgid ""
"\"Target SDK\" should be a valid integer, but got \"%s\" which is invalid."
msgstr ""
+"\"SDK de Destino\" debería ser un entero válido, pero obtuvo \"%s\" 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 ""
+"\"SDK de Destino\" %d es superior a la versión por defecto %d. Podría "
+"funcionar, pero no se ha probado y puede ser inestable."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "\"Target SDK\" version must be greater or equal to \"Min SDK\" version."
msgstr ""
-"La versión de \"Target Sdk\" debe ser mayor o igual que la versión de \"Min "
-"Sdk\"."
+"La versión \"SDK de Destino\" debe ser mayor o igual a la versión \"Min "
+"SDK\"."
#: platform/android/export/export_plugin.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Code Signing"
-msgstr "Firma de código DMG"
+msgstr "Firma del Código"
#: platform/android/export/export_plugin.cpp
msgid ""
@@ -19328,9 +19025,8 @@ msgid "Code Sign Identity Debug"
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Export Method Debug"
-msgstr "Exportar Con Depuración"
+msgstr "Exportar Método de Depuración"
#: platform/iphone/export/export.cpp
msgid "Provisioning Profile UUID Release"
@@ -19357,39 +19053,33 @@ msgid "Identifier"
msgstr "Identificador"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Signature"
-msgstr "Señal"
+msgstr "Firma"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Short Version"
-msgstr "Versión"
+msgstr "Versión Corta"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Copyright"
-msgstr "Superior Derecha"
+msgstr "Copyright"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Capabilities"
-msgstr "Capitalizar Propiedades"
+msgstr "Capacidades"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Access Wi-Fi"
-msgstr "Acceso"
+msgstr "Acceso Wi-Fi"
#: platform/iphone/export/export.cpp
msgid "Push Notifications"
msgstr "Notificaciones Push"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "User Data"
-msgstr "Interfaz de usuario"
+msgstr "Datos de Usuario"
#: platform/iphone/export/export.cpp
msgid "Accessible From Files App"
@@ -19400,24 +19090,20 @@ msgid "Accessible From iTunes Sharing"
msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Privacy"
-msgstr "Ruta de la Clave Privada SSH"
+msgstr "Privacidad"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Camera Usage Description"
-msgstr "Descripción"
+msgstr "Descripción del Uso de la Cámara"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Microphone Usage Description"
-msgstr "Descripciones de Propiedades"
+msgstr "Descripción del Uso del Micrófono"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Photolibrary Usage Description"
-msgstr "Descripciones de Propiedades"
+msgstr "Descripción del Uso de la Fotolibrería"
#: platform/iphone/export/export.cpp
msgid "iPhone 120 X 120"
@@ -19460,40 +19146,33 @@ msgid "Use Launch Screen Storyboard"
msgstr ""
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Image Scale Mode"
-msgstr "Modo de Escalado"
+msgstr "Modo de Escalado de Imagen"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @2x"
-msgstr "CustomNode"
+msgstr "Imagen Personalizada @2x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom Image @3x"
-msgstr "CustomNode"
+msgstr "Imagen Personalizada @3x"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Use Custom BG Color"
-msgstr "CustomNode"
+msgstr "Usar Color de Fondo Personalizado"
#: platform/iphone/export/export.cpp
-#, fuzzy
msgid "Custom BG Color"
-msgstr "CustomNode"
+msgstr "Color de Fondo Personalizado"
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Prepare Templates"
-msgstr "Administrar Plantillas"
+msgstr "Preparar Plantillas"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Export template not found."
-msgstr "Plantilla release personalizada no encontrada."
+msgstr "No se ha encontrado la plantilla de exportación."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
@@ -19529,9 +19208,8 @@ msgid "Could not write file: \"%s\"."
msgstr "No se pudo escribir el archivo: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
-#, fuzzy
msgid "Icon Creation"
-msgstr "Asignar Margen"
+msgstr "Creación de Iconos"
#: platform/javascript/export/export.cpp
msgid "Could not read file: \"%s\"."
@@ -19546,14 +19224,12 @@ msgid "Variant"
msgstr "Variante"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Type"
-msgstr "Exportar"
+msgstr "Tipo de Exportación"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "VRAM Texture Compression"
-msgstr "Expresión"
+msgstr "Compresión de Texturas en la VRAM"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
@@ -19568,14 +19244,12 @@ msgid "HTML"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Export Icon"
-msgstr "Expandir Todo"
+msgstr "Icono de Exportación"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Custom HTML Shell"
-msgstr "CustomNode"
+msgstr "HTML Shell Personalizado"
#: platform/javascript/export/export.cpp
msgid "Head Include"
@@ -19590,9 +19264,8 @@ msgid "Focus Canvas On Start"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Experimental Virtual Keyboard"
-msgstr "Filtrar señales"
+msgstr "Teclado Virtual Experimental"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
@@ -19639,9 +19312,8 @@ msgid "HTTP Port"
msgstr ""
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Use SSL"
-msgstr "Usar Snap"
+msgstr "Usar SSL"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
@@ -19728,33 +19400,28 @@ msgid "High Res"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Location Usage Description"
-msgstr "Descripción"
+msgstr "Ubicación de la Descripción de Uso"
#: platform/osx/export/export.cpp
msgid "Address Book Usage Description"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Calendar Usage Description"
-msgstr "Descripción"
+msgstr "Descripción del Uso del Calendario"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library Usage Description"
-msgstr "Descripciones de Propiedades"
+msgstr "Descripción de Uso de la Librería de Fotos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Desktop Folder Usage Description"
-msgstr "Descripciones de Métodos"
+msgstr "Descripción de Uso de la Carpeta de Escritorio"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Documents Folder Usage Description"
-msgstr "Descripciones de Métodos"
+msgstr "Descripción de Uso de la Carpeta de Documentos"
#: platform/osx/export/export.cpp
msgid "Downloads Folder Usage Description"
@@ -19769,39 +19436,33 @@ msgid "Removable Volumes Usage Description"
msgstr ""
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Codesign"
-msgstr "Firma de código DMG"
+msgstr "Codesign"
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Identity"
-msgstr "Indentar a la Izquierda"
+msgstr "Identidad"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Timestamp"
-msgstr "Tiempo"
+msgstr "Marca de Tiempo"
#: platform/osx/export/export.cpp
msgid "Hardened Runtime"
-msgstr ""
+msgstr "Hardened Runtime"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Replace Existing Signature"
-msgstr "Reemplazar en Archivos"
+msgstr "Reemplazar Firma Existente"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Entitlements"
-msgstr "Gizmos"
+msgstr "Derechos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Custom File"
-msgstr "CustomNode"
+msgstr "Archivo Personalizado"
#: platform/osx/export/export.cpp
msgid "Allow JIT Code Execution"
@@ -19816,14 +19477,12 @@ msgid "Allow Dyld Environment Variables"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Disable Library Validation"
-msgstr "Botón Desactivado"
+msgstr "Desactivar Validación de Bibliotecas"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Audio Input"
-msgstr "Añadir Entrada"
+msgstr "Entrada de Audio"
#: platform/osx/export/export.cpp
msgid "Address Book"
@@ -19834,81 +19493,68 @@ msgid "Calendars"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Photos Library"
-msgstr "Exportar Librería"
+msgstr "Librería de Fotos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple Events"
-msgstr "Añadir Evento"
+msgstr "Eventos de Apple"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Debugging"
-msgstr "Depurar"
+msgstr "Depuración"
#: platform/osx/export/export.cpp
msgid "App Sandbox"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Server"
-msgstr "Red de Pares"
+msgstr "Servidor de Red"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Network Client"
-msgstr "Red de Pares"
+msgstr "Cliente de Red"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Device USB"
-msgstr "Dispositivo"
+msgstr "Dispositivo USB"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Downloads"
-msgstr "Descargar"
+msgstr "Descargas de Archivos"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Pictures"
-msgstr "Características"
+msgstr "Archivos de Imágenes"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Music"
-msgstr "Archivo"
+msgstr "Archivos de Música"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Files Movies"
-msgstr "Filtrar tiles"
+msgstr "Archivos de Vídeo"
#: platform/osx/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Custom Options"
-msgstr "Opciones de Bus"
+msgstr "Opciones Personalizadas"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization"
-msgstr "Traducciones"
+msgstr "Notarización"
#: platform/osx/export/export.cpp
msgid "Apple ID Name"
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Apple ID Password"
-msgstr "Contraseña"
+msgstr "Contraseña del ID de Apple"
#: platform/osx/export/export.cpp
msgid "Apple Team ID"
@@ -19931,13 +19577,12 @@ msgid "Notarization request UUID: \"%s\""
msgstr ""
#: platform/osx/export/export.cpp
-#, fuzzy
msgid ""
"The notarization process generally takes less than an hour. When the process "
"is completed, you'll receive an email."
msgstr ""
-"Nota: El proceso de notarización generalmente toma menos de una hora. Cuando "
-"se complete el proceso, recibirá un correo electrónico."
+"El proceso de notarización suele durar menos de una hora. Cuando el proceso "
+"haya finalizado, recibirás un correo electrónico."
#: platform/osx/export/export.cpp
msgid ""
@@ -19956,17 +19601,15 @@ msgstr ""
"notarial a la aplicación exportada (opcional):"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Timestamping is not compatible with ad-hoc signature, and was disabled!"
msgstr ""
-"El sellado de tiempo no es compatible con la firma ad-hoc, y se desactivará!"
+"¡La marca de tiempo no es compatible con la firma ad-hoc, y fue desactivada!"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid ""
"Hardened Runtime is not compatible with ad-hoc signature, and was disabled!"
msgstr ""
-"Hardened Runtime no es compatible con la firma ad-hoc, y se desactivará!"
+"¡Hardened Runtime no es compatible con la firma ad-hoc, y fue desactivado!"
#: platform/osx/export/export.cpp
msgid "Built-in CodeSign failed with error \"%s\"."
@@ -19991,16 +19634,14 @@ msgid "Cannot sign file %s."
msgstr "No se puede firmar el archivo %s."
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Relative symlinks are not supported, exported \"%s\" might be broken!"
msgstr ""
-"Los enlaces simbólicos relativos no son compatibles con este sistema "
-"operativo, ¡el proyecto exportado podría estar dañado!"
+"Los enlaces simbólicos relativos no son compatibles, ¡los \"%s\" exportados "
+"podrían estar rotos!"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "DMG Creation"
-msgstr "Direcciones"
+msgstr "Creación de DMG"
#: platform/osx/export/export.cpp
msgid "Could not start hdiutil executable."
@@ -20036,13 +19677,12 @@ msgstr ""
"operativo, ¡el proyecto exportado podría estar dañado!"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid ""
"Requested template binary \"%s\" not found. It might be missing from your "
"template archive."
msgstr ""
-"Plantilla binaria solicitada '%s' no encontrada. Es posible que falte en el "
-"archivo de plantillas."
+"No se ha encontrado la plantilla binaria \"%s\" solicitada. Es posible que "
+"no se encuentre en el archivo de plantillas."
#: platform/osx/export/export.cpp
msgid "Making PKG"
@@ -20085,9 +19725,8 @@ msgid "Sending archive for notarization"
msgstr "Enviando archivo para notarización"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "ZIP Creation"
-msgstr "Proyecto"
+msgstr "Creación de ZIP"
#: platform/osx/export/export.cpp
msgid "Could not open file to read from path \"%s\"."
@@ -20126,9 +19765,7 @@ msgstr "Notarización: Se requiere la firma del código para la notarización."
#: platform/osx/export/export.cpp
msgid "Notarization: Hardened runtime is required for notarization."
-msgstr ""
-"Notarización: se requiere tiempo de ejecución endurecido para la "
-"certificación notarial."
+msgstr "Notarización: Se requiere Hardened runtime para la notarización."
#: platform/osx/export/export.cpp
msgid "Notarization: Timestamp runtime is required for notarization."
@@ -20165,7 +19802,7 @@ msgid ""
"Hardened Runtime is not compatible with ad-hoc signature, and will be "
"disabled!"
msgstr ""
-"Hardened Runtime no es compatible con la firma ad-hoc, y se desactivará!"
+"¡Hardened Runtime no es compatible con la firma ad-hoc, y se desactivará!"
#: platform/osx/export/export.cpp
msgid ""
@@ -20237,14 +19874,12 @@ msgid "Force Builtin Codesign"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Architecture"
-msgstr "Añadir una entrada de arquitectura"
+msgstr "Arquitectura"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Display Name"
-msgstr "Escala de Visualización"
+msgstr "Nombre a Mostrar"
#: platform/uwp/export/export.cpp
msgid "Short Name"
@@ -20263,24 +19898,20 @@ msgid "Product GUID"
msgstr "GUID del producto"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Publisher GUID"
-msgstr "Limpiar Guías"
+msgstr "GUID del Editor"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Signing"
-msgstr "Señal"
+msgstr "Firmando"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Certificate"
-msgstr "Certificados"
+msgstr "Certificado"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Algorithm"
-msgstr "Depurador"
+msgstr "Algoritmo"
#: platform/uwp/export/export.cpp
msgid "Major"
@@ -20291,23 +19922,20 @@ msgid "Minor"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Build"
-msgstr "Modo de Regla"
+msgstr "Compilación"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Revision"
-msgstr "Expresión"
+msgstr "Revisión"
#: platform/uwp/export/export.cpp
msgid "Landscape"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Portrait"
-msgstr "Voltear Portales"
+msgstr "Retrato"
#: platform/uwp/export/export.cpp
msgid "Landscape Flipped"
@@ -20318,9 +19946,8 @@ msgid "Portrait Flipped"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Store Logo"
-msgstr "Modo de Escalado"
+msgstr "Logo de Tienda"
#: platform/uwp/export/export.cpp
msgid "Square 44 X 44 Logo"
@@ -20347,9 +19974,8 @@ msgid "Splash Screen"
msgstr "Pantalla de Bienvenida"
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Tiles"
-msgstr "Archivo"
+msgstr "Tiles"
#: platform/uwp/export/export.cpp
msgid "Show Name On Square 150 X 150"
@@ -20433,18 +20059,16 @@ msgid "UWP"
msgstr ""
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
-#, fuzzy
msgid "Signtool"
-msgstr "Señal"
+msgstr "Signtool"
#: platform/uwp/export/export.cpp
msgid "Debug Certificate"
msgstr ""
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Debug Algorithm"
-msgstr "Depurador"
+msgstr "Algoritmo de Depuración"
#: platform/windows/export/export.cpp
msgid "Failed to rename temporary file \"%s\"."
@@ -20459,19 +20083,16 @@ msgid "Timestamp Server URL"
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Digest Algorithm"
-msgstr "Depurador"
+msgstr "Algoritmo de Compilación"
#: 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 "Versión"
+msgstr "Versión del Archivo"
#: platform/windows/export/export.cpp
msgid "Product Version"
@@ -20486,38 +20107,32 @@ msgid "Product Name"
msgstr "Nombre del Producto"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "File Description"
-msgstr "Descripción"
+msgstr "Descripción del Archivo"
#: platform/windows/export/export.cpp
msgid "Trademarks"
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Resources Modification"
-msgstr "Notificaciones Push"
+msgstr "Modificación de los Recursos"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find rcedit executable at \"%s\"."
-msgstr "No se pudo encontrar la keystore, no se puedo exportar."
+msgstr "No se pudo encontrar el ejecutable rcedit en \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find wine executable at \"%s\"."
-msgstr "No se pudo encontrar la keystore, no se puedo exportar."
+msgstr "No se pudo encontrar el ejecutable de wine en \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid ""
"Could not start rcedit executable, configure rcedit path in the Editor "
"Settings (Export > Windows > Rcedit)."
msgstr ""
-"La herramienta rcedit debe configurarse en la configuración del editor "
-"(Exportar > Windows > Rcedit) para cambiar los datos de información del "
-"ícono o la aplicación."
+"No se ha podido iniciar el ejecutable rcedit, configura la ruta de rcedit en "
+"la configuración del editor (Exportar > Windows > Rcedit)."
#: platform/windows/export/export.cpp
msgid ""
@@ -20526,33 +20141,28 @@ msgid ""
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find signtool executable at \"%s\"."
-msgstr "No se pudo encontrar la keystore, no se puedo exportar."
+msgstr "No se pudo encontrar el ejecutable de signtool en \"%s\"."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Could not find osslsigncode executable at \"%s\"."
-msgstr "No se pudo encontrar la keystore, no se puedo exportar."
+msgstr "No se pudo encontrar el ejecutable osslsigncode en \"%s\"."
#: platform/windows/export/export.cpp
msgid "Invalid identity type."
msgstr "Tipo de identificador inválido."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Invalid timestamp server."
-msgstr "Nombre inválido."
+msgstr "Servidor de marcas de tiempo inválido."
#: platform/windows/export/export.cpp
-#, fuzzy
msgid ""
"Could not start signtool executable, configure signtool path in the Editor "
"Settings (Export > Windows > Signtool)."
msgstr ""
-"La herramienta rcedit debe configurarse en la configuración del editor "
-"(Exportar > Windows > Rcedit) para cambiar los datos de información del "
-"ícono o la aplicación."
+"No se ha podido iniciar el ejecutable de signtool, configura la ruta de "
+"signtool en la configuración del editor (Exportar > Windows > Signtool)."
#: platform/windows/export/export.cpp
msgid ""
@@ -20590,9 +20200,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 "Archivo ejecutable no válido."
+msgstr "Fallo al abrir el archivo ejecutable \"%s\"."
#: platform/windows/export/export.cpp platform/x11/export/export.cpp
msgid "Executable file header corrupted."
@@ -20603,9 +20212,8 @@ msgid "Executable \"pck\" section not found."
msgstr ""
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Windows"
-msgstr "Nueva Ventana"
+msgstr "Windows"
#: platform/windows/export/export.cpp
msgid "Rcedit"
@@ -20625,9 +20233,8 @@ msgstr ""
#: scene/2d/animated_sprite.cpp scene/3d/sprite_3d.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Frames"
-msgstr "Fotograma %"
+msgstr "Fotogramas"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -20639,21 +20246,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 "Escala de Velocidad"
#: 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 "Reproducir"
#: scene/2d/animated_sprite.cpp scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Centered"
-msgstr "Centro"
+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
@@ -20666,39 +20270,32 @@ msgid "Flip V"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitoring"
-msgstr "Monitor"
+msgstr "Monitorización"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Monitorable"
-msgstr "Monitor"
+msgstr "Monitorizable"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Physics Overrides"
-msgstr "Anulaciones"
+msgstr "Anulaciones de Físicas"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Space Override"
-msgstr "Anulaciones"
+msgstr "Anulación de Espacio"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Point"
-msgstr "Generar puntos"
+msgstr "Punto de Gravedad"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Distance Scale"
-msgstr "WaitInstanceSignal"
+msgstr "Escala de Distancia de la Gravedad"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Gravity Vec"
-msgstr "Vista Previa Por Defecto"
+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
@@ -20706,42 +20303,36 @@ msgid "Gravity"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Linear Damp"
-msgstr "Lineal"
+msgstr "Amortiguación Lineal"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
msgid "Angular Damp"
msgstr ""
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Audio Bus"
-msgstr "Añadir Bus de Audio"
+msgstr "Bus de Audio"
#: scene/2d/area_2d.cpp scene/3d/area.cpp
-#, fuzzy
msgid "Override"
-msgstr "Anulaciones"
+msgstr "Anular"
#: 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 "Volumen"
+msgstr "Volumen 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 "Escala"
+msgstr "Escala de 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
-#, fuzzy
msgid "Autoplay"
-msgstr "Act./Desact. Reproducción Automática"
+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
@@ -20756,29 +20347,25 @@ msgid "Max Distance"
msgstr "Distancia Maxima"
#: scene/2d/audio_stream_player_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Attenuation"
-msgstr "Animación"
+msgstr "Atenuación"
#: 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 "Añadir Bus"
+msgstr "Bus"
#: 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 Nodos"
+msgstr "Modo de Copia"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Anchor Mode"
-msgstr "Modo de Icono"
+msgstr "Modo de Anclaje"
#: scene/2d/camera_2d.cpp
msgid "Rotating"
@@ -20790,83 +20377,70 @@ msgid "Current"
msgstr "Actual"
#: scene/2d/camera_2d.cpp scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Zoom"
-msgstr "Acercar Zoom"
+msgstr "Zoom"
#: scene/2d/camera_2d.cpp scene/main/canvas_layer.cpp
-#, fuzzy
msgid "Custom Viewport"
-msgstr "1 Viewport"
+msgstr "Vista Personalizada"
#: 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 "Modo de Movimiento"
+msgstr "Modo de Proceso"
#: 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 "UI Izquierda"
+msgstr "Izquierda"
#: 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 "Derecha"
#: 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 "Inferior Izquierda"
+msgstr "Inferior"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothed"
msgstr "Suavizado"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Margin"
-msgstr "Asignar Margen"
+msgstr "Margen de Arrastre"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin H Enabled"
-msgstr "Asignar Margen"
+msgstr "Margen de Arrastre H Activado"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin V Enabled"
-msgstr "Asignar Margen"
+msgstr "Margen de Arrastre V Activado"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Smoothing"
-msgstr "Suavizado"
+msgstr "Suavizar"
#: scene/2d/camera_2d.cpp
msgid "H"
msgstr ""
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "V"
-msgstr "UV"
+msgstr "V"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Drag Margin"
-msgstr "Asignar Margen"
+msgstr "Margen de Arrastre"
#: scene/2d/camera_2d.cpp
msgid "Draw Screen"
@@ -20877,25 +20451,21 @@ msgid "Draw Limits"
msgstr "Límites de Dibujo"
#: scene/2d/camera_2d.cpp
-#, fuzzy
msgid "Draw Drag Margin"
-msgstr "Asignar Margen"
+msgstr "Margen de Arrastre del Trazado"
#: scene/2d/canvas_item.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Blend Mode"
-msgstr "Nodo Blend2"
+msgstr "Modo de Fusión"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Light Mode"
-msgstr "Ancho Derecha"
+msgstr "Modo de Iluminación"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Particles Animation"
-msgstr "Partículas"
+msgstr "Animación de Partículas"
#: scene/2d/canvas_item.cpp
msgid "Particles Anim H Frames"
@@ -20906,40 +20476,34 @@ msgid "Particles Anim V Frames"
msgstr ""
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Particles Anim Loop"
-msgstr "Partículas"
+msgstr "Bucle de Animación de Partículas"
#: scene/2d/canvas_item.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Visibility"
-msgstr "Cambiar Visibilidad"
+msgstr "Visibilidad"
#: 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 "Cambiar Visibilidad"
+msgstr "Visible"
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Self Modulate"
-msgstr "Rellenar"
+msgstr "Modulación Automática"
#: scene/2d/canvas_item.cpp
msgid "Show Behind Parent"
msgstr ""
#: scene/2d/canvas_item.cpp
-#, fuzzy
msgid "Show On Top"
-msgstr "Mostrar Origen"
+msgstr "Mostrar Arriba"
#: 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"
@@ -20966,9 +20530,8 @@ msgstr ""
"CollisionPolygon2D para definir su forma."
#: scene/2d/collision_object_2d.cpp
-#, fuzzy
msgid "Pickable"
-msgstr "Elegir Tile"
+msgstr "Seleccionable"
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -21001,29 +20564,27 @@ msgstr ""
msgid ""
"The One Way Collision property will be ignored when the parent is an Area2D."
msgstr ""
+"La propiedad Colisión en Una Dirección será ignorada cuando el padre sea un "
+"Area2D."
#: scene/2d/collision_polygon_2d.cpp
-#, fuzzy
msgid "Build Mode"
-msgstr "Modo de Regla"
+msgstr "Modo de Compilación"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
#: 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 "Desactivar Elemento"
+msgstr "Desactivado"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
-#, fuzzy
msgid "One Way Collision"
-msgstr "Crear Polígono de Colisión"
+msgstr "Colisión en Una Dirección"
#: scene/2d/collision_polygon_2d.cpp scene/2d/collision_shape_2d.cpp
-#, fuzzy
msgid "One Way Collision Margin"
-msgstr "Crear Polígono de Colisión"
+msgstr "Margen de Colisión en Una Dirección"
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -21072,15 +20633,13 @@ 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
-#, fuzzy
msgid "One Shot"
-msgstr "Nodo OneShot"
+msgstr "Un Disparo"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
-#, fuzzy
msgid "Preprocess"
-msgstr "Post procesado"
+msgstr "Preproceso"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21099,9 +20658,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 Fijos"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21115,9 +20673,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 "Proyectos Locales"
+msgstr "Coordenadas Locales"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21126,9 +20683,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Emission Shape"
-msgstr "Máscara de Emisión"
+msgstr "Forma de la Emisión"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21136,26 +20692,22 @@ msgid "Sphere Radius"
msgstr "Radio de la Esfera"
#: scene/2d/cpu_particles_2d.cpp
-#, fuzzy
msgid "Rect Extents"
-msgstr "Gizmos"
+msgstr "Extender Completo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Normals"
-msgstr "Formato"
+msgstr "Normales"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Align Y"
-msgstr "Asignar"
+msgstr "Alineación Y"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Direction"
-msgstr "Direcciones"
+msgstr "Dirección"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21165,15 +20717,13 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Initial Velocity"
-msgstr "Inicializar"
+msgstr "Velocidad Inicial"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Random"
-msgstr "Velocidad"
+msgstr "Velocidad Aleatoria"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
@@ -21183,27 +20733,23 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Velocity Curve"
-msgstr "Velocidad"
+msgstr "Curva de Velocidad"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Orbit Velocity"
-msgstr "Vista de Órbita Derecha"
+msgstr "Velocidad de la Órbita"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Linear Accel"
-msgstr "Lineal"
+msgstr "Aceleración Lineal"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel"
-msgstr "Acceso"
+msgstr "Aceleración"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21212,9 +20758,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Accel Curve"
-msgstr "Partir Curva"
+msgstr "Curva de Aceleración"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21241,9 +20786,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Damping Curve"
-msgstr "Partir Curva"
+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
@@ -21257,9 +20801,8 @@ msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Angle Curve"
-msgstr "Cerrar Curva"
+msgstr "Curva de Ãngulo"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
msgid "Scale Amount"
@@ -21270,15 +20813,13 @@ msgid "Scale Amount Random"
msgstr ""
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
-#, fuzzy
msgid "Scale Amount Curve"
-msgstr "Escalar Desde Cursor"
+msgstr "Curva de Cantidad de Escala"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Color Ramp"
-msgstr "Colores"
+msgstr "Rampa de Color"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21307,15 +20848,13 @@ msgstr "Curva de Variación"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Random"
-msgstr "Escala"
+msgstr "Velocidad Aleatoria"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Speed Curve"
-msgstr "Partir Curva"
+msgstr "Curva de Velocidad"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
@@ -21324,9 +20863,8 @@ msgstr "Desplazamiento Aleatorio"
#: scene/2d/cpu_particles_2d.cpp scene/3d/cpu_particles.cpp
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Offset Curve"
-msgstr "Cerrar Curva"
+msgstr "Curva de Desplazamiento"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be PhysicsBody2Ds"
@@ -21349,14 +20887,12 @@ msgid "Node A and Node B must be different PhysicsBody2Ds"
msgstr "El Nodo A y el Nodo B deben ser diferentes PhysicsBody2D"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node A"
-msgstr "Nodos"
+msgstr "Nodo A"
#: scene/2d/joints_2d.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Node B"
-msgstr "Nodos"
+msgstr "Nodo 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
@@ -21365,9 +20901,8 @@ msgid "Bias"
msgstr ""
#: scene/2d/joints_2d.cpp
-#, fuzzy
msgid "Disable Collision"
-msgstr "Botón Desactivado"
+msgstr "Desactivar Colisión"
#: scene/2d/joints_2d.cpp scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Softness"
@@ -21379,9 +20914,8 @@ msgid "Length"
msgstr ""
#: scene/2d/joints_2d.cpp
-#, fuzzy
msgid "Initial Offset"
-msgstr "Inicializar"
+msgstr "Desplazamiento Inicial"
#: scene/2d/joints_2d.cpp scene/3d/vehicle_body.cpp
msgid "Rest Length"
@@ -21400,14 +20934,12 @@ msgstr ""
"Texture\"."
#: scene/2d/light_2d.cpp scene/3d/light.cpp scene/gui/reference_rect.cpp
-#, fuzzy
msgid "Editor Only"
-msgstr "Editor"
+msgstr "Sólo para el Editor"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Texture Scale"
-msgstr "Región de Textura"
+msgstr "Escala de Textura"
#: scene/2d/light_2d.cpp scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/light.cpp scene/resources/environment.cpp
@@ -21424,48 +20956,40 @@ msgid "Z Max"
msgstr ""
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Layer Min"
-msgstr "Cambiar Tamaño de Cámara"
+msgstr "Capa Mínima"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Layer Max"
-msgstr "Capa"
+msgstr "Capa Máxima"
#: scene/2d/light_2d.cpp
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
msgid "Buffer Size"
-msgstr "Vista Trasera"
+msgstr "Tamaño del Buffer"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Gradient Length"
-msgstr "Degradado Editado"
+msgstr "Longitud del Gradiente"
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid "Filter Smooth"
-msgstr "Filtrar métodos"
+msgstr "Filtro Suavizado"
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "Closed"
-msgstr "Cerrar"
+msgstr "Cerrado"
#: scene/2d/light_occluder_2d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Cull Mode"
-msgstr "Modo de Regla"
+msgstr "Modo de Sacrificio"
#: scene/2d/light_occluder_2d.cpp
msgid ""
@@ -21481,47 +21005,40 @@ msgstr ""
"polígono."
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Width Curve"
-msgstr "Partir Curva"
+msgstr "Curva de Ancho"
#: scene/2d/line_2d.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Default Color"
-msgstr "Por defecto"
+msgstr "Color por Defecto"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
msgid "Fill"
-msgstr ""
+msgstr "Rellenar"
#: scene/2d/line_2d.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Gradient"
-msgstr "Degradado Editado"
+msgstr "Gradiente"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Texture Mode"
-msgstr "Región de Textura"
+msgstr "Modo de Textura"
#: scene/2d/line_2d.cpp
msgid "Capping"
-msgstr ""
+msgstr "Tapado"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Joint Mode"
-msgstr "Modo de Icono"
+msgstr "Modo de Unión"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "Begin Cap Mode"
-msgstr "Modo de Región"
+msgstr "Iniciar Modo Cap"
#: scene/2d/line_2d.cpp
-#, fuzzy
msgid "End Cap Mode"
-msgstr "Modo de Ajuste:"
+msgstr "Modo Tapón"
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp scene/resources/style_box.cpp
msgid "Border"
@@ -21537,14 +21054,12 @@ msgstr ""
#: scene/2d/line_2d.cpp scene/2d/polygon_2d.cpp
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Antialiased"
-msgstr "Inicializar"
+msgstr "Suavizado Espacial"
#: scene/2d/multimesh_instance_2d.cpp scene/3d/multimesh_instance.cpp
-#, fuzzy
msgid "Multimesh"
-msgstr "Multiplicar %s"
+msgstr "Multimesh"
#: scene/2d/navigation_2d.cpp scene/3d/baked_lightmap.cpp
#: scene/3d/navigation.cpp scene/animation/root_motion_view.cpp
@@ -21564,60 +21079,54 @@ msgid ""
msgstr ""
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Pathfinding"
-msgstr "Vinculación"
+msgstr "Pathfinding"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Path Desired Distance"
-msgstr "Distancia de la Ruta U"
+msgstr "Ruta Distancia Deseada"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Target Desired Distance"
-msgstr ""
+msgstr "Distancia Deseada del Objetivo"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Path Max Distance"
-msgstr "Distancia Máxima de Ruta"
+msgstr "Distancia Máxima de la Ruta"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Avoidance"
-msgstr "Avanzado"
+msgstr "Evasión"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Avoidance Enabled"
-msgstr "Activar"
+msgstr "Evasión Activada"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Neighbor Dist"
-msgstr ""
+msgstr "Dist. de Vecinos"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Max Neighbors"
-msgstr ""
+msgstr "Máximo de Vecinos"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
-#, fuzzy
msgid "Time Horizon"
-msgstr "Voltear Horizontalmente"
+msgstr "Horizonte del Tiempo"
#: scene/2d/navigation_agent_2d.cpp scene/3d/navigation_agent.cpp
msgid "Max Speed"
msgstr "Velocidad Máxima"
#: scene/2d/navigation_agent_2d.cpp
-#, fuzzy
msgid ""
"The NavigationAgent2D can be used only under a Node2D inheriting parent node."
-msgstr "El NavigationAgent2D sólo puede utilizarse bajo un nodo Node2D."
+msgstr ""
+"El NavigationAgent2D sólo puede utilizarse bajo un nodo padre hijo de Node2D."
#: scene/2d/navigation_obstacle_2d.cpp scene/3d/navigation_obstacle.cpp
-#, fuzzy
msgid "Estimate Radius"
-msgstr "Cambiar Radio Externo de Torus"
+msgstr "Estimación del Radio"
#: scene/2d/navigation_obstacle_2d.cpp
msgid ""
@@ -21632,22 +21141,20 @@ msgid ""
"A NavigationPolygon resource must be set or created for this node to work. "
"Please set a property or draw a polygon."
msgstr ""
-"Se debe crear o asignar un recurso NavigationPolygon a este nodo para que "
-"funcione. Por favor, establece la propiedad o dibuja un polígono."
+"Un recurso NavigationPolygon debe ser establecido o creado para que este "
+"nodo funcione. Por favor, establece una propiedad o dibuja un polígono."
#: scene/2d/navigation_polygon.cpp
msgid "Navpoly"
-msgstr ""
+msgstr "Navpoly"
#: scene/2d/navigation_polygon.cpp scene/3d/navigation_mesh_instance.cpp
-#, fuzzy
msgid "Enter Cost"
-msgstr "Centro Inferior"
+msgstr "Introduce Costo"
#: scene/2d/navigation_polygon.cpp scene/3d/navigation_mesh_instance.cpp
-#, fuzzy
msgid "Travel Cost"
-msgstr "Viaje"
+msgstr "Costo del Viaje"
#: scene/2d/node_2d.cpp scene/2d/polygon_2d.cpp scene/3d/spatial.cpp
#: scene/main/canvas_layer.cpp
@@ -21655,9 +21162,8 @@ msgid "Rotation Degrees"
msgstr "Grados de Rotación"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Rotation"
-msgstr "Constante Global"
+msgstr "Rotación Global"
#: scene/2d/node_2d.cpp
msgid "Global Rotation Degrees"
@@ -21668,41 +21174,37 @@ msgid "Global Scale"
msgstr "Escala Global"
#: scene/2d/node_2d.cpp scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Transform"
-msgstr "Mantener transformación global"
+msgstr "Transformación Global"
#: scene/2d/node_2d.cpp
-#, fuzzy
msgid "Z As Relative"
-msgstr "Ajuste Relativo"
+msgstr "Z Como Relativo"
#: scene/2d/parallax_background.cpp scene/gui/scroll_container.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Scroll"
-msgstr ""
+msgstr "Scroll"
#: scene/2d/parallax_background.cpp
msgid "Base Offset"
msgstr "Desplazamiento Base"
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Base Scale"
-msgstr "Usar Ajuste de Escalado"
+msgstr "Escala Base"
#: scene/2d/parallax_background.cpp
msgid "Limit Begin"
-msgstr ""
+msgstr "Inicio del Límite"
#: scene/2d/parallax_background.cpp
-#, fuzzy
msgid "Limit End"
-msgstr "Al Final"
+msgstr "Fin del Límite"
#: scene/2d/parallax_background.cpp
msgid "Ignore Camera Zoom"
-msgstr ""
+msgstr "Ignorar Zoom de la Cámara"
#: scene/2d/parallax_layer.cpp
msgid ""
@@ -21714,12 +21216,10 @@ msgstr ""
#: scene/2d/parallax_layer.cpp scene/2d/physics_body_2d.cpp
#: scene/3d/physics_body.cpp scene/3d/vehicle_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Motion"
-msgstr "Acción"
+msgstr "Movimiento"
#: scene/2d/parallax_layer.cpp
-#, fuzzy
msgid "Mirroring"
msgstr "Reflejar"
@@ -21766,9 +21266,8 @@ msgstr ""
"\"Particles Animation\" activado."
#: scene/2d/particles_2d.cpp
-#, fuzzy
msgid "Visibility Rect"
-msgstr "Modo de Prioridad"
+msgstr "Visibilidad Rect"
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid "Process Material"
@@ -21776,9 +21275,8 @@ msgstr ""
#: scene/2d/path_2d.cpp scene/3d/path.cpp scene/resources/sky.cpp
#: scene/resources/texture.cpp
-#, fuzzy
msgid "Curve"
-msgstr "Partir Curva"
+msgstr "Curva"
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
@@ -21806,25 +21304,21 @@ msgid "Lookahead"
msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Layers"
-msgstr "Capa"
+msgstr "Capas"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Linear Velocity"
-msgstr "Inicializar"
+msgstr "Velocidad Lineal Constante"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Constant Angular Velocity"
-msgstr "Inicializar"
+msgstr "Velocidad 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 "Función"
+msgstr "Fricción"
#: scene/2d/physics_body_2d.cpp scene/2d/tile_map.cpp scene/3d/physics_body.cpp
#: scene/resources/physics_material.cpp
@@ -21837,9 +21331,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 "Vista Previa Por Defecto"
+msgstr "Gravedad por Defecto"
#: scene/2d/physics_body_2d.cpp
msgid ""
@@ -21860,38 +21353,33 @@ msgid "Inertia"
msgstr "Inercia"
#: 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 ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Custom Integrator"
-msgstr "CustomNode"
+msgstr "Integrador Personalizado"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Continuous CD"
-msgstr "Continuo"
+msgstr "CD Continuo"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Contacts Reported"
msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Contact Monitor"
-msgstr "Seleccionar Color"
+msgstr "Monitor de Contacto"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
-#, fuzzy
msgid "Sleeping"
-msgstr "Ajuste Inteligente"
+msgstr "Resposo"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Can Sleep"
@@ -21914,18 +21402,16 @@ msgid "Torque"
msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Safe Margin"
-msgstr "Asignar Margen"
+msgstr "Margen de Seguridad"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Sync To Physics"
msgstr "Sincronización Con La Física"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Moving Platform"
-msgstr "Moviendo salida"
+msgstr "Plataforma Móvil"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Apply Velocity On Leave"
@@ -21935,24 +21421,21 @@ msgstr ""
#: 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
msgid "Remainder"
msgstr "Recordatorio"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Local Shape"
-msgstr "Idioma"
+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 de Colisión"
+msgstr "Colisionador"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#: servers/physics_2d_server.cpp servers/physics_server.cpp
@@ -21961,26 +21444,22 @@ msgstr ""
#: 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 "Colisionador 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 "Modo de Colisión"
+msgstr "Forma de Colisión"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
-#, fuzzy
msgid "Collider Shape Index"
-msgstr "Modo de Colisión"
+msgstr "Ãndice de Formas de Colisión"
#: 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 de Órbita Derecha"
+msgstr "Velocidad del Colisionador"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Collider Metadata"
@@ -21991,28 +21470,24 @@ msgid "Invert"
msgstr ""
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Vertex Colors"
-msgstr "Vértice"
+msgstr "Color de los Vértices"
#: scene/2d/polygon_2d.cpp
-#, fuzzy
msgid "Internal Vertex Count"
-msgstr "Crear Vértice Interno"
+msgstr "Conteo de Vértices Internos"
#: scene/2d/position_2d.cpp
-#, fuzzy
msgid "Gizmo Extents"
-msgstr "Gizmos"
+msgstr "Extensión de Gizmos"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Exclude Parent"
msgstr ""
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Cast To"
-msgstr "Crear Nodo Shader"
+msgstr "Lanzar A"
#: scene/2d/ray_cast_2d.cpp scene/3d/ray_cast.cpp
msgid "Collide With"
@@ -22031,24 +21506,20 @@ msgid "Path property must point to a valid Node2D node to work."
msgstr "La propiedad Path debe apuntar a un nodo Node2D válido para funcionar."
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Remote Path"
-msgstr "Eliminar Punto"
+msgstr "Ruta Remota"
#: scene/2d/remote_transform_2d.cpp scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Use Global Coordinates"
-msgstr "Siguiente Coordenada"
+msgstr "Utilizar Coordenadas Globales"
#: scene/2d/skeleton_2d.cpp scene/3d/skeleton.cpp
-#, fuzzy
msgid "Rest"
-msgstr "Reiniciar"
+msgstr "Reposo"
#: scene/2d/skeleton_2d.cpp
-#, fuzzy
msgid "Default Length"
-msgstr "Theme Predeterminado"
+msgstr "Longitud por Defecto"
#: scene/2d/skeleton_2d.cpp
msgid "This Bone2D chain should end at a Skeleton2D node."
@@ -22075,14 +21546,12 @@ msgid "Vframes"
msgstr ""
#: scene/2d/sprite.cpp scene/3d/sprite_3d.cpp
-#, fuzzy
msgid "Frame Coords"
-msgstr "Fotograma %"
+msgstr "Coordenadas del Marco"
#: scene/2d/sprite.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Filter Clip"
-msgstr "Filtrar scripts"
+msgstr "Filtrar Clips"
#: scene/2d/tile_map.cpp
msgid ""
@@ -22095,44 +21564,36 @@ msgstr ""
"RigidBody2D, KinematicBody2D, etc. para que puedan tener 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 "Cambiar Tamaño de Cámara"
+msgstr "Tamaño del Cuadrante"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Custom Transform"
-msgstr "Transformar"
+msgstr "Transformación Personalizada"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Half Offset"
-msgstr "Inicializar"
+msgstr "Medio Desplazamiento"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Tile Origin"
-msgstr "Ver Origen"
+msgstr "Origen de los Tiles"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Y Sort"
-msgstr "Ordenar"
+msgstr "Ordenar Y"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Show Collision"
-msgstr "Colisión"
+msgstr "Mostrar Colisión"
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Compatibility Mode"
-msgstr "Modo de Prioridad"
+msgstr "Modo de Compatibilidad"
#: scene/2d/tile_map.cpp
msgid "Centered Textures"
@@ -22143,32 +21604,28 @@ msgid "Cell Clip UV"
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid "Use Parent"
-msgstr "Modo de Colisión"
+msgstr "Usar Padres"
#: scene/2d/tile_map.cpp
msgid "Use Kinematic"
msgstr ""
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Shape Centered"
-msgstr "Ajustar al Centro del Nodo"
+msgstr "Forma Centrada"
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Shape Visible"
-msgstr "Act./Desact. Visible"
+msgstr "Forma Visible"
#: scene/2d/touch_screen_button.cpp
msgid "Passby Press"
msgstr ""
#: scene/2d/touch_screen_button.cpp
-#, fuzzy
msgid "Visibility Mode"
-msgstr "Modo de Prioridad"
+msgstr "Modo de Visibilidad"
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -22179,28 +21636,24 @@ msgstr ""
"editada directamente como padre."
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
-#, fuzzy
msgid "Pause Animations"
-msgstr "Pegar Animación"
+msgstr "Pausar Animaciones"
#: scene/2d/visibility_notifier_2d.cpp scene/3d/visibility_notifier.cpp
msgid "Freeze Bodies"
msgstr ""
#: 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 "Pegar Animación"
+msgstr "Pausar Sprites Animados"
#: scene/2d/visibility_notifier_2d.cpp
-#, fuzzy
msgid "Process Parent"
-msgstr "Activar Prioridad"
+msgstr "Procesamiento de los Padres"
#: scene/2d/visibility_notifier_2d.cpp
msgid "Physics Process Parent"
@@ -22211,9 +21664,8 @@ msgid "Reverb Bus"
msgstr ""
#: scene/3d/area.cpp
-#, fuzzy
msgid "Uniformity"
-msgstr "Establecer Nombre de Uniform"
+msgstr "Uniformidad"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRCamera must have an ARVROrigin node as its parent."
@@ -22240,9 +21692,8 @@ msgstr ""
"un controlador real."
#: scene/3d/arvr_nodes.cpp
-#, fuzzy
msgid "Anchor ID"
-msgstr "Sólo anclado"
+msgstr "ID de Ancla"
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
@@ -22265,9 +21716,8 @@ msgid "World Scale"
msgstr "Escala del Mundo"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Attenuation Model"
-msgstr "Nodo de Animación"
+msgstr "Modelo de Atenuación"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Unit dB"
@@ -22286,18 +21736,16 @@ msgid "Out Of Range Mode"
msgstr ""
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Emission Angle"
-msgstr "Colores de Emisión"
+msgstr "Ãngulo de Emisión"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Degrees"
msgstr "Grados"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Filter Attenuation dB"
-msgstr "Animación"
+msgstr "Filtro de Atenuación dB"
#: scene/3d/audio_stream_player_3d.cpp
msgid "Attenuation Filter"
@@ -22311,19 +21759,16 @@ 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 "Activar Doppler"
+msgstr "Doppler"
#: scene/3d/audio_stream_player_3d.cpp
-#, fuzzy
msgid "Tracking"
-msgstr "Empaquetando"
+msgstr "Seguimiento"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
#: scene/3d/reflection_probe.cpp
@@ -22357,9 +21802,8 @@ msgstr "Hecho"
#: 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 "Gizmos"
+msgstr "Extensiones"
#: scene/3d/baked_lightmap.cpp
msgid "Tweaks"
@@ -22382,66 +21826,56 @@ msgid "Use HDR"
msgstr ""
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Use Color"
-msgstr "Colores"
+msgstr "Usar Color"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Default Texels Per Unit"
-msgstr "Theme Predeterminado"
+msgstr "Texeles Por Unidad Predeterminados"
#: scene/3d/baked_lightmap.cpp scene/resources/texture.cpp
-#, fuzzy
msgid "Atlas"
-msgstr "Nuevo Atlas"
+msgstr "Atlas"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generate"
-msgstr "General"
+msgstr "Generar"
#: scene/3d/baked_lightmap.cpp
msgid "Max Size"
msgstr "Tamaño Máximo"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Custom Sky"
-msgstr "CustomNode"
+msgstr "Cielo Personalizado"
#: scene/3d/baked_lightmap.cpp
msgid "Custom Sky Rotation Degrees"
msgstr "Grados de Rotación del Cielo Personalizados"
#: scene/3d/baked_lightmap.cpp scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Custom Color"
-msgstr "CustomNode"
+msgstr "Color Personalizado"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Custom Energy"
-msgstr "Mover Efecto de Bus"
+msgstr "Energía Personalizada"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Min Light"
-msgstr "Indentar a la Derecha"
+msgstr "Luz Mínima"
#: scene/3d/baked_lightmap.cpp scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Propagation"
-msgstr "Navegación"
+msgstr "Propagación"
#: scene/3d/baked_lightmap.cpp
msgid "Image Path"
msgstr ""
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Light Data"
-msgstr "Con Datos"
+msgstr "Datos de Iluminación"
#: scene/3d/bone_attachment.cpp scene/3d/physics_body.cpp
msgid "Bone Name"
@@ -22456,14 +21890,12 @@ msgid "Cull Mask"
msgstr ""
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Doppler Tracking"
-msgstr "Pista de Propiedades"
+msgstr "Seguimiento de Doppler"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Projection"
-msgstr "Proyecto"
+msgstr "Proyección"
#: scene/3d/camera.cpp
msgid "FOV"
@@ -22474,9 +21906,8 @@ msgid "Frustum Offset"
msgstr "Offset de Frustum"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Near"
-msgstr "Más Cercano"
+msgstr "Cercano"
#: scene/3d/camera.cpp
msgid "Far"
@@ -22487,23 +21918,20 @@ msgstr ""
#: 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 "Asignar Margen"
+msgstr "Margen"
#: scene/3d/camera.cpp
-#, fuzzy
msgid "Clip To"
-msgstr "Clip Arriba"
+msgstr "Recortar A"
#: scene/3d/collision_object.cpp scene/3d/soft_body.cpp
msgid "Ray Pickable"
msgstr ""
#: scene/3d/collision_object.cpp
-#, fuzzy
msgid "Capture On Drag"
-msgstr "Captura"
+msgstr "Captura Al Arrastrar"
#: scene/3d/collision_object.cpp
msgid ""
@@ -22575,53 +22003,44 @@ msgstr ""
"Billboard esté ajustado a \"Particle Billboard\"."
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Box Extents"
-msgstr "Gizmos"
+msgstr "Extensión de Cajas"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Ring Radius"
-msgstr "Máscara de Emisión"
+msgstr "Radio del Anillo"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Ring Inner Radius"
-msgstr "Cambiar Radio Interno de Torus"
+msgstr "Radio Interior del Anillo"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Ring Height"
-msgstr "Rotar a la Derecha"
+msgstr "Altura del Anillo"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Ring Axis"
-msgstr "Advertencias"
+msgstr "Eje del Anillo"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Rotate Y"
-msgstr "Rotar"
+msgstr "Rotar Y"
#: scene/3d/cpu_particles.cpp scene/resources/particles_material.cpp
-#, fuzzy
msgid "Disable Z"
-msgstr "Desactivar Elemento"
+msgstr "Desactivar 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 "Voltear Portales"
+msgstr "Portales"
#: scene/3d/cull_instance.cpp
-#, fuzzy
msgid "Portal Mode"
-msgstr "Modo de Prioridad"
+msgstr "Modo Portal"
#: scene/3d/cull_instance.cpp
msgid "Include In Bound"
@@ -22632,9 +22051,8 @@ msgid "Allow Merging"
msgstr ""
#: scene/3d/cull_instance.cpp
-#, fuzzy
msgid "Autoplace Priority"
-msgstr "Activar Prioridad"
+msgstr "Prioridad de Autoemplazamiento"
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
@@ -22667,9 +22085,8 @@ msgid "Subdiv"
msgstr ""
#: scene/3d/gi_probe.cpp
-#, fuzzy
msgid "Dynamic Range"
-msgstr "Librería Dinámica"
+msgstr "Rango Dinámico"
#: scene/3d/gi_probe.cpp scene/3d/light.cpp
msgid "Normal Bias"
@@ -22677,18 +22094,16 @@ msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
#: scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Pixel Size"
-msgstr "Ajuste de Píxeles"
+msgstr "Tamaño de Píxeles"
#: 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 "Shader"
+msgstr "Sombreado"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Double Sided"
@@ -22699,9 +22114,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 Frontal"
+msgstr "Tamaño Fijo"
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp
msgid "Alpha Cut"
@@ -22712,119 +22126,98 @@ msgid "Alpha Scissor Threshold"
msgstr ""
#: scene/3d/label_3d.cpp scene/3d/sprite_3d.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Render Priority"
-msgstr "Activar Prioridad"
+msgstr "Prioridad de Renderización"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Outline Render Priority"
-msgstr "Activar Prioridad"
+msgstr "Prioridad de Renderización del Contorno"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Outline Modulate"
-msgstr "Forzar Modulación en Blanco"
+msgstr "Modular Contorno"
#: 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 "Fuentes"
+msgstr "Fuente"
#: scene/3d/label_3d.cpp scene/resources/primitive_meshes.cpp
-#, fuzzy
msgid "Horizontal Alignment"
-msgstr "Horizontal Activado"
+msgstr "Alineación Horizontal"
#: scene/3d/label_3d.cpp
-#, fuzzy
msgid "Vertical Alignment"
-msgstr "Filtrar señales"
+msgstr "Alineación Vertical"
#: scene/3d/label_3d.cpp scene/gui/dialogs.cpp scene/gui/label.cpp
-#, fuzzy
msgid "Autowrap"
-msgstr "AutoLoad"
+msgstr "Envoltura Automática"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Indirect Energy"
-msgstr "Colores de Emisión"
+msgstr "Energía Indirecta"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Negative"
-msgstr "GDNative"
+msgstr "Negativo"
#: scene/3d/light.cpp scene/resources/material.cpp
#: scene/resources/visual_shader.cpp
-#, fuzzy
msgid "Specular"
-msgstr "Modo de Regla"
+msgstr "Especular"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Bake Mode"
-msgstr "Modo de Bitmask"
+msgstr "Modo de Bakeo"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Contact"
-msgstr "Seleccionar Color"
+msgstr "Contacto"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Reverse Cull Face"
-msgstr "Restablecer Volumen de Bus"
+msgstr "Eliminar Caras Invertidas"
#: scene/3d/light.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Directional Shadow"
-msgstr "Direcciones"
+msgstr "Sombra Direccional"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 1"
-msgstr "Dividir"
+msgstr "Dividir 1"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 2"
-msgstr "Dividir"
+msgstr "Dividir 2"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Split 3"
-msgstr "Dividir"
+msgstr "Dividir 3"
#: scene/3d/light.cpp
msgid "Blend Splits"
msgstr "Mezclar Divisiones"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Bias Split Scale"
-msgstr "Usar Ajuste de Escalado"
+msgstr "Escala de División del Sesgo"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Depth Range"
-msgstr "Profundidad"
+msgstr "Rango de Profundidad"
#: scene/3d/light.cpp
msgid "Omni"
msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Shadow Mode"
-msgstr "Shader"
+msgstr "Modo de Sombreado"
#: scene/3d/light.cpp
-#, fuzzy
msgid "Shadow Detail"
-msgstr "Mostrar Por Defecto"
+msgstr "Detalle de la Sombra"
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -22836,9 +22229,8 @@ msgid "Spot"
msgstr ""
#: scene/3d/light.cpp
-#, fuzzy
msgid "Angle Attenuation"
-msgstr "Animación"
+msgstr "Atenuación del Ãngulo"
#: scene/3d/mesh_instance.cpp
msgid "Software Skinning"
@@ -22856,43 +22248,38 @@ msgid ""
msgstr ""
#: scene/3d/navigation.cpp scene/resources/curve.cpp
-#, fuzzy
msgid "Up Vector"
-msgstr "Vector"
+msgstr "Vector Superior"
#: scene/3d/navigation.cpp
-#, fuzzy
msgid "Cell Height"
-msgstr "Prueba"
+msgstr "Altura de la Celda"
#: scene/3d/navigation_agent.cpp
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
msgid ""
"The NavigationAgent can be used only under a Spatial inheriting parent node."
-msgstr "El NavigationAgent sólo puede utilizarse bajo un nodo spatial."
+msgstr ""
+"El NavigationAgent solo puede utilizarse en un nodo padre de tipo Spatial."
#: scene/3d/navigation_mesh_instance.cpp scene/resources/mesh_library.cpp
-#, fuzzy
msgid "NavMesh"
-msgstr "Calcular NavMesh"
+msgstr "NavMesh"
#: scene/3d/navigation_obstacle.cpp
-#, fuzzy
msgid ""
"The NavigationObstacle only serves to provide collision avoidance to a "
"Spatial inheriting parent object."
msgstr ""
-"El NavigationObstacle sólo sirve para evitar la colisión de un objeto "
-"spatial."
+"El NavigationObstacle solo sirve para evitar colisiones en un objeto padre "
+"de tipo Spatial."
#: scene/3d/occluder.cpp
msgid "No shape is set."
@@ -22943,9 +22330,8 @@ msgstr ""
"Billboard esté ajustado a \"Particle Billboard\"."
#: scene/3d/particles.cpp
-#, fuzzy
msgid "Visibility AABB"
-msgstr "Cambiar Visibilidad"
+msgstr "Visibilidad AABB"
#: scene/3d/particles.cpp
msgid "Draw Passes"
@@ -22969,7 +22355,6 @@ msgstr ""
"el recurso Curve de su Path padre."
#: scene/3d/path.cpp
-#, fuzzy
msgid "Rotation Mode"
msgstr "Modo de Rotación"
@@ -22984,65 +22369,56 @@ msgstr ""
"En su lugar, cambia el tamaño en las formas de colisión de los hijos."
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Axis Lock"
-msgstr "Eje"
+msgstr "Bloquear Ejes"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear X"
-msgstr "Lineal"
+msgstr "Lineal X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Y"
-msgstr "Lineal"
+msgstr "Lineal Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Z"
-msgstr "Lineal"
+msgstr "Lineal Z"
#: scene/3d/physics_body.cpp
msgid "Angular X"
-msgstr ""
+msgstr "Angular X"
#: scene/3d/physics_body.cpp
msgid "Angular Y"
-msgstr ""
+msgstr "Angular Y"
#: scene/3d/physics_body.cpp
msgid "Angular Z"
-msgstr ""
+msgstr "Angular Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion X"
-msgstr "Acción"
+msgstr "Movimiento X"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Y"
-msgstr "Acción"
+msgstr "Movimiento Y"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Motion Z"
-msgstr "Acción"
+msgstr "Movimiento Z"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint Constraints"
-msgstr "Constantes"
+msgstr "Restringir Articulaciones"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Impulse Clamp"
msgstr ""
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Swing Span"
-msgstr "Guardar Escena"
+msgstr "Expansión de Swing"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "Twist Span"
@@ -23054,147 +22430,124 @@ msgid "Relaxation"
msgstr "Relajación"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Enabled"
-msgstr "Filtrar señales"
+msgstr "Límite Angular Activado"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Upper"
-msgstr "Lineal"
+msgstr "Límite Angular Superior"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Lower"
-msgstr "Ortogonal Angular"
+msgstr "Límite Angular Inferior"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Bias"
-msgstr "Lineal"
+msgstr "Sesgo de Límite Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Softness"
-msgstr "Animación"
+msgstr "Límite Angular de Suavizado"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Relaxation"
-msgstr "Animación"
+msgstr "Relajación del Límite Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Upper"
-msgstr "Lineal"
+msgstr "Límite Lineal Superior"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Lower"
-msgstr "Lineal"
+msgstr "Límite Lineal Inferior"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Softness"
-msgstr "Lineal"
+msgstr "Límite Lineal de Suavizado"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Restitution"
-msgstr "Lineal"
+msgstr "Restitución del Límite Lineal"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Limit Damping"
-msgstr "Lineal"
+msgstr "Amortiguación de Límite Lineal"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Restitution"
-msgstr "Animación"
+msgstr "Restitución del Límite Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Limit Damping"
-msgstr "Animación"
+msgstr "Amortiguación de Límite Angular"
#: 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 "Lineal"
+msgstr "Límite Lineal Activado"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Spring Enabled"
-msgstr "Lineal"
+msgstr "Amortiguador Lineal Activado"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Spring Stiffness"
-msgstr "Lineal"
+msgstr "Rigidez Lineal del Amortiguador"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Spring Damping"
-msgstr "Lineal"
+msgstr "Atenuación Lineal del Amortiguador"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Equilibrium Point"
-msgstr "Lineal"
+msgstr "Punto de Equilibrio Lineal"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Restitution"
-msgstr "Descripción"
+msgstr "Restitución Lineal"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Linear Damping"
-msgstr "Lineal"
+msgstr "Amortiguación Lineal"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Restitution"
-msgstr "Descripción"
+msgstr "Restitución Angular"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Damping"
-msgstr "Animación"
+msgstr "Amortiguación Angular"
#: scene/3d/physics_body.cpp scene/3d/physics_joint.cpp
msgid "ERP"
-msgstr ""
+msgstr "ERP"
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Angular Spring Enabled"
-msgstr "Filtrar señales"
+msgstr "Amortiguación Angular Activada"
#: scene/3d/physics_body.cpp
msgid "Angular Spring Stiffness"
-msgstr ""
+msgstr "Rigidez del Amortiguador Angular"
#: scene/3d/physics_body.cpp
msgid "Angular Spring Damping"
-msgstr ""
+msgstr "Amortiguación Angular del Muelle"
#: scene/3d/physics_body.cpp
msgid "Angular Equilibrium Point"
-msgstr ""
+msgstr "Punto de Equilibrio Angular"
#: scene/3d/physics_body.cpp
msgid "Body Offset"
@@ -23225,9 +22578,8 @@ msgid "Solver"
msgstr ""
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Exclude Nodes"
-msgstr "Eliminar Nodos"
+msgstr "Excluir Nodos"
#: scene/3d/physics_joint.cpp
msgid "Params"
@@ -23238,32 +22590,28 @@ msgid "Angular Limit"
msgstr ""
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper"
-msgstr "Mayúsculas"
+msgstr "Superior"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower"
-msgstr "Minúsculas"
+msgstr "Inferior"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "Motor"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Target Velocity"
-msgstr "Vista de Órbita Derecha"
+msgstr "Velocidad del Objetivo"
#: scene/3d/physics_joint.cpp
msgid "Max Impulse"
msgstr "Impulso Máximo"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit"
-msgstr "Lineal"
+msgstr "Límite Lineal"
#: scene/3d/physics_joint.cpp
msgid "Upper Distance"
@@ -23274,57 +22622,48 @@ msgid "Lower Distance"
msgstr "Distancia Inferior"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Restitution"
-msgstr "Descripción"
+msgstr "Restitución"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motion"
-msgstr "Inicializar"
+msgstr "Movimiento Lineal"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Ortho"
-msgstr "Ortogonal Trasera"
+msgstr "Ortogonal Lineal"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Upper Angle"
-msgstr "Mayúsculas"
+msgstr "Ãngulo Superior"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Lower Angle"
-msgstr "Minúsculas"
+msgstr "Ãngulo Inferior"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Angular Motion"
-msgstr "Animación"
+msgstr "Movimiento Angular"
#: scene/3d/physics_joint.cpp
msgid "Angular Ortho"
msgstr "Ortogonal Angular"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit X"
-msgstr "Lineal"
+msgstr "Límite Lineal X"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor X"
-msgstr "Inicializar"
+msgstr "Motor Lineal X"
#: scene/3d/physics_joint.cpp
msgid "Force Limit"
msgstr "Forzar Límite"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Spring X"
-msgstr "Lineal"
+msgstr "Amortiguación Lineal X"
#: scene/3d/physics_joint.cpp
msgid "Equilibrium Point"
@@ -23340,22 +22679,19 @@ msgstr ""
#: scene/3d/physics_joint.cpp
msgid "Angular Spring X"
-msgstr ""
+msgstr "Amortiguación Angular X"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit Y"
-msgstr "Lineal"
+msgstr "Límite Lineal Y"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor Y"
-msgstr "Inicializar"
+msgstr "Motor Lineal Y"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Spring Y"
-msgstr "Lineal"
+msgstr "Amortiguación Lineal Y"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Y"
@@ -23367,22 +22703,19 @@ msgstr ""
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Y"
-msgstr ""
+msgstr "Amortiguación Angular Y"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Limit Z"
-msgstr "Lineal"
+msgstr "Límite Lineal Z"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Motor Z"
-msgstr "Inicializar"
+msgstr "Motor Lineal Z"
#: scene/3d/physics_joint.cpp
-#, fuzzy
msgid "Linear Spring Z"
-msgstr "Lineal"
+msgstr "Amortiguación Lineal Z"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Z"
@@ -23394,7 +22727,7 @@ msgstr ""
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Z"
-msgstr ""
+msgstr "Amortiguación Angular Z"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
@@ -23421,14 +22754,12 @@ msgid "Linked Room"
msgstr "Sala Vinculada"
#: scene/3d/portal.cpp
-#, fuzzy
msgid "Use Default Margin"
-msgstr "Por defecto"
+msgstr "Usar Margen por Defecto"
#: scene/3d/proximity_group.cpp
-#, fuzzy
msgid "Group Name"
-msgstr "Agrupado"
+msgstr "Nombre del Grupo"
#: scene/3d/proximity_group.cpp
msgid "Dispatch Mode"
@@ -23439,47 +22770,40 @@ msgid "Grid Radius"
msgstr "Radio de Cuadrícula"
#: scene/3d/ray_cast.cpp
-#, fuzzy
msgid "Debug Shape"
-msgstr "Depurador"
+msgstr "Depurar Shape"
#: 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 "Modo de Rotación"
+msgstr "Modo de Actualización"
#: scene/3d/reflection_probe.cpp
msgid "Origin Offset"
msgstr "Desplazamiento de Origen"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Box Projection"
-msgstr "Proyecto"
+msgstr "Proyección de Cajas"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Enable Shadows"
-msgstr "Activar Ajuste"
+msgstr "Activar Sombras"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Color"
-msgstr "Seleccionar Color"
+msgstr "Color de Ambiente"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Energy"
-msgstr "Colores de Emisión"
+msgstr "Energía Ambiental"
#: scene/3d/reflection_probe.cpp
-#, fuzzy
msgid "Ambient Contrib"
-msgstr "Indentar a la Derecha"
+msgstr "Contribución Ambiental"
#: scene/3d/remote_transform.cpp
msgid ""
@@ -23523,9 +22847,8 @@ msgid "Bound"
msgstr ""
#: scene/3d/room_group.cpp
-#, fuzzy
msgid "Roomgroup Priority"
-msgstr "Prioridad"
+msgstr "Prioridad del Roomgroup"
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
@@ -23559,66 +22882,57 @@ 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 "Acción"
+msgstr "Activo"
#: 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 desplazamiento lateral"
+msgstr "Modo PVS"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "PVS Filename"
-msgstr "Archivo ZIP"
+msgstr "Nombre del Archivo PVS"
#: scene/3d/room_manager.cpp servers/visual_server.cpp
msgid "Gameplay"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Gameplay Monitor"
-msgstr "Monitor"
+msgstr "Monitor de Juego"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Use Secondary PVS"
-msgstr "Usar Ajuste de Escalado"
+msgstr "Usar PVS Secundario"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Merge Meshes"
-msgstr "Malla"
+msgstr "Fusionar Mallas"
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Show Margins"
-msgstr "Mostrar Origen"
+msgstr "Mostrar Márgenes"
#: scene/3d/room_manager.cpp
#, fuzzy
msgid "Debug Sprawl"
-msgstr "Depurar"
+msgstr "Depurar Desorden"
#: scene/3d/room_manager.cpp
msgid "Overlap Warning Threshold"
msgstr ""
#: scene/3d/room_manager.cpp
-#, fuzzy
msgid "Preview Camera"
-msgstr "Vista Previa"
+msgstr "Vista previa de la Cámara"
#: scene/3d/room_manager.cpp
msgid "Portal Depth Limit"
@@ -23774,18 +23088,16 @@ msgstr ""
"En su lugar, cambia el tamaño en las formas de colisión de los hijos."
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "Mantener transformación global"
+msgstr "Transformación Global"
#: scene/3d/spatial.cpp
msgid "Matrix"
-msgstr ""
+msgstr "Matriz"
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Gizmo"
-msgstr "Gizmos"
+msgstr "Gizmo"
#: scene/3d/spatial_velocity_tracker.cpp
#, fuzzy
@@ -23794,7 +23106,7 @@ msgstr "Fotogramas de Física %"
#: scene/3d/spring_arm.cpp
msgid "Spring Length"
-msgstr ""
+msgstr "Cantidad de Amortiguación"
#: scene/3d/sprite_3d.cpp scene/gui/graph_edit.cpp
msgid "Opacity"
@@ -24999,19 +24311,16 @@ msgid "Fold Gutter"
msgstr "Plegar Gutter"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Drag And Drop Selection Enabled"
-msgstr "Sólo selección"
+msgstr "Selección de Arrastrar y Soltar Activada"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Hiding Enabled"
-msgstr "Activar"
+msgstr "Ocultación Activada"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Wrap Enabled"
-msgstr "Activar"
+msgstr "Ajuste Activado"
#: scene/gui/text_edit.cpp
msgid "Scroll Vertical"
@@ -25420,60 +24729,60 @@ msgid ""
"Effects.\n"
"HDR will be disabled for this Viewport."
msgstr ""
+"Este Viewport tiene HDR habilitado, pero su uso está establecido en 2D o 2D "
+"sin muestreo.\n"
+"El HDR solo está soportado en los Viewports que tienen su uso establecido en "
+"3D o 3D Sin Efectos.\n"
+"El HDR estará desactivado para esta ventana."
#: scene/main/viewport.cpp
msgid "ARVR"
-msgstr ""
+msgstr "ARVR"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Size Override Stretch"
-msgstr "Elemento de Anulación"
+msgstr "Anulación del Tamaño de Estiramiento"
#: scene/main/viewport.cpp
msgid "Own World"
-msgstr ""
+msgstr "Mundo Propio"
#: 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 "Transponer"
+msgstr "Fondo Transparente"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Handle Input Locally"
-msgstr "Cambiar Valor de Entrada"
+msgstr "Manejar Entradas Localmente"
#: scene/main/viewport.cpp
msgid "FXAA"
-msgstr ""
+msgstr "FXAA"
#: scene/main/viewport.cpp
#, fuzzy
msgid "Debanding"
-msgstr "Vinculación"
+msgstr "Debanding"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Disable 3D"
-msgstr "Desactivar Elemento"
+msgstr "Desactivar 3D"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Keep 3D Linear"
-msgstr "Izquierda Lineal"
+msgstr "Mantener 3D Lineal"
#: scene/main/viewport.cpp
msgid "Render Direct To Screen"
-msgstr ""
+msgstr "Renderización Directa en Pantalla"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25880,9 +25189,8 @@ msgid "Decrement Pressed"
msgstr ""
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Slider"
-msgstr "Modo de Colisión"
+msgstr "Deslizador"
#: scene/resources/default_theme/default_theme.cpp
msgid "Grabber Area"
@@ -26321,13 +25629,12 @@ msgid "Mono Font"
msgstr "Fuente Principal"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Table H Separation"
-msgstr "Separación de Tabla H"
+msgstr "Separación H de Tabla"
#: scene/resources/default_theme/default_theme.cpp
msgid "Table V Separation"
-msgstr "Separación de Tabla V"
+msgstr "Separación V de Tabla"
#: scene/resources/default_theme/default_theme.cpp
msgid "Margin Left"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index de1187f08f..b37d9dcfd8 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -20,13 +20,14 @@
# M3CG <cgmario1999@gmail.com>, 2021, 2022.
# Manuel González <mgoopazo@gmail.com>, 2021.
# emnrx <emanuelermancia@gmail.com>, 2022.
+# Mau_Restor <restor@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-21 15:56+0000\n"
-"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: Mau_Restor <restor@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -34,7 +35,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.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -268,9 +269,8 @@ msgid "Network Peer"
msgstr "Profiler de Red"
#: core/io/multiplayer_api.cpp scene/animation/animation_player.cpp
-#, fuzzy
msgid "Root Node"
-msgstr "Nombre del nodo raíz"
+msgstr "Nodo raíz"
#: core/io/networked_multiplayer_peer.cpp
msgid "Refuse New Connections"
@@ -302,7 +302,7 @@ msgstr ""
#: core/io/stream_peer.cpp
msgid "Data Array"
-msgstr ""
+msgstr "Array de datos"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
@@ -331,9 +331,8 @@ msgstr ""
"No hay suficientes bytes para decodificar bytes, o el formato es inválido."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
-msgstr "Entrada inválida %i (no se transmitió) en la expresión"
+msgstr "Entrada inválida %d (no se transmitió) en la expresión"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -362,7 +361,7 @@ msgstr "En la llamada a '%s':"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr ""
+msgstr "Semilla"
#: core/math/random_number_generator.cpp
#, fuzzy
@@ -371,16 +370,15 @@ msgstr "Estado"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr ""
+msgstr "Cola de mesajes"
#: core/message_queue.cpp
msgid "Max Size (KB)"
-msgstr ""
+msgstr "Tamaño máximo (KB)"
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "Modo Mover"
+msgstr "Modo Mouse"
#: core/os/input.cpp
#, fuzzy
@@ -409,9 +407,8 @@ msgid "Meta"
msgstr "Meta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Command"
-msgstr "Comunidad"
+msgstr "Comando"
#: core/os/input_event.cpp
#, fuzzy
@@ -440,7 +437,7 @@ msgstr "Unicode"
#: core/os/input_event.cpp
msgid "Echo"
-msgstr ""
+msgstr "Echo"
#: core/os/input_event.cpp scene/gui/base_button.cpp
msgid "Button Mask"
@@ -464,7 +461,7 @@ msgstr "Dobleclick"
#: core/os/input_event.cpp
msgid "Tilt"
-msgstr ""
+msgstr "Inclinación"
#: core/os/input_event.cpp
#, fuzzy
@@ -477,9 +474,8 @@ msgid "Pen Inverted"
msgstr "Invertir"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Relative"
-msgstr "Ajuste Relativo"
+msgstr "Relativo"
#: 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
@@ -537,7 +533,7 @@ msgstr "Velocidad"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "Instrumento"
#: core/os/input_event.cpp
msgid "Controller Number"
@@ -545,7 +541,7 @@ msgstr "Número de Controlador"
#: core/os/input_event.cpp
msgid "Controller Value"
-msgstr ""
+msgstr "Valor del controlador"
#: core/project_settings.cpp editor/editor_node.cpp main/main.cpp
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
@@ -617,9 +613,8 @@ msgstr "Nombre de Directorio de Usuario Personalizado"
#: 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 "Mostrar Todo"
+msgstr "Mostrar"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/opensimplex/noise_texture.cpp scene/2d/line_2d.cpp
@@ -638,17 +633,15 @@ msgstr "Altura"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Siempre encima"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Width"
-msgstr "Izquierda Ancha"
+msgstr "probar ancho"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Prueba"
+msgstr "probar altura"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -686,14 +679,12 @@ msgid "Script Templates Search Path"
msgstr "Ruta de Búsqueda de Plantillas de Scripts"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Sistema de Control de Versiones"
+msgstr "Al iniciar el Sistema de Control de Versiones"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Control de Versiones"
+msgstr "Nombre del sistema de control de versiones"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -702,17 +693,15 @@ msgstr "Entrada"
#: core/project_settings.cpp
msgid "UI Accept"
-msgstr ""
+msgstr "Aceptar Interfaz del usuario"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "Seleccionar"
+msgstr "Seleccionar Interfaz de Usuario"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Cancel"
-msgstr "Cancelar"
+msgstr "Cancelar la interfaz de usuario"
#: core/project_settings.cpp
#, fuzzy
@@ -754,12 +743,11 @@ msgstr ""
#: core/project_settings.cpp
msgid "UI Home"
-msgstr ""
+msgstr "Inicio de la interfaz de usuario"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI End"
-msgstr "Al Final"
+msgstr "Al Final de la interfaz de usuario"
#: core/project_settings.cpp main/main.cpp modules/bullet/register_types.cpp
#: modules/bullet/space_bullet.cpp scene/2d/physics_body_2d.cpp
@@ -817,7 +805,7 @@ msgstr "Filtros"
#: core/project_settings.cpp scene/main/viewport.cpp
msgid "Sharpen Intensity"
-msgstr ""
+msgstr "Intensidad de la nitidez"
#: core/project_settings.cpp editor/editor_export.cpp editor/editor_node.cpp
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
@@ -867,7 +855,7 @@ msgstr "Nivel de Compresión"
#: core/project_settings.cpp
msgid "Window Log Size"
-msgstr ""
+msgstr "medida del registro de la ventana"
#: core/project_settings.cpp
msgid "Zlib"
@@ -890,9 +878,8 @@ msgid "TCP"
msgstr "TCP"
#: core/register_core_types.cpp
-#, fuzzy
msgid "Connect Timeout Seconds"
-msgstr "Conexiones al método:"
+msgstr "Tiempo de espera en segundos de la conexion"
#: core/register_core_types.cpp
msgid "Packet Peer Stream"
@@ -917,9 +904,8 @@ msgid "Resource"
msgstr "Recursos"
#: core/resource.cpp
-#, fuzzy
msgid "Local To Scene"
-msgstr "Cerrar Escena"
+msgstr "Local a la escena"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -1200,9 +1186,8 @@ msgid "Type"
msgstr "Tipo"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
-msgstr "Setear Handle"
+msgstr "En manejo"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1353,9 +1338,8 @@ msgid "Time (s):"
msgstr "Tiempo (s): "
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Position:"
-msgstr "Posición del Panel"
+msgstr "Posición:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -2168,14 +2152,15 @@ msgstr "Favoritos:"
msgid "Recent:"
msgstr "Recientes:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Buscar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Coincidencias:"
@@ -2235,8 +2220,8 @@ msgstr "Buscar Reemplazo de Recurso:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5645,6 +5630,10 @@ msgid "Drag And Drop Selection"
msgstr "Selección de GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11932,6 +11921,11 @@ msgid "New Animation"
msgstr "Nueva Animación"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrar métodos"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocidad:"
diff --git a/editor/translations/et.po b/editor/translations/et.po
index b355c9c343..1f3fe075df 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -2154,14 +2154,15 @@ msgstr "Lemmikud:"
msgid "Recent:"
msgstr "Hiljutised:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Otsi:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Vasted:"
@@ -2217,8 +2218,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5487,6 +5488,10 @@ msgid "Drag And Drop Selection"
msgstr "Kopeeri valik"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11589,6 +11594,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Kustuta animatsioon?"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index fc753e6cb9..2555dfa8d3 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -2116,14 +2116,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2179,8 +2180,8 @@ msgstr "Bilatu ordezko baliabidea:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5393,6 +5394,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11467,6 +11472,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Ezabatu animazioa?"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index f43848b065..a0202d3254 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -2198,14 +2198,15 @@ msgstr "برگزیده‌ها:"
msgid "Recent:"
msgstr "اخیر:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "جستجو:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "تطبیق‌ها:"
@@ -2265,8 +2266,8 @@ msgstr "منبع جایگزینی را جستجو کن:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5549,6 +5550,10 @@ msgid "Drag And Drop Selection"
msgstr "انتخاب شده را حذ٠کن"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11962,6 +11967,11 @@ msgid "New Animation"
msgstr "تغییر نام انیمیشن"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "حالت صاÙÛŒ:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index b83c7d11fa..28b4581d60 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -2216,14 +2216,15 @@ msgstr "Suosikit:"
msgid "Recent:"
msgstr "Viimeaikaiset:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Hae:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Osumat:"
@@ -2283,8 +2284,8 @@ msgstr "Etsi korvaava resurssi:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5676,6 +5677,10 @@ msgid "Drag And Drop Selection"
msgstr "Ruudukon valinta"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11950,6 +11955,11 @@ msgid "New Animation"
msgstr "Uusi animaatio"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Suodata metodeja"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Nopeus:"
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index c4e02900d7..4671a2aeaf 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -2088,14 +2088,15 @@ msgstr "Mga Paborito:"
msgid "Recent:"
msgstr "Kamakailan:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Paghahanap:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2151,8 +2152,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5310,6 +5311,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11321,6 +11326,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Pagulit ng Animation"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index e4f5a2feff..85a3e54c1d 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -2218,14 +2218,15 @@ msgstr "Favoris :"
msgid "Recent:"
msgstr "Récents :"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Rechercher :"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Correspondances :"
@@ -2285,8 +2286,8 @@ msgstr "Recherche ressource de remplacement :"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5675,6 +5676,10 @@ msgid "Drag And Drop Selection"
msgstr "Sélection de la GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Apparence"
@@ -11916,6 +11921,11 @@ msgid "New Animation"
msgstr "Nouvelle animation"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrer les méthodes"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Vitesse :"
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index db42dda6ed..17fc0b03fa 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -2095,14 +2095,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cuardach:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2158,8 +2159,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5304,6 +5305,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11293,6 +11298,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "CrannBeochan"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/gl.po b/editor/translations/gl.po
index b42b50e5a7..191093a45d 100644
--- a/editor/translations/gl.po
+++ b/editor/translations/gl.po
@@ -2196,14 +2196,15 @@ msgstr "Favoritos:"
msgid "Recent:"
msgstr "Recente:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Buscar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Coincidencias:"
@@ -2263,8 +2264,8 @@ msgstr "Buscar Recurso de Substitución:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5656,6 +5657,10 @@ msgid "Drag And Drop Selection"
msgstr "Encadrar Selección"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11904,6 +11909,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrar métodos"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocidade:"
diff --git a/editor/translations/he.po b/editor/translations/he.po
index a89d117ead..2003351f93 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -2167,14 +2167,15 @@ msgstr "מועדפי×:"
msgid "Recent:"
msgstr "×חרוני×:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "חיפוש:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "הת×מות:"
@@ -2234,8 +2235,8 @@ msgstr "חיפוש מש×ב חלופי:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5571,6 +5572,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap מילוי הבחירה"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11959,6 +11964,11 @@ msgstr "×©× ×”× ×¤×©×” חדשה:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
+msgid "Filter animations"
+msgstr "מ×פייני פריט."
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Speed:"
msgstr "מהירות (FPS):"
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index a598e43071..7faa61ab12 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -2155,14 +2155,15 @@ msgstr "पसंदीदा:"
msgid "Recent:"
msgstr "हाल ही में किया:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "खोज:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "à¤à¤• जैसा:"
@@ -2222,8 +2223,8 @@ msgstr "खोज रिपà¥à¤²à¥‡à¤¸à¤®à¥‡à¤‚ट संसाधन:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5576,6 +5577,10 @@ msgid "Drag And Drop Selection"
msgstr "सभी खंड"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11760,6 +11765,11 @@ msgid "New Animation"
msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨ लूप"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "à¤à¤¨à¤¿à¤®à¥‡à¤¶à¤¨"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 61aeaeeb10..6d2b3b07da 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -6,12 +6,13 @@
# Patik <patrikfs5@gmail.com>, 2019.
# Nikola Bunjevac <nikola.bunjevac@gmail.com>, 2019, 2020.
# LeoClose <leoclose575@gmail.com>, 2020, 2021.
+# Filip <fhomolka@protonmail.com>, 2022.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
-"PO-Revision-Date: 2021-08-13 19:05+0000\n"
-"Last-Translator: LeoClose <leoclose575@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: Filip <fhomolka@protonmail.com>\n"
"Language-Team: Croatian <https://hosted.weblate.org/projects/godot-engine/"
"godot/hr/>\n"
"Language: hr\n"
@@ -19,11 +20,11 @@ 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.8-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
-msgstr ""
+msgstr "UpravljaÄki program za Tablet"
#: core/bind/core_bind.cpp
msgid "Clipboard"
@@ -39,73 +40,77 @@ msgid "Exit Code"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "Omogući"
+msgstr "V-Sync Omogućen"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
-msgstr ""
+msgstr "V-Sync preko Kompozitora"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Delta Smoothing"
-msgstr ""
+msgstr "Delta Ublažavanje"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode"
-msgstr ""
+msgstr "NaÄin niske upotrebe procesora"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
-msgstr ""
+msgstr "Stanje mirovanja u naÄinu koriÅ¡tenja niskog procesora (μsec)"
#: core/bind/core_bind.cpp main/main.cpp platform/uwp/os_uwp.cpp
msgid "Keep Screen On"
-msgstr ""
+msgstr "Zadrži zaslon ukljuÄenim"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Min Window Size"
-msgstr "Glavna skripta:"
+msgstr "Min. veliÄina prozora"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Max Window Size"
-msgstr "Glavna skripta:"
+msgstr "Maks. veliÄina prozora"
#: core/bind/core_bind.cpp
msgid "Screen Orientation"
-msgstr ""
+msgstr "Orijentacija zaslona"
#: core/bind/core_bind.cpp core/project_settings.cpp main/main.cpp
#: platform/uwp/os_uwp.cpp
+#, fuzzy
msgid "Window"
-msgstr ""
+msgstr "Prozor"
#: core/bind/core_bind.cpp core/project_settings.cpp
+#, fuzzy
msgid "Borderless"
-msgstr ""
+msgstr "Bez obruba"
#: core/bind/core_bind.cpp
+#, fuzzy
msgid "Per Pixel Transparency Enabled"
-msgstr ""
+msgstr "Omogućena prozirnost po pikselu"
#: core/bind/core_bind.cpp core/project_settings.cpp
+#, fuzzy
msgid "Fullscreen"
-msgstr ""
+msgstr "Cijeli zaslon"
#: core/bind/core_bind.cpp
+#, fuzzy
msgid "Maximized"
-msgstr ""
+msgstr "Maksimiziran"
#: core/bind/core_bind.cpp
+#, fuzzy
msgid "Minimized"
-msgstr ""
+msgstr "Minimiziran"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
+#, fuzzy
msgid "Resizable"
-msgstr ""
+msgstr "Mogućnost promjene veliÄine"
#: 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
@@ -114,7 +119,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Position"
-msgstr "Stvori"
+msgstr "Pozicija"
#: core/bind/core_bind.cpp core/project_settings.cpp editor/editor_settings.cpp
#: main/main.cpp modules/gridmap/grid_map.cpp
@@ -125,8 +130,9 @@ msgstr "Stvori"
#: 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 "VeliÄina"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
@@ -135,25 +141,27 @@ msgstr ""
#: core/bind/core_bind.cpp
#, fuzzy
msgid "Editor Hint"
-msgstr "(Editor Onemogućen)"
+msgstr "Savjet Urednika"
#: core/bind/core_bind.cpp
+#, fuzzy
msgid "Print Error Messages"
-msgstr ""
+msgstr "Ispis poruka o pogreškama"
#: core/bind/core_bind.cpp
#, fuzzy
msgid "Iterations Per Second"
-msgstr "NaÄin Interpolacije"
+msgstr "Iteracije u sekundi"
#: core/bind/core_bind.cpp
+#, fuzzy
msgid "Target FPS"
-msgstr ""
+msgstr "Ciljani FPS"
#: core/bind/core_bind.cpp
#, fuzzy
msgid "Time Scale"
-msgstr "Dubina"
+msgstr "Vremenska skala"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Physics Jitter Fix"
@@ -2125,14 +2133,15 @@ msgstr "Favoriti:"
msgid "Recent:"
msgstr "Nedavno:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Pretraga:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Podudaranja:"
@@ -2192,8 +2201,8 @@ msgstr "Traži zamjenu resursa:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5395,6 +5404,10 @@ msgid "Drag And Drop Selection"
msgstr "Izbriši Odabir"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11479,6 +11492,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Obrisati Animaciju?"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 9f0d894b2a..cc7024a260 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -2226,14 +2226,15 @@ msgstr "Kedvencek:"
msgid "Recent:"
msgstr "Legutóbbi:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Keresés:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Egyezések:"
@@ -2293,8 +2294,8 @@ msgstr "Csere Forrás Keresése:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5684,6 +5685,10 @@ msgid "Drag And Drop Selection"
msgstr "Kijelölés Keretezése"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11933,6 +11938,11 @@ msgid "New Animation"
msgstr "Új animáció"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Metódusok szűrése"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 24547a7464..8c447326e3 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -39,13 +39,14 @@
# ProgrammerIndonesia 44 <elo.jhy@gmail.com>, 2022.
# Rizky Ramadhan <rizkyterm@gmail.com>, 2022.
# Primananda Kurnia <primakurnia71@gmail.com>, 2022.
+# FellowMustard <rachmawanng33@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-07-09 21:12+0000\n"
-"Last-Translator: yusuf afandi <afandi.yusuf.04@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: FellowMustard <rachmawanng33@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -53,7 +54,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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1206,7 +1207,7 @@ msgstr "Atur Pegangan"
#: 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 "Arus"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -2158,14 +2159,15 @@ msgstr "Favorit:"
msgid "Recent:"
msgstr "Saat ini:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cari:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Kecocokan:"
@@ -2225,8 +2227,8 @@ msgstr "Cari Resource Pengganti:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5616,6 +5618,10 @@ msgid "Drag And Drop Selection"
msgstr "Isi Seleksi GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Penampilan"
@@ -11849,6 +11855,11 @@ msgid "New Animation"
msgstr "Animasi Baru"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filter method"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Kecepatan:"
diff --git a/editor/translations/is.po b/editor/translations/is.po
index b7eb0e4b88..7a990ebd6b 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -2140,14 +2140,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2203,8 +2204,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5381,6 +5382,10 @@ msgid "Drag And Drop Selection"
msgstr "Allt úrvalið"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11444,6 +11449,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Stillið breyting á:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 36757b891d..1d89d28a99 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -69,13 +69,15 @@
# Federico Caprini <caprinifede@gmail.com>, 2022.
# Alessandro Casalino <alessandro.casalino93@gmail.com>, 2022.
# conecat <ilgrandemax190@gmail.com>, 2022.
+# Gico2006 <gradaellig@protonmail.com>, 2022.
+# ale piccia <picciatialessio2@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-07-04 05:16+0000\n"
-"Last-Translator: conecat <ilgrandemax190@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: ale piccia <picciatialessio2@gmail.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -83,7 +85,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.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -374,7 +376,6 @@ msgid "Not enough bytes for decoding bytes, or invalid format."
msgstr "Byte insufficienti per decodificarli o formato non valido."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
msgstr "Input %d non valido (assente) nell'espressione"
@@ -425,7 +426,7 @@ msgstr "Modalità Mouse"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr "Usa Input Accumulato"
+msgstr "Usa Input Accumulati"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -671,14 +672,12 @@ msgid "Always On Top"
msgstr "Sempre In Primo Piano"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Width"
-msgstr "Larghezza Test"
+msgstr "Test Larghezza"
#: core/project_settings.cpp
-#, fuzzy
msgid "Test Height"
-msgstr "Altezza Test"
+msgstr "Test Altezza"
#: core/project_settings.cpp editor/animation_track_editor.cpp
#: editor/editor_audio_buses.cpp main/main.cpp servers/audio_server.cpp
@@ -713,14 +712,12 @@ msgid "Script Templates Search Path"
msgstr "Percorso di Ricerca dei Template di Script"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Autocaricamento all'Avvio"
+msgstr "Caricamento automatico del controllo di versione all'avvio"
#: core/project_settings.cpp
-#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Controllo della versione"
+msgstr "Nome del plugin di controllo della versione"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -1210,14 +1207,12 @@ msgid "Type"
msgstr "Tipo"
#: 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 "Non gestire"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1406,19 +1401,16 @@ msgid "Stream:"
msgstr "Stream"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Start (s):"
-msgstr "Riavvia (s):"
+msgstr "inizia:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "End (s):"
-msgstr "Fade In (s):"
+msgstr "finisci:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation Clip:"
-msgstr "Animazioni:"
+msgstr "clip delle animazioni:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -2173,14 +2165,15 @@ msgstr "Preferiti:"
msgid "Recent:"
msgstr "Recenti:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cerca:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Corrispondenze:"
@@ -2240,8 +2233,8 @@ msgstr "Cerca risorsa di rimpiazzo:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2250,7 +2243,7 @@ msgstr "Apri"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "proprietario di: %s (Totale: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2607,9 +2600,8 @@ msgid "There is no '%s' file."
msgstr "File \"%s\" assente."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Layout:"
-msgstr "Disposizione"
+msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2850,9 +2842,8 @@ msgid "Save PCK"
msgstr "Salva PCK"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Cannot create file \"%s\"."
-msgstr "Impossibile creare la cartella."
+msgstr "impossibile creare il file \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -2860,9 +2851,8 @@ msgid "Failed to export project files."
msgstr "Impossibile esportare i file del progetto"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Impossibile aprire il file in scrittura:"
+msgstr "impossibile aprire file da leggere dalla path \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
@@ -5582,6 +5572,10 @@ msgid "Drag And Drop Selection"
msgstr "Selezione GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Aspetto"
@@ -11739,6 +11733,11 @@ msgid "New Animation"
msgstr "Nuova Animazione"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Modalità di filtraggio"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocità:"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 5c6358a4c4..a40939f777 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -2180,14 +2180,15 @@ msgstr "ãŠæ°—ã«å…¥ã‚Š:"
msgid "Recent:"
msgstr "最近:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "検索:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "一致:"
@@ -2247,8 +2248,8 @@ msgstr "ç½®æ›ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’検索:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5582,6 +5583,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap ã®é¸æŠž"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "外観"
@@ -11777,6 +11782,11 @@ msgid "New Animation"
msgstr "æ–°è¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "メソッドを絞り込む"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "速度:"
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index f67e7c0bdd..ae98d76c31 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -2195,14 +2195,15 @@ msgstr "სáƒáƒ§áƒ•áƒáƒ áƒšáƒ”ბი:"
msgid "Recent:"
msgstr "ბáƒáƒšáƒ:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "ძებნáƒ:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "დáƒáƒ›áƒ—ხვევები:"
@@ -2264,8 +2265,8 @@ msgstr "ჩáƒáƒ›áƒœáƒáƒªáƒ•ლებელი რესურსის ძიá
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5510,6 +5511,10 @@ msgid "Drag And Drop Selection"
msgstr "ყველრმáƒáƒœáƒ˜áƒ¨áƒœáƒ•áƒ"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11727,6 +11732,11 @@ msgid "New Animation"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ áƒáƒžáƒ¢áƒ˜áƒ›áƒ˜áƒ–áƒáƒªáƒ˜áƒ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ფუნქციები:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/km.po b/editor/translations/km.po
index 2da1ccac99..4141c021e2 100644
--- a/editor/translations/km.po
+++ b/editor/translations/km.po
@@ -2071,14 +2071,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2134,8 +2135,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5269,6 +5270,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11240,6 +11245,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Key(s) ដែលបានជ្រើសស្ទួន"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index ff2f4ecb80..af0b7e99a5 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -2123,14 +2123,15 @@ msgstr "ì¦ê²¨ì°¾ê¸°:"
msgid "Recent:"
msgstr "최근 기ë¡:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "검색:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "ì¼ì¹˜í•¨:"
@@ -2190,8 +2191,8 @@ msgstr "대체 리소스 검색:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5482,6 +5483,10 @@ msgid "Drag And Drop Selection"
msgstr "그리드맵 ì„ íƒ"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "모습"
@@ -11681,6 +11686,11 @@ msgid "New Animation"
msgstr "새 애니메ì´ì…˜"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "메서드 필터"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "ì†ë„:"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index 8daa544db9..3b1140192a 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -2178,14 +2178,15 @@ msgstr "MÄ—gstamiausi:"
msgid "Recent:"
msgstr "Naujausi:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Ieškoti:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2241,8 +2242,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5487,6 +5488,10 @@ msgid "Drag And Drop Selection"
msgstr "Visas Pasirinkimas"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11716,6 +11721,11 @@ msgid "New Animation"
msgstr "Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrai..."
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 2dabcb40bf..f134fd5b48 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -2173,14 +2173,15 @@ msgstr "Favorīti:"
msgid "Recent:"
msgstr "Nesenie:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Meklēt:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Sakritības:"
@@ -2240,8 +2241,8 @@ msgstr "MeklÄ“t aizstÄjÄ“ja resursu:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5558,6 +5559,10 @@ msgid "Drag And Drop Selection"
msgstr "Režģkartes izvēle"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11644,6 +11649,11 @@ msgid "New Animation"
msgstr "Jauna animÄcija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "animÄcija"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/mk.po b/editor/translations/mk.po
index ef9a504af6..a3390bd895 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-06-29 10:04+0000\n"
+"PO-Revision-Date: 2022-07-23 03:57+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,7 +17,7 @@ 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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -1255,7 +1255,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
-msgstr ""
+msgstr "Фукнции:"
#: editor/animation_track_editor.cpp
msgid "Audio Clips:"
@@ -1358,33 +1358,33 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Continuous"
-msgstr ""
+msgstr "Континуирана"
#: editor/animation_track_editor.cpp
msgid "Discrete"
-msgstr ""
+msgstr "ДиÑкретна"
#: editor/animation_track_editor.cpp
msgid "Trigger"
-msgstr ""
+msgstr "Чкрапало"
#: editor/animation_track_editor.cpp scene/3d/baked_lightmap.cpp
msgid "Capture"
-msgstr ""
+msgstr "Снимање"
#: editor/animation_track_editor.cpp
msgid "Nearest"
-msgstr ""
+msgstr "ÐајблиÑку"
#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp scene/2d/physics_body_2d.cpp
#: scene/3d/physics_body.cpp
msgid "Linear"
-msgstr ""
+msgstr "Линеарна"
#: editor/animation_track_editor.cpp
msgid "Cubic"
-msgstr ""
+msgstr "Кубни"
#: editor/animation_track_editor.cpp
msgid "Clamp Loop Interp"
@@ -1462,7 +1462,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Create"
-msgstr ""
+msgstr "Создади"
#: editor/animation_track_editor.cpp
msgid "Anim Insert"
@@ -1763,7 +1763,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
-msgstr ""
+msgstr "ОчиÑти"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
@@ -1840,7 +1840,7 @@ msgstr ""
#: editor/code_editor.cpp
msgid "Replace"
-msgstr ""
+msgstr "Замени"
#: editor/code_editor.cpp
msgid "Replace All"
@@ -1853,7 +1853,7 @@ msgstr ""
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
msgid "Standard"
-msgstr ""
+msgstr "Стандардно"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
msgid "Toggle Scripts Panel"
@@ -1879,7 +1879,7 @@ msgstr ""
#: editor/code_editor.cpp modules/gdscript/gdscript.cpp
msgid "Warnings"
-msgstr ""
+msgstr "Предупредувања"
#: editor/code_editor.cpp
msgid "Line and column numbers."
@@ -1921,7 +1921,7 @@ msgstr ""
#: editor/plugins/item_list_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
-msgstr ""
+msgstr "Додади"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/groups_editor.cpp editor/plugins/animation_player_editor_plugin.cpp
@@ -1931,7 +1931,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
#: editor/project_settings_editor.cpp
msgid "Remove"
-msgstr ""
+msgstr "Избриши"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
@@ -1948,11 +1948,11 @@ msgstr ""
#: editor/connections_dialog.cpp scene/3d/room_manager.cpp
#: servers/visual_server.cpp
msgid "Advanced"
-msgstr ""
+msgstr "Ðапредно"
#: editor/connections_dialog.cpp
msgid "Deferred"
-msgstr ""
+msgstr "Одложено"
#: editor/connections_dialog.cpp
msgid ""
@@ -2080,14 +2080,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2143,8 +2144,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5286,6 +5287,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11268,6 +11273,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "СвојÑтва на анимацијата."
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index 1b5bc9e68f..4cb867c040 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -2090,14 +2090,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2153,8 +2154,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5302,6 +5303,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11290,6 +11295,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ചലനം à´šàµà´±àµà´±àµ½"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 8dffed5d4e..47b8bd3f86 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -2091,14 +2091,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2154,8 +2155,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5292,6 +5293,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11278,6 +11283,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "अâ€à¥…निमेशन टà¥à¤°à¥€"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index caef354c6c..055e18e0bc 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -2101,14 +2101,15 @@ msgstr "Kegemaran:"
msgid "Recent:"
msgstr "Terkini:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cari:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Padanan:"
@@ -2168,8 +2169,8 @@ msgstr "Cari Penggantian Sumber:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5551,6 +5552,10 @@ msgid "Drag And Drop Selection"
msgstr "Semua Pilihan"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11733,6 +11738,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Padam Animasi?"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 68de0259c2..dac373fdc7 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -2205,14 +2205,15 @@ msgstr "Favoritter:"
msgid "Recent:"
msgstr "Nylige:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Søk:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Treff:"
@@ -2274,8 +2275,8 @@ msgstr "Søk Erstatningsressurs:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5735,6 +5736,10 @@ msgid "Drag And Drop Selection"
msgstr "Slett Valgte"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12215,6 +12220,11 @@ msgstr "Animasjon"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
+msgid "Filter animations"
+msgstr "Lim inn Noder"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Speed:"
msgstr "Hastighet (FPS):"
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 756bf78add..40e0ddfb78 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -2270,14 +2270,15 @@ msgstr "Favorieten:"
msgid "Recent:"
msgstr "Onlangs:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Zoeken:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Overeenkomsten:"
@@ -2337,8 +2338,8 @@ msgstr "Bronvervanging zoeken:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5728,6 +5729,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap-selectie vullen"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12068,6 +12073,11 @@ msgid "New Animation"
msgstr "Nieuwe animatie"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filter methoden"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Snelheid:"
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 264d623676..180abba988 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -2176,14 +2176,15 @@ msgstr "Ulubione:"
msgid "Recent:"
msgstr "Ostatnie:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Szukaj:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "PasujÄ…ce:"
@@ -2243,8 +2244,8 @@ msgstr "Szukaj zastępczego zasobu:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5629,6 +5630,10 @@ msgid "Drag And Drop Selection"
msgstr "Wybór GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "WyglÄ…d"
@@ -11902,6 +11907,11 @@ msgid "New Animation"
msgstr "Nowa animacja"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtruj metody"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Szybkość:"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 5c33524652..337e5af5c0 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -2165,14 +2165,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2228,8 +2229,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5474,6 +5475,10 @@ msgid "Drag And Drop Selection"
msgstr "Yar, Blow th' Selected Down!"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11705,6 +11710,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Paste yer Node"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/pt.po b/editor/translations/pt.po
index 0b2fa35ae5..db7171b3c6 100644
--- a/editor/translations/pt.po
+++ b/editor/translations/pt.po
@@ -25,13 +25,14 @@
# El_ExpertPlayer <xpertnathan37@gmail.com>, 2022.
# Esdras Caleb Oliveira Silva <acheicaleb@gmail.com>, 2022.
# Ednaldo Pereira Confia <filat51823@storypo.com>, 2022.
+# Zé Beato Página Oficial <zebeato@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-07-11 21:32+0000\n"
-"Last-Translator: Ednaldo Pereira Confia <filat51823@storypo.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: Zé Beato Página Oficial <zebeato@gmail.com>\n"
"Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/"
"godot/pt/>\n"
"Language: pt\n"
@@ -2109,14 +2110,15 @@ msgstr "Favoritos:"
msgid "Recent:"
msgstr "Recente:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Procurar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Correspondências:"
@@ -2176,8 +2178,8 @@ msgstr "Procurar Recurso de substituição:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2931,9 +2933,8 @@ msgid "The given export path doesn't exist."
msgstr "O caminho de exportação não existe:"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Ficheiro Modelo não encontrado:"
+msgstr "Ficheiro Modelo não encontrado"
#: editor/editor_export.cpp
#, fuzzy
@@ -5538,6 +5539,10 @@ msgid "Drag And Drop Selection"
msgstr "Seleção de GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Aparência"
@@ -11721,6 +11726,11 @@ msgid "New Animation"
msgstr "Nova Animação"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Métodos de filtro"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocidade:"
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index a812335e4b..5d2b642352 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -142,13 +142,15 @@
# lucas rossy brasil coelho <lucasrossy270@gmail.com>, 2022.
# Kaycke <kaycke@ymail.com>, 2022.
# Ednaldo Pereira Confia <filat51823@storypo.com>, 2022.
+# Mauricio <mauricio.fidalgo1@gmail.com>, 2022.
+# Felipe Kinoshita <kinofhek@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: 2016-05-30\n"
-"PO-Revision-Date: 2022-07-16 06:20+0000\n"
-"Last-Translator: Cearaj <pmoraisleal@gmail.com>\n"
+"PO-Revision-Date: 2022-07-27 13:26+0000\n"
+"Last-Translator: Felipe Kinoshita <kinofhek@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -361,7 +363,7 @@ msgstr "Página lida adiante"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr "Modo de bloqueio ativado"
+msgstr "Modo de Bloqueio Ativado"
#: core/io/http_client.cpp
msgid "Connection"
@@ -579,9 +581,8 @@ msgid "Pressure"
msgstr "Pressão"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pen Inverted"
-msgstr "Inverter"
+msgstr "Caneta Invertida (\"Borracha\")"
#: core/os/input_event.cpp
msgid "Relative"
@@ -1120,7 +1121,7 @@ msgstr "Máximo de luzes renderizáveis"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Reflections"
-msgstr "Reflexões máximas renderizáveis"
+msgstr "Máximo de Reflexões Renderizáveis"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
@@ -1278,14 +1279,12 @@ msgid "Type"
msgstr "Tipo"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "In Handle"
-msgstr "Definir Manipulador"
+msgstr "Manipulador de Entrada"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out Handle"
-msgstr "Definir Manipulador"
+msgstr "Manipulador de Saída"
#: editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1296,11 +1295,11 @@ msgstr "Fluxo"
#: editor/animation_track_editor.cpp
msgid "Start Offset"
-msgstr "Iniciar deslocamento"
+msgstr "Deslocamento Inicial"
#: editor/animation_track_editor.cpp
msgid "End Offset"
-msgstr "Terminar deslocamento"
+msgstr "Deslocamento Final"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/import/resource_importer_scene.cpp
@@ -1314,7 +1313,7 @@ msgstr "Animação"
#: editor/animation_track_editor.cpp
msgid "Easing"
-msgstr "Facilitar Entrada-Saída"
+msgstr "Suavização"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1453,18 +1452,16 @@ msgid "(Invalid, expected type: %s)"
msgstr "(Inválido, tipo esperado: %s)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Easing:"
-msgstr "Facilitar Entrada-Saída:"
+msgstr "Suavizar:"
#: editor/animation_track_editor.cpp
msgid "In-Handle:"
-msgstr "Definir Manipulador:"
+msgstr "Manipulador de Entrada:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Out-Handle:"
-msgstr "Definir Manipulador:"
+msgstr "Manipulador de Saída:"
#: editor/animation_track_editor.cpp
msgid "Stream:"
@@ -2110,7 +2107,7 @@ msgstr ""
#: editor/connections_dialog.cpp scene/resources/texture.cpp
msgid "Oneshot"
-msgstr "Oneshot"
+msgstr "Só Uma Vez"
#: editor/connections_dialog.cpp
msgid "Disconnects the signal after its first emission."
@@ -2229,14 +2226,15 @@ msgstr "Favoritos:"
msgid "Recent:"
msgstr "Recente:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Pesquisar:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Correspondências:"
@@ -2296,8 +2294,8 @@ msgstr "Buscar Recurso para Substituição:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2420,7 +2418,7 @@ msgstr "Desenvolvedor-chefe"
#: editor/editor_about.cpp
msgctxt "Job Title"
msgid "Project Manager"
-msgstr "Gerenciador de Projeto"
+msgstr "Gestor de Projeto"
#: editor/editor_about.cpp
msgid "Developers"
@@ -2993,7 +2991,7 @@ msgstr "64 Bits"
#: editor/editor_export.cpp
msgid "Embed PCK"
-msgstr "Incorporar PCK"
+msgstr "PCK Incorporado"
#: editor/editor_export.cpp platform/osx/export/export.cpp
msgid "Texture Format"
@@ -3016,9 +3014,8 @@ msgid "ETC2"
msgstr "ETC2"
#: editor/editor_export.cpp
-#, fuzzy
msgid "No BPTC Fallbacks"
-msgstr "Sem Fallbacks do BPTC"
+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
@@ -3673,9 +3670,8 @@ msgid "Property:"
msgstr "Propriedade:"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Label"
-msgstr "Etiqueta"
+msgstr "Rótulo"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
#: scene/resources/default_theme/default_theme.cpp
@@ -4391,11 +4387,11 @@ msgstr "Abas de Cena"
#: editor/editor_node.cpp
msgid "Always Show Close Button"
-msgstr "Sempre mostrar o botão de fechar."
+msgstr "Sempre Exibir o Botão de Fechar"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Resize If Many Tabs"
-msgstr "Redimensionar se houver muitas guias"
+msgstr "Redimensionar se Houver Muitas Guias"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
@@ -5102,7 +5098,7 @@ msgstr "Tempo Médio (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
-msgstr "Frame %"
+msgstr "Quadro %"
#: editor/editor_profiler.cpp
msgid "Physics Frame %"
@@ -5147,12 +5143,11 @@ msgstr "Depurador"
#: editor/editor_profiler.cpp
msgid "Profiler Frame History Size"
-msgstr ""
+msgstr "Tamanho de histórico disponível no \"Profiler\""
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Profiler Frame Max Functions"
-msgstr "Renomear Função"
+msgstr "Máximo de funções por quadro no \"Profiler\""
#: editor/editor_properties.cpp
msgid "Edit Text:"
@@ -5285,20 +5280,17 @@ msgstr "Novo %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 "Mudar Tipo Base"
+msgstr "Tipo Base"
#: editor/editor_resource_picker.cpp
-#, fuzzy
msgid "Edited Resource"
-msgstr "Adicionar Recurso"
+msgstr "Recurso Editado"
#: editor/editor_resource_picker.cpp scene/gui/line_edit.cpp
#: scene/gui/slider.cpp scene/gui/spin_box.cpp
-#, fuzzy
msgid "Editable"
-msgstr "Item Editável"
+msgstr "Editável"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New Script"
@@ -5324,9 +5316,8 @@ msgstr ""
"predefinição existente como executável."
#: editor/editor_run_native.cpp
-#, fuzzy
msgid "Project Run"
-msgstr "Projeto"
+msgstr "Executar Projeto"
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -5353,73 +5344,68 @@ msgid "Did you forget the '_run' method?"
msgstr "Você esqueceu o método '_run'?"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor Language"
-msgstr "Layout do Editor"
+msgstr "Linguagem do Editor"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Display Scale"
-msgstr "Exibir Tudo"
+msgstr "Escala de Exibição"
#: editor/editor_settings.cpp
msgid "Custom Display Scale"
-msgstr ""
+msgstr "Escala de Exibição Customizada"
#: editor/editor_settings.cpp
msgid "Main Font Size"
-msgstr ""
+msgstr "Tamanho de Fonte Principal"
#: editor/editor_settings.cpp
msgid "Code Font Size"
-msgstr ""
+msgstr "Tamanho de Fonte (Tipo) no Código"
#: editor/editor_settings.cpp
msgid "Font Antialiased"
-msgstr ""
+msgstr "Fonte Com Serrilhado Suavizado"
#: editor/editor_settings.cpp
msgid "Font Hinting"
-msgstr ""
+msgstr "Suavização de Fonte"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Main Font"
-msgstr "Cena Principal"
+msgstr "Fonte Principal"
#: editor/editor_settings.cpp
msgid "Main Font Bold"
-msgstr ""
+msgstr "Fonte Principal (Negrito)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Code Font"
-msgstr "Adicionar Ponto de Nó"
+msgstr "Fonte para Código"
#: editor/editor_settings.cpp
msgid "Dim Editor On Dialog Popup"
-msgstr ""
+msgstr "Escurecer o Editor ao Abir Janela Popup"
#: editor/editor_settings.cpp main/main.cpp
msgid "Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Tempo de Espera em Modo de Hibernação (µseg)"
#: editor/editor_settings.cpp
msgid "Unfocused Low Processor Mode Sleep (µsec)"
-msgstr ""
+msgstr "Tempo de Espera em Modo de Hibernação Quando Fora de Foco (µseg)"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Separate Distraction Mode"
-msgstr "Modo Sem Distrações"
+msgstr "Modo \"Sem Distrações\" Desacoplado"
#: editor/editor_settings.cpp
msgid "Automatically Open Screenshots"
-msgstr ""
+msgstr "Abrir Capturas de Tela Automaticamente"
#: editor/editor_settings.cpp
msgid "Max Array Dictionary Items Per Page"
-msgstr ""
+msgstr "Máximo de Itens em Arrays Dicionários Por Página"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp scene/gui/control.cpp
@@ -5433,59 +5419,51 @@ msgstr "Predefinição"
#: editor/editor_settings.cpp
msgid "Icon And Font Color"
-msgstr ""
+msgstr "Cor da Fonte e do Ãcone"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Color"
-msgstr "Cores"
+msgstr "Cor Base"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Accent Color"
-msgstr "Escolher Cor"
+msgstr "Cor de Destaque"
#: editor/editor_settings.cpp scene/resources/environment.cpp
msgid "Contrast"
-msgstr ""
+msgstr "Contraste"
#: editor/editor_settings.cpp
msgid "Relationship Line Opacity"
-msgstr ""
+msgstr "Opacidade da Linha de Relacionamento"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Highlight Tabs"
-msgstr "Salvando mapas de luz"
+msgstr "Abas de Destaque"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Border Size"
-msgstr "Pixels de Borda"
+msgstr "Tamanho da Borda"
#: editor/editor_settings.cpp
msgid "Use Graph Node Headers"
-msgstr ""
+msgstr "Utilizar Cabeçalhos de Nós para Gráficos"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Additional Spacing"
-msgstr "Loop da Animação"
+msgstr "Espaçamento Adicional"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Custom Theme"
-msgstr "Tema do Editor"
+msgstr "Tema Personalizado"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Script Button"
-msgstr "Botão direito da roda"
+msgstr "Botão de Exibir Script"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Directories"
-msgstr "Direções"
+msgstr "Diretórios"
#: editor/editor_settings.cpp
msgid "Autoscan Project Path"
@@ -5496,23 +5474,20 @@ msgid "Default Project Path"
msgstr "Caminho Padrão do Projeto"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "On Save"
-msgstr "Salvar"
+msgstr "Ao Salvar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Compress Binary Resources"
-msgstr "Copiar Recurso"
+msgstr "Comprimir Recursos Binários"
#: editor/editor_settings.cpp
msgid "Safe Save On Backup Then Rename"
-msgstr ""
+msgstr "Salvar de Forma Segura Como Backup e Então Renomear"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "File Dialog"
-msgstr "Diálogo XForm"
+msgstr "Janela de Arquivo"
#: editor/editor_settings.cpp
msgid "Thumbnail Size"
@@ -5520,82 +5495,73 @@ msgstr "Tamanho da Miniatura"
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr ""
+msgstr "Docas"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Scene Tree"
-msgstr "Edição da Ãrvore de Cena"
+msgstr "Ãrvore de Cena"
#: editor/editor_settings.cpp
msgid "Start Create Dialog Fully Expanded"
-msgstr ""
+msgstr "Iniciar Dialogo de Criação Expandido por Completo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Always Show Folders"
-msgstr "Sempre Mostrar Grade"
+msgstr "Sempre Exibir Pastas"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Property Editor"
-msgstr "Editor de Grupos"
+msgstr "Editor de Propriedades"
#: editor/editor_settings.cpp
msgid "Auto Refresh Interval"
-msgstr ""
+msgstr "Intervalo de Atualização Automática"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Subresource Hue Tint"
-msgstr "Sub-Recursos"
+msgstr "Tom de Coloração para Sub-Recursos"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Color Theme"
-msgstr "Tema do Editor"
+msgstr "Tema de Cores"
#: editor/editor_settings.cpp scene/3d/label_3d.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Line Spacing"
-msgstr ""
+msgstr "Espaçamento de Linha"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
#: modules/gdscript/editor/gdscript_highlighter.cpp
-#, fuzzy
msgid "Highlighting"
-msgstr "Iluminação direta"
+msgstr "Destacando"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
-#, fuzzy
msgid "Syntax Highlighting"
-msgstr "Realce de sintaxe"
+msgstr "Destaque de Sintaxe"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Highlight All Occurrences"
-msgstr ""
+msgstr "Destaque de Todas as Ocorrências"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Highlight Current Line"
-msgstr ""
+msgstr "Destaque da Linha Atual"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
msgid "Highlight Type Safe Lines"
-msgstr ""
+msgstr "Destaque de Linhas de Tipo Seguro"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Indent"
-msgstr "Recuar Esquerda"
+msgstr "Indentar"
#: editor/editor_settings.cpp editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
msgstr "Auto Recuar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Convert Indent On Save"
-msgstr "Converter recuo para espaços"
+msgstr "Converter Indentação Ao Salvar"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Draw Tabs"
@@ -5614,144 +5580,139 @@ msgstr "Navegação"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Smooth Scrolling"
-msgstr ""
+msgstr "Rolagem Suave"
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "V Scroll Speed"
-msgstr ""
+msgstr "Velocidade de Rolagem Vertical"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Minimap"
-msgstr "Mostrar Origem"
+msgstr "Exibir Mini-Mapa"
#: editor/editor_settings.cpp
msgid "Minimap Width"
-msgstr ""
+msgstr "Largura do Mini-Mapa"
#: editor/editor_settings.cpp
msgid "Mouse Extra Buttons Navigate History"
-msgstr ""
+msgstr "Botões Extra do Mouse Navegam o Histórico"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Drag And Drop Selection"
-msgstr "Seleção Do GridMap"
+msgstr "Seleção Arrasta e Solta"
#: editor/editor_settings.cpp
-msgid "Appearance"
+msgid "Stay In Script Editor On Node Selected"
msgstr ""
+#: editor/editor_settings.cpp
+msgid "Appearance"
+msgstr "Aparência"
+
#: editor/editor_settings.cpp scene/gui/text_edit.cpp
msgid "Show Line Numbers"
msgstr "Mostrar Números de Linha"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Line Numbers Zero Padded"
-msgstr "Número da Linha:"
+msgstr "Número das Linha Tem Espaçamento Com Zeros"
#: editor/editor_settings.cpp
msgid "Show Bookmark Gutter"
-msgstr ""
+msgstr "Exibir Espaçamento de Bookmark"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Breakpoint Gutter"
-msgstr "Pular Breakpoints"
+msgstr "Exibir Espaçamento de Pontos de Quebra"
#: editor/editor_settings.cpp
msgid "Show Info Gutter"
-msgstr ""
+msgstr "Exibir Espaçamento de Informações"
#: editor/editor_settings.cpp
msgid "Code Folding"
-msgstr ""
+msgstr "Dobramento de Código (Folding)"
#: editor/editor_settings.cpp
msgid "Word Wrap"
-msgstr ""
+msgstr "Quebra de Linhas"
#: editor/editor_settings.cpp
msgid "Show Line Length Guidelines"
-msgstr ""
+msgstr "Exibir Guia de Tamanho de Linhas"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Soft Column"
-msgstr ""
+msgstr "Tamanho de Linha Guia em Coluna Suave"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Hard Column"
-msgstr ""
+msgstr "Tamanho de Linha Guia em Coluna Rígida"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script List"
-msgstr "Editor de Script"
+msgstr "Lista de Scripts"
#: editor/editor_settings.cpp
msgid "Show Members Overview"
-msgstr ""
+msgstr "Exibir Visão Geral de Membros"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Files"
-msgstr "Arquivo"
+msgstr "Arquivos"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Trim Trailing Whitespace On Save"
-msgstr "Apagar Espaços em Branco"
+msgstr "Aparar Espaços em Branco de Fim de Linha ao Salvar"
#: editor/editor_settings.cpp
msgid "Autosave Interval Secs"
-msgstr ""
+msgstr "Intervalo de Salvamento Automático em Segundos"
#: editor/editor_settings.cpp editor/plugins/script_editor_plugin.cpp
msgid "Restore Scripts On Load"
-msgstr ""
+msgstr "Restaurar Scripts ao Carregar"
#: editor/editor_settings.cpp
msgid "Auto Reload And Parse Scripts On Save"
-msgstr ""
+msgstr "Ao Salvar Recarregar e Reinterpretar Scripts Automaticamente"
#: editor/editor_settings.cpp
msgid "Auto Reload Scripts On External Change"
-msgstr ""
+msgstr "Recarregar Scripts Automaticamente em Alterações Externas"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Create Signal Callbacks"
-msgstr "Forçar Fallbacks do Shader"
+msgstr "Criar Sinal de Callback"
#: editor/editor_settings.cpp
msgid "Sort Members Outline Alphabetically"
-msgstr ""
+msgstr "Ordenar Prévia de Membros Automaticamente"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Cursor"
-msgstr ""
+msgstr "Cursor"
#: editor/editor_settings.cpp
msgid "Scroll Past End Of File"
-msgstr ""
+msgstr "Rolar Além do Fim do Arquivo"
#: editor/editor_settings.cpp
msgid "Block Caret"
-msgstr ""
+msgstr "Bloco Cursor"
#: editor/editor_settings.cpp
msgid "Caret Blink"
-msgstr ""
+msgstr "Piscar Cursor"
#: editor/editor_settings.cpp
msgid "Caret Blink Speed"
-msgstr ""
+msgstr "Velocidade de Piscar do Cursor"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Right Click Moves Caret"
-msgstr "Clique com o botão direito para adicionar o ponto"
+msgstr "Botão Direito Move o Cursor"
#: editor/editor_settings.cpp modules/gdscript/gdscript.cpp
#: modules/gdscript/gdscript_editor.cpp
@@ -5761,54 +5722,51 @@ msgstr "Conclusão"
#: editor/editor_settings.cpp
msgid "Idle Parse Delay"
-msgstr ""
+msgstr "Atraso Ocioso Para Interpretação"
#: editor/editor_settings.cpp
msgid "Auto Brace Complete"
-msgstr ""
+msgstr "Fechar Chaves Automaticamente"
#: editor/editor_settings.cpp
msgid "Code Complete Delay"
-msgstr ""
+msgstr "Atraso de Sugestão de Código"
#: editor/editor_settings.cpp
msgid "Put Callhint Tooltip Below Current Line"
-msgstr ""
+msgstr "Pôr Dica de Sugestão de Chamada na Linha Abaixo da Atual"
#: editor/editor_settings.cpp
msgid "Callhint Tooltip Offset"
-msgstr ""
+msgstr "Espaçamento de Dica de Sugestão de Chamada"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Complete File Paths"
-msgstr "Copiar Caminho do Nó"
+msgstr "Concluir Caminhos de Arquivo"
#: editor/editor_settings.cpp modules/gdscript/gdscript_editor.cpp
-#, fuzzy
msgid "Add Type Hints"
-msgstr "Adicionar Modelo"
+msgstr "Adicionar Dicas de Tipo"
#: editor/editor_settings.cpp
msgid "Use Single Quotes"
msgstr "Usar Aspas Simples"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Show Help Index"
-msgstr "Mostrar auxiliadores"
+msgstr "Exibir Ãndice de Ajuda"
#: editor/editor_settings.cpp
msgid "Help Font Size"
-msgstr ""
+msgstr "Tamanho da Fonte de Ajuda"
#: editor/editor_settings.cpp
msgid "Help Source Font Size"
-msgstr ""
+msgstr "Tamanho da Fonte de Ajuda Principal"
#: editor/editor_settings.cpp
msgid "Help Title Font Size"
-msgstr ""
+msgstr "Tamanho da Fonte de Ajuda para Títulos"
#: editor/editor_settings.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -5819,45 +5777,39 @@ msgid "Pick Distance"
msgstr "Escolha a Distância"
#: editor/editor_settings.cpp editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Preview Size"
-msgstr "Visualização"
+msgstr "Tamanho da Prévia"
#: editor/editor_settings.cpp
msgid "Primary Grid Color"
-msgstr ""
+msgstr "Cor Primária da Grade"
#: editor/editor_settings.cpp
msgid "Secondary Grid Color"
-msgstr ""
+msgstr "Cor Secundária da Grade"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Selection Box Color"
-msgstr "Selecionar Apenas"
+msgstr "Cor da Caixa de Seleção"
#: 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 "Gizmos"
+msgstr "Gizmos 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 do Gismo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Instanced"
-msgstr "Instância"
+msgstr "Instanciado"
#: editor/editor_settings.cpp modules/gltf/gltf_node.cpp
#: scene/3d/physics_body.cpp
-#, fuzzy
msgid "Joint"
-msgstr "Ponto"
+msgstr "Junção"
#: editor/editor_settings.cpp scene/2d/collision_shape_2d.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/touch_screen_button.cpp
@@ -5866,12 +5818,11 @@ msgstr "Ponto"
#: scene/resources/particles_material.cpp servers/physics_2d_server.cpp
#: servers/physics_server.cpp
msgid "Shape"
-msgstr ""
+msgstr "Form"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Primary Grid Steps"
-msgstr "Passo de grade:"
+msgstr "Passadas para Grade Primária"
#: editor/editor_settings.cpp
msgid "Grid Size"
@@ -5879,183 +5830,155 @@ msgstr "Tamanho da Grade"
#: editor/editor_settings.cpp
msgid "Grid Division Level Max"
-msgstr ""
+msgstr "Nível Máximo de Divisão de Grade"
#: editor/editor_settings.cpp
msgid "Grid Division Level Min"
-msgstr ""
+msgstr "Nível Mínimo de Divisão da Grade"
#: editor/editor_settings.cpp
msgid "Grid Division Level Bias"
-msgstr ""
+msgstr "Tendência do Nível de Divisão da Grade"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XZ Plane"
-msgstr "Pintura GridMap"
+msgstr "Grade do Plano XZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid XY Plane"
-msgstr "Pintura GridMap"
+msgstr "Grade do Plano XY"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Grid YZ Plane"
-msgstr "Pintura GridMap"
+msgstr "Grade do Plano YZ"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default FOV"
-msgstr "Padrão"
+msgstr "Campo de Visão (FOV) Padrão"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Near"
-msgstr "Tema Padrão"
+msgstr "Z Padrão Próximo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Z Far"
-msgstr "Padrão"
+msgstr "Z Padrão Longe"
#: editor/editor_settings.cpp
msgid "Lightmap Baking Number Of CPU Threads"
-msgstr ""
+msgstr "Número de Threads de CPU para o Bake 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 "Eduitar 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 "Reduzir"
+msgstr "Estilo de Zoom"
#: editor/editor_settings.cpp
msgid "Emulate Numpad"
-msgstr ""
+msgstr "Simular o Numpad"
#: editor/editor_settings.cpp
msgid "Emulate 3 Button Mouse"
-msgstr ""
+msgstr "Simular o Botão 3 Do Mouse"
#: 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 Panorâmico"
+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 ""
+msgstr "Panorização Distorcida pelo Mouse"
#: 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"
-msgstr ""
+msgstr "Sensitividade de Órbita"
#: editor/editor_settings.cpp
msgid "Orbit Inertia"
-msgstr ""
+msgstr "Inercia de Ó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 "Ampliar"
+msgstr "Inércia de Zoom"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook"
-msgstr "Visão Livre em 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 "Visão Livre na Esquerda"
+msgstr "Sensibilidade de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Inertia"
-msgstr "Visão Livre na Esquerda"
+msgstr "Inercia de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Base Speed"
-msgstr "Modificador de velocidade da Visão Livre"
+msgstr "Velocidade Base de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Activation Modifier"
-msgstr "Modificador de velocidade lenta da Visão Livre"
+msgstr "Modificador de Ativação de Visão Livre"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Freelook Speed Zoom Link"
-msgstr "Modificador de velocidade da Visão Livre"
+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 "Encaixe inteligente"
+msgstr "Cor da Linha de Encaixe Inteligente"
#: editor/editor_settings.cpp
msgid "Bone Width"
-msgstr ""
+msgstr "Largura do Osso"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 1"
-msgstr "Renomear Item de Cor"
+msgstr "Cor de Osso 1"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Bone Color 2"
-msgstr "Renomear Item de Cor"
+msgstr "Cor de Osso 2"
#: editor/editor_settings.cpp
msgid "Bone Selected Color"
@@ -6063,11 +5986,11 @@ msgstr "Cor Selecionada do Osso"
#: editor/editor_settings.cpp
msgid "Bone IK Color"
-msgstr ""
+msgstr "Cor de Osso IK (cinemática inversa)"
#: editor/editor_settings.cpp
msgid "Bone Outline Color"
-msgstr ""
+msgstr "Cor de Contorno do Osso"
#: editor/editor_settings.cpp
msgid "Bone Outline Size"
@@ -6075,103 +5998,93 @@ msgstr "Tamanho do Contorno do Osso"
#: editor/editor_settings.cpp
msgid "Viewport Border Color"
-msgstr ""
+msgstr "Cor da Borda de Viewport"
#: editor/editor_settings.cpp
msgid "Constrain Editor View"
-msgstr ""
+msgstr "Restringir Visão do Editor"
#: editor/editor_settings.cpp
msgid "Simple Panning"
-msgstr ""
+msgstr "Panoramização Simples"
#: editor/editor_settings.cpp
msgid "Scroll To Pan"
-msgstr ""
+msgstr "Rolar para Panoramizar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Pan Speed"
-msgstr "Velocidade:"
+msgstr "Velocidade da Panoramização"
#: editor/editor_settings.cpp editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Poly Editor"
-msgstr "Editor UV de Polígonos 2D"
+msgstr "Editor de Polígonos"
#: editor/editor_settings.cpp
msgid "Point Grab Radius"
-msgstr ""
+msgstr "Raio de Agarro ao Ponto"
#: 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 ""
+msgstr "Criar Faixa de Bezier por Padrão"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Default Create Reset Tracks"
-msgstr "Criar RESET Track(s)"
+msgstr "Criar Faixa RESET Por Padrão"
#: editor/editor_settings.cpp
msgid "Onion Layers Past Color"
-msgstr ""
+msgstr "Cor da Camada de Cebola Anterior"
#: editor/editor_settings.cpp
msgid "Onion Layers Future Color"
-msgstr ""
+msgstr "Cor da Camada de Cebola Posterior"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Visual Editors"
-msgstr "Editor de Grupos"
+msgstr "Editores Visuais"
#: editor/editor_settings.cpp
msgid "Minimap Opacity"
-msgstr ""
+msgstr "Opacidade do Mini-Mapa"
#: editor/editor_settings.cpp
msgid "Window Placement"
-msgstr ""
+msgstr "Colocação da Janela"
#: 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 Completo"
+msgstr "Retângulo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Rect Custom Position"
-msgstr "Definir Posição de Saída da Curva"
+msgstr "Posição Personalizada Do Retângulo"
#: editor/editor_settings.cpp platform/android/export/export_plugin.cpp
msgid "Screen"
-msgstr ""
+msgstr "Tela"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Auto Save"
-msgstr "Auto Fatiar"
+msgstr "Salvar Automaticamente"
#: editor/editor_settings.cpp
msgid "Save Before Running"
msgstr "Salvar Antes de Executar"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Font Size"
-msgstr "Visão Frontal"
+msgstr "Tamanho da Fonte"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
@@ -6180,28 +6093,26 @@ msgstr "Hospedeiro Remoto"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
-#, fuzzy
msgid "Remote Port"
-msgstr "Remover Ponto"
+msgstr "Porta Remota"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Editor SSL Certificates"
-msgstr "Configurações do Editor"
+msgstr "Certificados SSL do Editor"
#: editor/editor_settings.cpp
msgid "HTTP Proxy"
-msgstr ""
+msgstr "Proxy HTTP"
#: editor/editor_settings.cpp
msgid "Host"
-msgstr ""
+msgstr "Hospedeiro"
#: 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 "Porta"
#. TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects.
#: editor/editor_settings.cpp
@@ -6215,32 +6126,31 @@ msgstr "Ordem de Classificação"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Symbol Color"
-msgstr ""
+msgstr "Cor do Simbolo"
#: editor/editor_settings.cpp
msgid "Keyword Color"
-msgstr ""
+msgstr "Cor de Palavra Chave"
#: editor/editor_settings.cpp
msgid "Control Flow Keyword Color"
-msgstr ""
+msgstr "Core de Palavra Chave de Controle de Fluxo"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Base Type Color"
-msgstr "Mudar Tipo Base"
+msgstr "Cor de Tipo Base"
#: editor/editor_settings.cpp
msgid "Engine Type Color"
-msgstr ""
+msgstr "Cor de Tipo da Engine"
#: editor/editor_settings.cpp
msgid "User Type Color"
-msgstr ""
+msgstr "Cor de Tipo Do Usuário"
#: editor/editor_settings.cpp
msgid "Comment Color"
-msgstr ""
+msgstr "Cor de Comentário"
#: editor/editor_settings.cpp
msgid "String Color"
@@ -6257,26 +6167,24 @@ msgid "Completion Background Color"
msgstr "Cor de Fundo de Acabamento"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Completion Selected Color"
-msgstr "Importar Selecionado"
+msgstr "Cor de Sugestão Selecionada"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Existing Color"
-msgstr ""
+msgstr "Cor de Sugestão Existente"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Scroll Color"
-msgstr ""
+msgstr "Cor da Barra de Rolagem de Sugestão"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Completion Font Color"
-msgstr ""
+msgstr "Cor da Fonte de Sugestão"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Color"
-msgstr "Próximo Chão"
+msgstr "Cor do Texto"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Line Number Color"
@@ -6288,86 +6196,75 @@ msgstr "Cor do Número da Linha Segura"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Color"
-msgstr ""
+msgstr "Cor do Cursor"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Caret Background Color"
msgstr "Cor de Fundo de Acentuação"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Text Selected Color"
-msgstr "Excluir Selecionados"
+msgstr "Cor do Texto Selecionado"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Selection Color"
-msgstr "Selecionar Apenas"
+msgstr "Cor da Seleção"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Brace Mismatch Color"
-msgstr ""
+msgstr "Cor de Chave Incompatível"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Current Line Color"
-msgstr "Cena Atual"
+msgstr "Cor da Linha Atual"
#: editor/editor_settings.cpp
msgid "Line Length Guideline Color"
-msgstr ""
+msgstr "Cor do Tamanho de Linha Guia"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Word Highlighted Color"
-msgstr "Realce de sintaxe"
+msgstr "Cor da Palavra em Destaque"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Number Color"
-msgstr ""
+msgstr "Cor de Número"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Function Color"
-msgstr "Funções"
+msgstr "Cor de Função"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Member Variable Color"
-msgstr "Renomear Variável"
+msgstr "Cor de Variável Membro"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Mark Color"
-msgstr "Escolher Cor"
+msgstr "Cor de Marcação"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Bookmark Color"
-msgstr "Marcadores"
+msgstr "Cor de Bookmark"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Breakpoint Color"
-msgstr "Breakpoints"
+msgstr "Cor de Ponto de Quebra"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Executing Line Color"
-msgstr ""
+msgstr "Cor da Linha em Execução"
#: editor/editor_settings.cpp scene/resources/default_theme/default_theme.cpp
msgid "Code Folding Color"
-msgstr ""
+msgstr "Cor da Dobradiça de Código"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Color"
-msgstr "Pesquisar resultados"
+msgstr "Cor do Resultado de Pesquisa"
#: editor/editor_settings.cpp
-#, fuzzy
msgid "Search Result Border Color"
-msgstr "Pesquisar resultados"
+msgstr "Cor da Borda do Resultado de Pesquisa"
#: editor/editor_spin_slider.cpp
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
@@ -6376,14 +6273,12 @@ msgstr ""
"mais precisas."
#: editor/editor_spin_slider.cpp scene/gui/button.cpp
-#, fuzzy
msgid "Flat"
-msgstr "Plano 0"
+msgstr "Raso"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hide Slider"
-msgstr "Modo Colisão"
+msgstr "Esconder Rolagem"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -6683,7 +6578,7 @@ msgstr ""
#: editor/fileserver/editor_file_server.cpp
msgid "File Server"
-msgstr ""
+msgstr "Servidor de Arquivos"
#: editor/fileserver/editor_file_server.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -6751,6 +6646,11 @@ msgid ""
"After renaming to an unknown extension, the file won't be shown in the "
"editor anymore."
msgstr ""
+"Esta extensão de arquivo não é reconhecida pelo editor.\n"
+"Se ainda assim você deseja renomear, utilize o explorador de arquivos do seu "
+"sistema operacional.\n"
+"Após renomear para uma extensão desconhecida, este arquivo não será mais "
+"exibida pelo editor."
#: editor/filesystem_dock.cpp
msgid ""
@@ -7051,43 +6951,40 @@ msgstr "Gerenciar Grupos"
#: editor/import/editor_import_collada.cpp
msgid "Collada"
-msgstr ""
+msgstr "Collada"
#: editor/import/editor_import_collada.cpp
msgid "Use Ambient"
-msgstr ""
+msgstr "Utilizar Ambient"
#: 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
msgid "Threshold"
-msgstr ""
+msgstr "Limite"
#: 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 "Componentes"
+msgstr "Comprimir"
#: editor/import/resource_importer_csv_translation.cpp
msgid "Delimiter"
-msgstr ""
+msgstr "Delimitador"
#: editor/import/resource_importer_layered_texture.cpp
-#, fuzzy
msgid "ColorCorrect"
-msgstr "Correção de Cor"
+msgstr "Corrigir as Cores"
#: editor/import/resource_importer_layered_texture.cpp
msgid "No BPTC If RGB"
-msgstr ""
+msgstr "Não utilizar BPTC se for RGB"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/cpu_particles_2d.cpp
@@ -7095,13 +6992,13 @@ msgstr ""
#: scene/resources/material.cpp scene/resources/particles_material.cpp
#: scene/resources/texture.cpp scene/resources/visual_shader.cpp
msgid "Flags"
-msgstr ""
+msgstr "Sinalizadores"
#: 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 "Repetir"
#: editor/import/resource_importer_layered_texture.cpp
#: editor/import/resource_importer_texture.cpp scene/2d/light_2d.cpp
@@ -7111,24 +7008,22 @@ 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
msgid "Anisotropic"
-msgstr ""
+msgstr "Anisotrópico"
#: 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
msgid "Slices"
-msgstr "Auto Fatiar"
+msgstr "Fatias"
#: editor/import/resource_importer_layered_texture.cpp
#: scene/gui/aspect_ratio_container.cpp scene/gui/control.cpp
@@ -7145,14 +7040,12 @@ 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
-#, fuzzy
msgid "Scale Mesh"
-msgstr "Modo de Escalonamento"
+msgstr "Redimensionar Malha"
#: editor/import/resource_importer_obj.cpp
msgid "Offset Mesh"
@@ -7160,14 +7053,12 @@ msgstr "Malha de Deslocamento"
#: editor/import/resource_importer_obj.cpp
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Octahedral Compression"
-msgstr "Expressão"
+msgstr "Compressão Octaedral"
#: editor/import/resource_importer_obj.cpp
-#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "Sinalizadores de Tamanho"
+msgstr "Otimizar Sinalizadores da Malha"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7215,24 +7106,20 @@ msgid "Nodes"
msgstr "Nós"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Type"
-msgstr "Retornar"
+msgstr "Tipo da Raiz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Name"
-msgstr "Nome Remoto"
+msgstr "Nome da Raiz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Root Scale"
-msgstr "Escala"
+msgstr "Escala da Raiz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Custom Script"
-msgstr "Recortar Nós"
+msgstr "Script Personalizado"
#: editor/import/resource_importer_scene.cpp scene/resources/texture.cpp
msgid "Storage"
@@ -7240,69 +7127,59 @@ msgstr "Armazenamento"
#: editor/import/resource_importer_scene.cpp
msgid "Use Legacy Names"
-msgstr ""
+msgstr "Utilizar Nomes Legados"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Materials"
msgstr "Materiais"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep On Reimport"
-msgstr "Reimportar"
+msgstr "Manter ao Reimportar"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Meshes"
-msgstr "Malha"
+msgstr "Malhas"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Ensure Tangents"
-msgstr "Modificar Tangente da Curva"
+msgstr "Garantir Tangentes"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Light Baking"
-msgstr "Faça mapas de luz"
+msgstr "Bake de Mapa de Luz"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Lightmap Texel Size"
-msgstr "Faça mapas de luz"
+msgstr "Tamanho do Texel no Mapa de Luz"
#: editor/import/resource_importer_scene.cpp modules/gltf/gltf_state.cpp
msgid "Skins"
-msgstr ""
+msgstr "Peles"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Use Named Skins"
-msgstr "Usar Encaixe Escalar"
+msgstr "Utilizar Peles com Nome"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "External Files"
-msgstr "Abrir um Arquivo"
+msgstr "Arquivos Externos"
#: editor/import/resource_importer_scene.cpp
msgid "Store In Subdir"
-msgstr ""
+msgstr "Salvar em Sub Diretório"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Filter Script"
-msgstr "Filtrar scripts"
+msgstr "Filtrar Script"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Keep Custom Tracks"
-msgstr "Transformação"
+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
@@ -7316,9 +7193,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 "Habilitar"
+msgstr "Habilitado"
#: editor/import/resource_importer_scene.cpp
msgid "Max Linear Error"
@@ -7329,19 +7205,16 @@ msgid "Max Angular Error"
msgstr "Erro Angular Máximo"
#: 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 Trilha da Anim"
+msgstr "Remover Faixas não Utilizadas"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Clips"
-msgstr "Clipes de Animação"
+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
@@ -7395,30 +7268,33 @@ 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: Foi detectado que a textura está sendo utilizada como mapa normal em 3D. "
+"Habilitando a compressão vermelho/verde para reduzir o uso de memória (o "
+"canal azul é descartado)."
#: 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: Foi detectado que a textura está sendo utilizada em 3D. Habilitando a "
+"filtro, repetir, geração de mipmap e compressão de textura VRAM."
#: editor/import/resource_importer_texture.cpp
msgid "2D, Detect 3D"
-msgstr ""
+msgstr "2D, Detecte 3D"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "2D Pixel"
-msgstr "Pixels Sólidos"
+msgstr "Pixel 2D"
#: editor/import/resource_importer_texture.cpp scene/resources/texture.cpp
msgid "Lossy Quality"
-msgstr ""
+msgstr "Com Perda de Qualidade"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "HDR Mode"
-msgstr "Modo de Seleção"
+msgstr "Modo HDR"
#: editor/import/resource_importer_texture.cpp
msgid "BPTC LDR"
@@ -7429,54 +7305,52 @@ msgstr ""
#: 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 "Mapa Normal"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Process"
-msgstr "Pós-processamento"
+msgstr "Processar"
#: editor/import/resource_importer_texture.cpp
msgid "Fix Alpha Border"
-msgstr ""
+msgstr "Corrigir Alpha da Borda"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Premult Alpha"
-msgstr "Editar Polígono"
+msgstr ""
#: editor/import/resource_importer_texture.cpp
msgid "Hdr As Srgb"
-msgstr ""
+msgstr "HDR como SRGB"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Invert Color"
-msgstr "Vértice"
+msgstr "Inverter Cor"
#: editor/import/resource_importer_texture.cpp
msgid "Normal Map Invert Y"
msgstr "Inverter Y do Mapa Normal"
#: editor/import/resource_importer_texture.cpp
-#, fuzzy
msgid "Size Limit"
-msgstr "Limites"
+msgstr "Limite de Tamanho"
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
-msgstr ""
+msgstr "Detectar 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 ""
+"Atenção, nenhuma forma adequada de Compressão VRAM para PC foi habilitada "
+"nas Configurações do Projeto. Esta textura não será exibida corretamente em "
+"PCs."
#: editor/import/resource_importer_texture_atlas.cpp
msgid "Atlas File"
@@ -7487,64 +7361,56 @@ msgid "Import Mode"
msgstr "Modo de Importação"
#: editor/import/resource_importer_texture_atlas.cpp
-#, fuzzy
msgid "Crop To Region"
-msgstr "Definir a região do Mosaico"
+msgstr "Recortar para Região"
#: editor/import/resource_importer_texture_atlas.cpp
msgid "Trim Alpha Border From Region"
-msgstr ""
+msgstr "Aparar Borda Alfa da Região"
#: editor/import/resource_importer_wav.cpp scene/2d/physics_body_2d.cpp
-#, fuzzy
msgid "Force"
-msgstr "Forçar Push"
+msgstr "Forçar"
#: editor/import/resource_importer_wav.cpp
msgid "8 Bit"
-msgstr ""
+msgstr "8 Bits"
#: editor/import/resource_importer_wav.cpp main/main.cpp
#: modules/mono/editor/csharp_project.cpp modules/mono/mono_gd/gd_mono.cpp
msgid "Mono"
-msgstr ""
+msgstr "Mono"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate"
-msgstr "Nó Mix"
+msgstr "Frequência Máxima"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Max Rate Hz"
-msgstr "Nó Mix"
+msgstr "Frequência Máxima Hz"
#: editor/import/resource_importer_wav.cpp
msgid "Trim"
-msgstr ""
+msgstr "Aparar"
#: editor/import/resource_importer_wav.cpp
-#, fuzzy
msgid "Normalize"
-msgstr "Formato"
+msgstr "Normalizar"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Mode"
-msgstr "Modo de Movimentação"
+msgstr "Modo de Loop"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop Begin"
-msgstr "Modo de Movimentação"
+msgstr "Inicio do Loop"
#: editor/import/resource_importer_wav.cpp
#: scene/resources/audio_stream_sample.cpp
-#, fuzzy
msgid "Loop End"
-msgstr "Modo de Movimentação"
+msgstr "Fim do Loop"
#: editor/import_defaults_editor.cpp
msgid "Select Importer"
@@ -7632,18 +7498,16 @@ msgid "Raw"
msgstr "Bruto"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Capitalized"
-msgstr "Capitalizar"
+msgstr "Capitalizado"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Localized"
-msgstr "Localizar"
+msgstr "Localizado"
#: editor/inspector_dock.cpp
msgid "Localization not available for current language."
-msgstr ""
+msgstr "Localização não disponível para linguagem atual."
#: editor/inspector_dock.cpp
msgid "Copy Properties"
@@ -8192,9 +8056,8 @@ msgid "New"
msgstr "Novo"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Paste As Reference"
-msgstr "%s Referência de Classes"
+msgstr "Colar como Referência"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -8523,7 +8386,7 @@ msgstr "Filtros..."
#: editor/plugins/asset_library_editor_plugin.cpp scene/main/http_request.cpp
msgid "Use Threads"
-msgstr ""
+msgstr "Usar Threads"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
@@ -8686,25 +8549,21 @@ msgid "Loading..."
msgstr "Carregando..."
#: 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"
@@ -8755,7 +8614,7 @@ msgstr "Testando"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed to get repository configuration."
-msgstr ""
+msgstr "Falhou em obter o repositório de configuração."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -8815,7 +8674,7 @@ msgstr "Faça mapas de luz"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "LightMap Bake"
-msgstr ""
+msgstr "Bake de Mapa de Luz"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Select lightmap bake file:"
@@ -9322,23 +9181,20 @@ msgid "View"
msgstr "Visualizar"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show"
-msgstr "Mostrar Grade"
+msgstr "Exibir"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show When Snapping"
-msgstr "Encaixe inteligente"
+msgstr "Exibir ao Encaixar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Hide"
-msgstr ""
+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
@@ -9622,11 +9478,11 @@ msgstr "Plano 1"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease In"
-msgstr "Ease In"
+msgstr "Esmaecer de Entrada"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease Out"
-msgstr "Ease Out"
+msgstr "Esmaecer de Saída"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
@@ -9690,16 +9546,15 @@ msgstr "Gradiente Editado"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap GradientTexture2D Fill Points"
-msgstr ""
+msgstr "Trocar Pontos de Preenchimento do GradientTexture2D"
#: editor/plugins/gradient_texture_2d_editor_plugin.cpp
msgid "Swap Gradient Fill Points"
-msgstr ""
+msgstr "Trocar Pontos de Preenchimento do Degradê"
#: 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
@@ -9718,13 +9573,12 @@ msgstr "Ãcone"
#: 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 "Separação:"
+msgstr "Separador"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
@@ -9958,7 +9812,6 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "MeshLibrary"
msgstr "Biblioteca de Malhas"
@@ -9983,14 +9836,12 @@ msgid "Update from Scene"
msgstr "Atualizar a partir de Cena"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply without Transforms"
-msgstr "Aplicar transformações da MeshInstance"
+msgstr "Aplicar sem Transformações"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Apply with Transforms"
-msgstr "Aplicar transformações da MeshInstance"
+msgstr "Aplicar com Transformações"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
@@ -10482,7 +10333,7 @@ msgstr "Configurações da grade"
#: editor/plugins/polygon_2d_editor_plugin.cpp modules/csg/csg_shape.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Snap"
-msgstr "Snap"
+msgstr "Encaixe"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
@@ -10518,7 +10369,7 @@ msgstr "Sincronizar Ossos ao Polígono"
#: editor/plugins/ray_cast_2d_editor_plugin.cpp
msgid "Set cast_to"
-msgstr ""
+msgstr "Definir cast_to"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
@@ -10849,48 +10700,43 @@ msgstr "Resultados de Pesquisa"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Dominant Script On Scene Change"
-msgstr ""
+msgstr "Abrir Script Dominante ao Mudar de Cena"
#: editor/plugins/script_editor_plugin.cpp
msgid "External"
-msgstr ""
+msgstr "Externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Use External Editor"
-msgstr "Depurar com o Editor Externo"
+msgstr "Utilizar Editor Externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Exec Path"
-msgstr "Caminho de Exportação"
+msgstr "Caminho de Execução"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Script Temperature Enabled"
-msgstr "Selecionar o Arquivo de Modelo"
+msgstr "Temperatura de Script Habilitado"
#: editor/plugins/script_editor_plugin.cpp
msgid "Highlight Current Script"
-msgstr ""
+msgstr "Destacar Script Atual"
#: editor/plugins/script_editor_plugin.cpp
msgid "Script Temperature History Size"
-msgstr ""
+msgstr "Tamanho de Histórico de Temperatura de Script"
#: editor/plugins/script_editor_plugin.cpp
msgid "Current Script Background Color"
msgstr "Cor de Fundo do Script Atual"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Group Help Pages"
-msgstr "Agrupar Selecionados"
+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
msgid "List Script Names As"
@@ -10898,7 +10744,7 @@ msgstr "Listar Nomes de Script Como"
#: editor/plugins/script_editor_plugin.cpp
msgid "Exec Flags"
-msgstr ""
+msgstr "Sinalizadores de Execução"
#: editor/plugins/script_editor_plugin.cpp
msgid "Clear Recent Scripts"
@@ -10982,7 +10828,7 @@ msgstr "Marcadores"
#: editor/plugins/script_text_editor.cpp
msgid "Breakpoints"
-msgstr "Breakpoints"
+msgstr "Pontos de Quebra"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
@@ -11411,13 +11257,14 @@ msgstr "Pré-visualização Cinemática"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "(Not in GLES2)"
-msgstr ""
+msgstr "(Não disponível 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 ao usar 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"
@@ -11712,16 +11559,15 @@ msgstr "Pós"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Size"
-msgstr ""
+msgstr "Tamanho do Gizmo Manipulador"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Manipulator Gizmo Opacity"
-msgstr ""
+msgstr "Opacidade do Gizmo Manipulador"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Show Viewport Rotation Gizmo"
-msgstr "Bloquear Rotação da Visão"
+msgstr "Exibir Gizmo de Rotação do Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unnamed Gizmo"
@@ -11773,9 +11619,8 @@ msgid "Invalid geometry, can't replace by mesh."
msgstr "Geometria inválida, não é possível substituir por malha."
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Convert to MeshInstance2D"
-msgstr "Converter para Malha2D"
+msgstr "Converter para MeshInstance2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
@@ -11878,6 +11723,11 @@ msgid "New Animation"
msgstr "Nova animação"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrar métodos"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Velocidade:"
@@ -12175,9 +12025,8 @@ msgstr ""
"Fechar mesmo assim?"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Type"
-msgstr "Remover Telha"
+msgstr "Remover Tipo"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -12221,14 +12070,12 @@ msgstr ""
"Adicione mais itens manualmente ou importe 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"
@@ -12343,9 +12190,8 @@ msgid "Select Another Theme Resource:"
msgstr "Selecionar Outro Recurso de 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"
@@ -12400,14 +12246,12 @@ msgid "Add Item Type"
msgstr "Adicionar Tipo de Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Set Variation Base Type"
-msgstr "Definir o Tipo da Variável"
+msgstr "Definir Tipo de Variação Base"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Set Base Type"
-msgstr "Mudar Tipo Base"
+msgstr "Definir Tipo Base"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show Default"
@@ -12429,12 +12273,15 @@ msgstr "Substituir todos os itens do modelo padrão."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select the variation base type from a list of available types."
msgstr ""
+"Selecione a variação do tipo base à partir da lista de tipos disponíveis."
#: 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 ""
+"Um tipo associado à uma classe padrão não pode ser marcada como variação de "
+"outro tipo."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme:"
@@ -12672,14 +12519,13 @@ msgid "Clear Transform"
msgstr "Limpar Transformação"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Tile Map"
-msgstr "Pintar TileMap"
+msgstr "Tile Map"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Palette Min Width"
-msgstr ""
+msgstr "Largura Mínima de Paleta"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
@@ -12687,24 +12533,20 @@ msgid "Palette Item H Separation"
msgstr "Separador Nomeado"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Show Tile Names"
-msgstr "Mostrar todos os Locales"
+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 arquivos"
+msgstr "Ordenar Tiles por Nome"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill Preview"
-msgstr "Preenchimento de Balde"
+msgstr "Pré-visualização do Preenchimento de Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -12713,9 +12555,8 @@ msgid "Editor Side"
msgstr "Editor"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Display Grid"
-msgstr "Exibição Overdraw"
+msgstr "Mostrar Grid"
#: editor/plugins/tile_map_editor_plugin.cpp
#, fuzzy
@@ -13081,14 +12922,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
@@ -13097,9 +12936,8 @@ 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
@@ -13119,9 +12957,8 @@ msgid "Modulate"
msgstr "Popular"
#: 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
@@ -13129,14 +12966,12 @@ msgid "Autotile Bitmask Mode"
msgstr "Modo Bitmask"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Subtile Size"
-msgstr "Tamanho do Contorno:"
+msgstr "Tamanho do Sub Título"
#: 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
@@ -13144,24 +12979,20 @@ msgid "Occluder Offset"
msgstr "Criar Polígono de Oclusão"
#: 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 "Deslocamento Base"
+msgstr "Deslocamento da Forma"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Shape Transform"
-msgstr "Transformação"
+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
@@ -13174,19 +13005,16 @@ msgid "Selected Collision One Way Margin"
msgstr "Modo Colisão"
#: 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 "Filtrar scripts"
+msgstr "Scripts do Tileset"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "TileSet"
@@ -13265,7 +13093,7 @@ msgstr "Selecione o caminho da chave privada SSH"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "SSH Passphrase"
-msgstr "SSH Passphrase"
+msgstr "Senha SSH"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Detect new changes"
@@ -14274,11 +14102,13 @@ msgstr "Executável"
#: editor/project_export.cpp
msgid "Export the project for all the presets defined."
-msgstr ""
+msgstr "Exportar o projeto para todos os presets definidos."
#: editor/project_export.cpp
msgid "All presets must have an export path defined for Export All to work."
msgstr ""
+"Todos os presets devem ter um caminho de exportação para que a "
+"funcionalidade de Exportar Todos funcione."
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
@@ -14391,11 +14221,12 @@ msgid ""
"Note: Encryption key needs to be stored in the binary,\n"
"you need to build the export templates from source."
msgstr ""
+"Nota: Chaves de encriptação têm que ser salvas com o binário,\n"
+"você precisa compilar os modelos de exportação à partir do código fonte."
#: editor/project_export.cpp
-#, fuzzy
msgid "More Info..."
-msgstr "Mover Para..."
+msgstr "Mais Informações..."
#: editor/project_export.cpp
msgid "Export PCK/Zip..."
@@ -14422,18 +14253,16 @@ msgid "ZIP File"
msgstr "Arquivo ZIP"
#: editor/project_export.cpp
-#, fuzzy
msgid "Godot Project Pack"
-msgstr "Pacote de Jogos Godot"
+msgstr "Pacote do Projeto Godot"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Modelos de exportação para esta plataforma não foram encontrados:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Project Export"
-msgstr "Fundadores do Projeto"
+msgstr "Exportar Projeto"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -14746,7 +14575,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 "Gerenciador de Projetos"
@@ -15546,7 +15374,7 @@ msgstr "Tornar Local"
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
msgid "Another node already uses this unique name in the scene."
-msgstr ""
+msgstr "Outro nó já está usando este nome único na cena atual."
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -15632,7 +15460,7 @@ msgstr "Sub-Recursos"
#: editor/scene_tree_dock.cpp
msgid "Access as Scene Unique Name"
-msgstr ""
+msgstr "Acessar como Nome Único de Cena"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
@@ -15737,7 +15565,7 @@ msgstr "Seleção Central"
#: editor/scene_tree_dock.cpp
msgid "Derive Script Globals By Name"
-msgstr ""
+msgstr "Obter Globais de Script por Nome"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -15770,6 +15598,9 @@ msgid ""
"with the '%s' prefix in a node path.\n"
"Click to disable this."
msgstr ""
+"Este nó pode ser acessado em qualquer lugar na cena adicionando o prefixo "
+"'%s' em um node path.\n"
+"Clique para desabilitar esta funcionalidade."
#: editor/scene_tree_editor.cpp
msgid ""
@@ -16062,15 +15893,15 @@ msgstr "Filtros do tile"
#: editor/script_editor_debugger.cpp
msgid "Auto Switch To Remote Scene Tree"
-msgstr ""
+msgstr "Mudar Automaticamente Para a Ãrvore de Cena Remota"
#: editor/script_editor_debugger.cpp
msgid "Remote Scene Tree Refresh Interval"
-msgstr ""
+msgstr "Intervalo de Atualização da Ãrvore Remota"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspect Refresh Interval"
-msgstr ""
+msgstr "Intervalo de Atualização da Inspeção Remota"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
@@ -16168,7 +15999,7 @@ msgstr "Alterar Raio da Luz"
#: editor/spatial_editor_gizmos.cpp
msgid "Stream Player 3D"
-msgstr ""
+msgstr "Player de Stream 3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change AudioStreamPlayer3D Emission Angle"
@@ -16178,7 +16009,7 @@ msgstr "Alterar o Ângulo de Emissão do AudioStreamPlayer3D"
#: platform/osx/export/export.cpp
#: scene/resources/default_theme/default_theme.cpp
msgid "Camera"
-msgstr ""
+msgstr "Câmera"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
@@ -16190,7 +16021,7 @@ msgstr "Alterar Tamanho da Câmera"
#: editor/spatial_editor_gizmos.cpp
msgid "Visibility Notifier"
-msgstr ""
+msgstr "Notificador de Visibilidade"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -16248,9 +16079,8 @@ msgid "Change Ray Shape Length"
msgstr "Alterar o Comprimento da Forma do Raio"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Edge"
-msgstr "Modo Navegação"
+msgstr "Bordas de Navegação"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16258,30 +16088,28 @@ msgid "Navigation Edge Disabled"
msgstr "Modo Navegação"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid"
-msgstr "Modo Navegação"
+msgstr "Navegação Sólida"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Navigation Solid Disabled"
-msgstr "Modo Navegação"
+msgstr "Navegação Sólida Desabilitada"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body A"
-msgstr ""
+msgstr "Corpo de Encaixe A"
#: editor/spatial_editor_gizmos.cpp
msgid "Joint Body B"
-msgstr ""
+msgstr "Corpo de Encaixe B"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Edge"
-msgstr ""
+msgstr "Canto da Sala"
#: editor/spatial_editor_gizmos.cpp
msgid "Room Overlap"
-msgstr ""
+msgstr "Intercessão de Quarto"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Room Point Position"
@@ -16294,11 +16122,11 @@ msgstr "Definir Margem"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Edge"
-msgstr ""
+msgstr "Canto do Portal"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Arrow"
-msgstr ""
+msgstr "Seta do Portal"
#: editor/spatial_editor_gizmos.cpp
msgid "Set Portal Point Position"
@@ -16306,7 +16134,7 @@ msgstr "Definir Posição Do Ponto Do Portal"
#: editor/spatial_editor_gizmos.cpp
msgid "Portal Front"
-msgstr ""
+msgstr "Frente do Portal"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
@@ -16354,12 +16182,12 @@ msgstr "Criar Polígono de Oclusão"
#: main/main.cpp
msgid "Godot Physics"
-msgstr ""
+msgstr "Godot Physics"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
msgid "Use BVH"
-msgstr ""
+msgstr "Usar BVH"
#: main/main.cpp servers/physics_2d/physics_2d_server_sw.cpp
#: servers/visual/visual_server_scene.cpp
@@ -16382,37 +16210,36 @@ msgid "RID Pool Prealloc"
msgstr ""
#: main/main.cpp
-#, fuzzy
msgid "Debugger stdout"
-msgstr "Depurador"
+msgstr "Depurador stdout"
#: main/main.cpp
msgid "Max Chars Per Second"
-msgstr ""
+msgstr "Máximo de Caracteres por Segundo"
#: main/main.cpp
msgid "Max Messages Per Frame"
-msgstr ""
+msgstr "Máximo de Mensagens por Quadro"
#: main/main.cpp
msgid "Max Errors Per Second"
-msgstr ""
+msgstr "Máximo de Erros por Segundo"
#: main/main.cpp
msgid "Max Warnings Per Second"
-msgstr ""
+msgstr "Máximo de Alertas Por Segundo"
#: main/main.cpp
msgid "Flush stdout On Print"
-msgstr ""
+msgstr "Limpar stdout ao Fazer Print"
#: main/main.cpp servers/visual_server.cpp
msgid "Logging"
-msgstr ""
+msgstr "Registrando Log"
#: main/main.cpp
msgid "File Logging"
-msgstr ""
+msgstr "Registrando Log de Arquivos"
#: main/main.cpp
#, fuzzy
@@ -16426,11 +16253,11 @@ msgstr "Copiar Caminho"
#: main/main.cpp
msgid "Max Log Files"
-msgstr ""
+msgstr "Máximo Log de Arquivos"
#: main/main.cpp
msgid "Driver"
-msgstr ""
+msgstr "Driver"
#: main/main.cpp
msgid "Driver Name"
@@ -16438,41 +16265,39 @@ msgstr "Nome do Driver"
#: main/main.cpp
msgid "Fallback To GLES2"
-msgstr ""
+msgstr "Utilizar GLES2 Como Fallback"
#: main/main.cpp
msgid "Use Nvidia Rect Flicker Workaround"
-msgstr ""
+msgstr "Utilizar a Gambiarra \"Nvidia Rect Flicker\""
#: main/main.cpp
msgid "DPI"
-msgstr ""
+msgstr "DPI"
#: main/main.cpp
msgid "Allow hiDPI"
-msgstr ""
+msgstr "Permitir hiDPI"
#: main/main.cpp
-#, fuzzy
msgid "V-Sync"
-msgstr "Sincronizar"
+msgstr "Sincronização Vertical (V-Sync)"
#: main/main.cpp
-#, fuzzy
msgid "Use V-Sync"
-msgstr "Use Encaixar"
+msgstr "Usar Sincronização Vertical (V-Sync)"
#: main/main.cpp
msgid "Per Pixel Transparency"
-msgstr ""
+msgstr "Transparência por Pixel"
#: main/main.cpp
msgid "Allowed"
-msgstr ""
+msgstr "Permitido"
#: main/main.cpp
msgid "Intended Usage"
-msgstr ""
+msgstr "Intenção de Uso"
#: main/main.cpp
#, fuzzy
@@ -16480,13 +16305,12 @@ msgid "Framebuffer Allocation"
msgstr "Seleção de Frame"
#: main/main.cpp platform/uwp/os_uwp.cpp
-#, fuzzy
msgid "Energy Saving"
-msgstr "Erro ao salvar"
+msgstr "Economia de Energia"
#: main/main.cpp
msgid "Threads"
-msgstr ""
+msgstr "Threads"
#: main/main.cpp servers/physics_2d/physics_2d_server_wrap_mt.h
#, fuzzy
@@ -16499,19 +16323,17 @@ msgstr ""
#: main/main.cpp
msgid "Handheld"
-msgstr ""
+msgstr "Portátil (Handheld)"
#: main/main.cpp platform/javascript/export/export.cpp
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Orientation"
-msgstr "Documentação Online"
+msgstr "Orientação"
#: 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 "Comunidade"
+msgstr "Comum"
#: main/main.cpp
#, fuzzy
@@ -16519,27 +16341,26 @@ msgid "Physics FPS"
msgstr "Frame de Física %"
#: main/main.cpp
-#, fuzzy
msgid "Force FPS"
-msgstr "Forçar Push"
+msgstr "Forçar FPS"
#: main/main.cpp
msgid "Enable Pause Aware Picking"
-msgstr ""
+msgstr "Habilitar Escolha que é Ciente à Pausas"
#: 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 (Interface Gráfica de Usuário)"
#: main/main.cpp
msgid "Drop Mouse On GUI Input Disabled"
-msgstr ""
+msgstr "Desabilitar Mouse quando GUI Input estiver Desabilitad"
#: main/main.cpp
msgid "stdout"
-msgstr ""
+msgstr "stdout"
#: main/main.cpp
msgid "Print FPS"
@@ -16547,7 +16368,7 @@ msgstr ""
#: main/main.cpp
msgid "Verbose stdout"
-msgstr ""
+msgstr "stdout Verboso"
#: main/main.cpp scene/main/scene_tree.cpp scene/resources/multimesh.cpp
#, fuzzy
@@ -16555,9 +16376,8 @@ msgid "Physics Interpolation"
msgstr "Modo de Interpolação"
#: main/main.cpp
-#, fuzzy
msgid "Enable Warnings"
-msgstr "Habilitar Filtragem"
+msgstr "Habilitar Avisos"
#: main/main.cpp
#, fuzzy
@@ -16566,19 +16386,19 @@ msgstr "Seleção de Frame"
#: main/main.cpp
msgid "Low Processor Mode"
-msgstr ""
+msgstr "Modo Processamento Baixo"
#: main/main.cpp
msgid "Delta Sync After Draw"
-msgstr ""
+msgstr "Sincronizar Delta Após o Draw"
#: main/main.cpp
msgid "iOS"
-msgstr ""
+msgstr "iOS"
#: main/main.cpp
msgid "Hide Home Indicator"
-msgstr ""
+msgstr "Esconder Indicador de Home"
#: main/main.cpp
#, fuzzy
@@ -16592,16 +16412,15 @@ msgstr "Ponto"
#: main/main.cpp
msgid "Touch Delay"
-msgstr ""
+msgstr "Atraso de Touch"
#: main/main.cpp servers/visual_server.cpp
msgid "GLES3"
-msgstr ""
+msgstr "GLES3"
#: main/main.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Shaders"
-msgstr "Shader"
+msgstr "Shaders"
#: main/main.cpp
#, fuzzy
@@ -16611,30 +16430,28 @@ msgstr "Forçar Fallbacks do Shader"
#: 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 "Visualizar Ambiente"
+msgstr "Ambiente"
#: main/main.cpp
msgid "Default Clear Color"
-msgstr ""
+msgstr "Cor de Limpeza Padrão"
#: main/main.cpp
msgid "Boot Splash"
-msgstr ""
+msgstr "Imagem de Exibição ao Iniciar"
#: main/main.cpp
-#, fuzzy
msgid "Show Image"
-msgstr "Mostrar Ossos"
+msgstr "Mostrar Imagem"
#: main/main.cpp
msgid "Image"
-msgstr ""
+msgstr "Imagem"
#: main/main.cpp
msgid "Fullsize"
-msgstr ""
+msgstr "Tamanho Inteiro"
#: main/main.cpp scene/resources/dynamic_font.cpp
msgid "Use Filter"
@@ -16646,13 +16463,12 @@ msgid "BG Color"
msgstr "Cores"
#: main/main.cpp
-#, fuzzy
msgid "macOS Native Icon"
-msgstr "Definir ícone de telha"
+msgstr "Ãcone Nativo macOS"
#: main/main.cpp
msgid "Windows Native Icon"
-msgstr ""
+msgstr "Ãcone Windows Nativo"
#: main/main.cpp
msgid "Buffering"
@@ -16660,29 +16476,27 @@ msgstr ""
#: main/main.cpp
msgid "Agile Event Flushing"
-msgstr ""
+msgstr "Limpeza de Eventos Agil"
#: main/main.cpp
msgid "Emulate Touch From Mouse"
-msgstr ""
+msgstr "Simular Toque à Partir do Mouse"
#: main/main.cpp
msgid "Emulate Mouse From Touch"
-msgstr ""
+msgstr "Simular Mouse à Partir do Touch"
#: main/main.cpp
-#, fuzzy
msgid "Mouse Cursor"
-msgstr "Botão do Mouse"
+msgstr "Cursor do Mouse"
#: main/main.cpp
-#, fuzzy
msgid "Custom Image"
-msgstr "Recortar Nós"
+msgstr "Imagem Personalizada"
#: main/main.cpp
msgid "Custom Image Hotspot"
-msgstr ""
+msgstr "Imagem Personalizada de Hotspot"
#: main/main.cpp
msgid "Tooltip Position Offset"
@@ -16694,9 +16508,8 @@ msgid "Debugger Agent"
msgstr "Depurador"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
-#, fuzzy
msgid "Wait For Debugger"
-msgstr "Depurador"
+msgstr "Esperar pelo Depurador"
#: main/main.cpp modules/mono/mono_gd/gd_mono.cpp
msgid "Wait Timeout"
@@ -16704,11 +16517,11 @@ msgstr "Tempo Limite de Espera"
#: main/main.cpp
msgid "Runtime"
-msgstr ""
+msgstr "Tempo de Execução"
#: main/main.cpp
msgid "Unhandled Exception Policy"
-msgstr ""
+msgstr "Politica de Tratamento Exceções"
#: main/main.cpp
#, fuzzy
@@ -16717,22 +16530,20 @@ msgstr "Localizar Tipo de Nó"
#: main/main.cpp scene/gui/texture_progress.cpp
#: scene/gui/viewport_container.cpp
-#, fuzzy
msgid "Stretch"
-msgstr "Buscar"
+msgstr "Esticar"
#: main/main.cpp
-#, fuzzy
msgid "Aspect"
-msgstr "Inspetor"
+msgstr "Aspecto"
#: main/main.cpp
msgid "Shrink"
-msgstr ""
+msgstr "Encolher"
#: main/main.cpp scene/main/scene_tree.cpp
msgid "Auto Accept Quit"
-msgstr ""
+msgstr "Aceitar Sair Automaticamente"
#: main/main.cpp scene/main/scene_tree.cpp
#, fuzzy
@@ -16746,15 +16557,15 @@ msgstr "Encaixar nos Lados do Nó"
#: main/main.cpp
msgid "Dynamic Fonts"
-msgstr ""
+msgstr "Fontes Dinâmicas"
#: main/main.cpp
msgid "Use Oversampling"
-msgstr ""
+msgstr "Utilizar Oversampling"
#: modules/bullet/register_types.cpp modules/bullet/space_bullet.cpp
msgid "Active Soft World"
-msgstr ""
+msgstr "Ativar Mundo Macio"
#: modules/csg/csg_gizmos.cpp
msgid "CSG"
@@ -16777,35 +16588,30 @@ msgid "Change Torus Outer Radius"
msgstr "Alterar Raio Externo do Toro"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Operation"
-msgstr "Opções"
+msgstr "Operação"
#: modules/csg/csg_shape.cpp
msgid "Calculate Tangents"
-msgstr ""
+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 Maíusculas/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
@@ -16823,14 +16629,12 @@ msgid "Radial Segments"
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 "Passo suave"
+msgstr "Suavizar Faces"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16839,7 +16643,7 @@ msgstr "Mostrar Guias"
#: modules/csg/csg_shape.cpp
msgid "Cone"
-msgstr ""
+msgstr "Cone"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16853,27 +16657,25 @@ msgstr "Alterar Raio Externo do Toro"
#: modules/csg/csg_shape.cpp
msgid "Ring Sides"
-msgstr ""
+msgstr "Lados de 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"
-msgstr ""
+msgstr "Graus de Rotação"
#: modules/csg/csg_shape.cpp
msgid "Spin Sides"
-msgstr ""
+msgstr "Lados de Rotação"
#: modules/csg/csg_shape.cpp
-#, fuzzy
msgid "Path Node"
-msgstr "Colar Nós"
+msgstr "Caminho do Nó"
#: modules/csg/csg_shape.cpp
#, fuzzy
@@ -16882,11 +16684,11 @@ msgstr "Criar Vertex Interno"
#: modules/csg/csg_shape.cpp
msgid "Path Interval"
-msgstr ""
+msgstr "Intervalo de Caminho"
#: modules/csg/csg_shape.cpp
msgid "Path Simplify Angle"
-msgstr ""
+msgstr "Ângulo de Simplificação de Caminho"
#: modules/csg/csg_shape.cpp
msgid "Path Rotation"
@@ -16911,58 +16713,52 @@ msgid "Path Joined"
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 "Alteração de 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 "Sempre Mostrar Grade"
+msgstr "Sempre Ordenado"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "Server Relay"
-msgstr ""
+msgstr "Retransmissor de Servidor"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Verify"
-msgstr ""
+msgstr "Virificar DTLS"
#: modules/enet/networked_multiplayer_enet.cpp
msgid "DTLS Hostname"
-msgstr ""
+msgstr "Nome de Host DTLS"
#: modules/enet/networked_multiplayer_enet.cpp
-#, fuzzy
msgid "Use DTLS"
-msgstr "Use Encaixar"
+msgstr "Usar 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 "Utilizar FBX"
#: modules/gdnative/gdnative.cpp
msgid "Config File"
msgstr "Arquivo 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
@@ -16975,9 +16771,8 @@ msgid "Symbol Prefix"
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
@@ -17042,9 +16837,8 @@ msgid "Script Class"
msgstr "Classe do Script"
#: modules/gdnative/nativescript/nativescript.cpp
-#, fuzzy
msgid "Icon Path"
-msgstr "Habilitar"
+msgstr "Caminho para Ãcone"
#: modules/gdnative/register_types.cpp
msgid "GDNative"
@@ -17057,7 +16851,7 @@ msgstr "GDScript"
#: modules/gdscript/editor/gdscript_highlighter.cpp
msgid "Function Definition Color"
-msgstr ""
+msgstr "Cor de Definição de Função"
#: modules/gdscript/editor/gdscript_highlighter.cpp
#, fuzzy
@@ -17066,19 +16860,19 @@ msgstr "Copiar Caminho do Nó"
#: modules/gdscript/gdscript.cpp modules/visual_script/visual_script.cpp
msgid "Max Call Stack"
-msgstr ""
+msgstr "Tamanho Máximo da Pilha de Chamadas de Função"
#: modules/gdscript/gdscript.cpp
msgid "Treat Warnings As Errors"
-msgstr ""
+msgstr "Trate Alertas como Erros"
#: modules/gdscript/gdscript.cpp
msgid "Exclude Addons"
-msgstr ""
+msgstr "Excluir Addons"
#: modules/gdscript/gdscript.cpp
msgid "Autocomplete Setters And Getters"
-msgstr ""
+msgstr "Auto Completar Setters e Getters"
#: modules/gdscript/gdscript_functions.cpp
msgid "Step argument is zero!"
@@ -17129,11 +16923,11 @@ msgstr "Não foi possível resolver"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Show Native Symbols In Editor"
-msgstr ""
+msgstr "Exibir Simbolos Nativos no Editor"
#: modules/gdscript/language_server/gdscript_language_server.cpp
msgid "Use Thread"
-msgstr ""
+msgstr "Utilize Thread"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
msgid "Export Mesh GLTF2"
@@ -17153,9 +16947,8 @@ msgid "Byte Offset"
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
@@ -17167,14 +16960,12 @@ msgid "Count"
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 "Misturar"
+msgstr "Max"
#: modules/gltf/gltf_accessor.cpp
#, fuzzy
@@ -17216,9 +17007,8 @@ msgid "Byte Stride"
msgstr ""
#: modules/gltf/gltf_buffer_view.cpp
-#, fuzzy
msgid "Indices"
-msgstr "Todos os dispositivos"
+msgstr "Ãndices"
#: modules/gltf/gltf_camera.cpp
msgid "FOV Size"
@@ -17241,19 +17031,17 @@ 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
msgid "Intensity"
-msgstr ""
+msgstr "Intensidade"
#: modules/gltf/gltf_light.cpp scene/2d/light_2d.cpp scene/3d/light.cpp
-#, fuzzy
msgid "Range"
-msgstr "Alterar"
+msgstr "Intervalo"
#: modules/gltf/gltf_light.cpp
msgid "Inner Cone Angle"
@@ -17284,35 +17072,31 @@ msgstr "Plataforma"
#: modules/gltf/gltf_node.cpp scene/3d/mesh_instance.cpp
msgid "Skin"
-msgstr ""
+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"
-msgstr ""
+msgstr "Raízes"
#: modules/gltf/gltf_skeleton.cpp modules/gltf/gltf_state.cpp
msgid "Unique Names"
-msgstr ""
+msgstr "Nomes Únicos"
#: modules/gltf/gltf_skeleton.cpp
-#, fuzzy
msgid "Godot Bone Node"
-msgstr "Nó TimeSeek"
+msgstr "Nó de Osso Godot"
#: modules/gltf/gltf_skin.cpp
#, fuzzy
@@ -17320,9 +17104,8 @@ msgid "Skin Root"
msgstr "Nova Raiz de Cena"
#: modules/gltf/gltf_skin.cpp
-#, fuzzy
msgid "Joints Original"
-msgstr "Origem do Foco"
+msgstr "Pontos Originais"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
@@ -17367,12 +17150,11 @@ msgstr ""
#: modules/gltf/gltf_state.cpp
msgid "Json"
-msgstr ""
+msgstr "Json"
#: modules/gltf/gltf_state.cpp
-#, fuzzy
msgid "Major Version"
-msgstr "Versão"
+msgstr "Versão Importante"
#: modules/gltf/gltf_state.cpp
#, fuzzy
@@ -17402,28 +17184,25 @@ msgid "Scene Name"
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"
-msgstr ""
+msgstr "Imagens"
#: modules/gltf/gltf_state.cpp
msgid "Cameras"
-msgstr ""
+msgstr "Câmeras"
#: modules/gltf/gltf_state.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Lights"
-msgstr "Luz"
+msgstr "Luzes"
#: modules/gltf/gltf_state.cpp
msgid "Unique Animation Names"
@@ -17434,9 +17213,8 @@ msgid "Skeletons"
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
msgid "Animations"
@@ -17463,7 +17241,7 @@ msgstr "Faça mapas de luz"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
msgid "Cell"
-msgstr ""
+msgstr "Célula"
#: modules/gridmap/grid_map.cpp
#, fuzzy
@@ -17471,25 +17249,22 @@ msgid "Octant Size"
msgstr "Visão Frontal"
#: 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
#: scene/resources/material.cpp
msgid "Mask"
-msgstr ""
+msgstr "Máscara"
#: modules/gridmap/grid_map.cpp scene/2d/tile_map.cpp
#, fuzzy
@@ -17500,9 +17275,8 @@ msgstr "Navegação"
#: 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"
@@ -17804,7 +17578,7 @@ msgstr "Pronto!"
#: modules/opensimplex/noise_texture.cpp
msgid "Seamless"
-msgstr ""
+msgstr "Sem Emenda"
#: modules/opensimplex/noise_texture.cpp
msgid "As Normal Map"
@@ -17824,7 +17598,7 @@ msgstr "Deslocamento do Ruído"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Octaves"
-msgstr ""
+msgstr "Oitavas"
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Period"
@@ -17841,7 +17615,7 @@ msgstr ""
#: modules/regex/regex.cpp
msgid "Subject"
-msgstr ""
+msgstr "Sujeito"
#: modules/regex/regex.cpp
#, fuzzy
@@ -18293,7 +18067,7 @@ msgstr "Iterador"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "for (elem) in (input):"
-msgstr ""
+msgstr "para (elem) em (input):"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable:"
@@ -18327,7 +18101,7 @@ msgstr "Switch"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "'input' is:"
-msgstr ""
+msgstr "'input' é:"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Type Cast"
@@ -18579,7 +18353,7 @@ msgstr "Chamadas"
#: 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
#, fuzzy
@@ -18658,7 +18432,7 @@ msgstr "Modo Prioridade"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
#, fuzzy
@@ -18892,7 +18666,7 @@ msgstr "Inspecionar a Instância Anterior"
#: platform/android/export/export_plugin.cpp
msgid "Code"
-msgstr ""
+msgstr "Código"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -18985,7 +18759,7 @@ msgstr "Interface de Usuário"
#: platform/android/export/export_plugin.cpp
msgid "Allow"
-msgstr ""
+msgstr "Permitir"
#: platform/android/export/export_plugin.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -19003,7 +18777,7 @@ msgstr "Expressão"
#: platform/android/export/export_plugin.cpp
msgid "Salt"
-msgstr ""
+msgstr "Sal"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -19298,10 +19072,8 @@ msgstr ""
"do projeto"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Could not export project files to gradle project."
-msgstr ""
-"Não foi possível exportar os arquivos do projeto ao projeto do gradle\n"
+msgstr "Não foi possível exportar os arquivos do projeto ao projeto do gradle"
#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
@@ -19385,19 +19157,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"
@@ -19405,31 +19177,31 @@ 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"
@@ -19466,7 +19238,7 @@ msgstr ""
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Info"
-msgstr ""
+msgstr "Informação"
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier"
@@ -19536,23 +19308,23 @@ msgstr "Descrições da Propriedade"
#: 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"
@@ -19636,14 +19408,12 @@ msgid "Could not open template for export: \"%s\"."
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 "Template 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 "Não foi possível escrever o arquivo:"
+msgstr "Não foi possível escrever o arquivo: \"%s\"."
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -19656,7 +19426,7 @@ msgstr "Não foi possível ler o arquivo: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "PWA"
-msgstr ""
+msgstr "PWA"
#: platform/javascript/export/export.cpp
msgid "Variant"
@@ -19674,15 +19444,15 @@ msgstr "Expressão"
#: platform/javascript/export/export.cpp
msgid "For Desktop"
-msgstr ""
+msgstr "Para Desktop"
#: platform/javascript/export/export.cpp
msgid "For Mobile"
-msgstr ""
+msgstr "Para Mobile"
#: platform/javascript/export/export.cpp
msgid "HTML"
-msgstr ""
+msgstr "HTML"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19703,8 +19473,9 @@ msgid "Canvas Resize Policy"
msgstr ""
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Focus Canvas On Start"
-msgstr ""
+msgstr "Focar Canvas ao Iniciar"
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -19713,11 +19484,11 @@ msgstr "Filtrar sinais"
#: platform/javascript/export/export.cpp
msgid "Progressive Web App"
-msgstr ""
+msgstr "Progressive Web App"
#: platform/javascript/export/export.cpp
msgid "Offline Page"
-msgstr ""
+msgstr "Página Offline"
#: platform/javascript/export/export.cpp
msgid "Icon 144 X 144"
@@ -19736,9 +19507,8 @@ msgid "Could not read HTML shell: \"%s\"."
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 "Não foi possível criar o diretório do servidor HTTP:"
+msgstr "Não foi possível criar o diretório do servidor HTTP: \"%s\"."
#: platform/javascript/export/export.cpp
msgid "Error starting HTTP server: %d."
@@ -19746,7 +19516,7 @@ msgstr "Erro ao iniciar o servidor HTTP: %d."
#: platform/javascript/export/export.cpp
msgid "Web"
-msgstr ""
+msgstr "Web"
#: platform/javascript/export/export.cpp
msgid "HTTP Host"
@@ -19763,7 +19533,7 @@ msgstr "Use Encaixar"
#: platform/javascript/export/export.cpp
msgid "SSL Key"
-msgstr ""
+msgstr "Chave SSL"
#: platform/osx/export/codesign.cpp
msgid "Can't get filesystem access."
@@ -19803,7 +19573,7 @@ msgstr "Caminho base inválido."
#: platform/osx/export/codesign.cpp
msgid "Already signed!"
-msgstr ""
+msgstr "Já assinado!"
#: platform/osx/export/codesign.cpp
#, fuzzy
@@ -19843,7 +19613,7 @@ msgstr ""
#: platform/osx/export/codesign.cpp
msgid "Unknown object type."
-msgstr ""
+msgstr "Tipo de objeto desconhecido."
#: platform/osx/export/export.cpp
msgid "App Category"
@@ -19851,7 +19621,7 @@ msgstr "Categoria do Aplicativo"
#: platform/osx/export/export.cpp
msgid "High Res"
-msgstr ""
+msgstr "Alta Resolução"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19931,7 +19701,7 @@ msgstr "Recortar Nós"
#: 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"
@@ -19953,7 +19723,7 @@ msgstr "Adicionar Entrada"
#: platform/osx/export/export.cpp
msgid "Address Book"
-msgstr ""
+msgstr "Contatos"
#: platform/osx/export/export.cpp
msgid "Calendars"
@@ -19995,7 +19765,7 @@ msgstr "Dispositivo"
#: platform/osx/export/export.cpp
msgid "Device Bluetooth"
-msgstr ""
+msgstr "Bluetooth do Dispositivo"
#: platform/osx/export/export.cpp
#, fuzzy
@@ -20067,6 +19837,8 @@ msgid ""
"You can check progress manually by opening a Terminal and running the "
"following command:"
msgstr ""
+"Você pode verificar o progresso manualmente abrindo um Terminal e rodando o "
+"seguinte comando:"
#: platform/osx/export/export.cpp
msgid ""
@@ -20096,6 +19868,8 @@ 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
@@ -20156,7 +19930,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making PKG"
-msgstr ""
+msgstr "Criando PKG"
#: platform/osx/export/export.cpp
msgid ""
@@ -20170,7 +19944,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making DMG"
-msgstr ""
+msgstr "Criando DMG"
#: platform/osx/export/export.cpp
msgid "Code signing DMG"
@@ -20178,7 +19952,7 @@ msgstr ""
#: platform/osx/export/export.cpp
msgid "Making ZIP"
-msgstr ""
+msgstr "Criando ZIP"
#: platform/osx/export/export.cpp
msgid ""
@@ -20341,7 +20115,7 @@ msgstr "Nome Curto"
#: platform/uwp/export/export.cpp
msgid "Publisher"
-msgstr ""
+msgstr "Publicadora"
#: platform/uwp/export/export.cpp
msgid "Publisher Display Name"
@@ -20389,7 +20163,7 @@ msgstr "Revisão"
#: platform/uwp/export/export.cpp
msgid "Landscape"
-msgstr ""
+msgstr "Paisagem"
#: platform/uwp/export/export.cpp
#, fuzzy
@@ -20398,11 +20172,11 @@ msgstr "Inverter Horizontalmente"
#: 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
@@ -20504,7 +20278,7 @@ msgstr "Dimensões inválidas da tela de abertura (deve ser 620x300)."
#: platform/uwp/export/export.cpp
msgid "UWP"
-msgstr ""
+msgstr "UWP"
#: platform/uwp/export/export.cpp platform/windows/export/export.cpp
#, fuzzy
@@ -20521,13 +20295,13 @@ msgid "Debug Algorithm"
msgstr "Depurador"
#: platform/windows/export/export.cpp
-#, fuzzy
msgid "Failed to rename temporary file \"%s\"."
-msgstr "Não é possível remover o arquivo temporário:"
+msgstr "Falha ao renomear arquivo temporário \"%s\"."
#: platform/windows/export/export.cpp
+#, fuzzy
msgid "Identity Type"
-msgstr ""
+msgstr "Tipo de Identidade"
#: platform/windows/export/export.cpp
msgid "Timestamp Server URL"
@@ -20567,7 +20341,7 @@ msgstr "Descrição"
#: platform/windows/export/export.cpp
msgid "Trademarks"
-msgstr ""
+msgstr "Marca Registrada (Trademarks)"
#: platform/windows/export/export.cpp
#, fuzzy
@@ -20673,7 +20447,7 @@ msgstr "Nova Janela"
#: platform/windows/export/export.cpp
msgid "Rcedit"
-msgstr ""
+msgstr "Rcedit"
#: platform/windows/export/export.cpp
msgid "Osslsigncode"
@@ -20872,7 +20646,7 @@ msgstr "Modo de Movimentação"
#: 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
@@ -21172,7 +20946,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 "Desenhando"
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
#: scene/3d/cpu_particles.cpp scene/3d/particles.cpp
@@ -21183,7 +20957,7 @@ msgstr "Projetos 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
@@ -21240,7 +21014,7 @@ msgstr "Velocidade"
#: 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
@@ -21309,7 +21083,7 @@ msgstr "Dvidir 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
@@ -21435,7 +21209,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
@@ -21471,7 +21245,7 @@ msgstr "Região da Textura"
#: 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"
@@ -21549,7 +21323,7 @@ msgstr "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
@@ -21894,7 +21668,7 @@ msgstr ""
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
msgid "Mass"
-msgstr ""
+msgstr "Massa"
#: scene/2d/physics_body_2d.cpp
msgid "Inertia"
@@ -21943,7 +21717,7 @@ 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"
@@ -22056,15 +21830,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."
@@ -22306,15 +22080,15 @@ msgstr "Nó de Animação"
#: 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"
@@ -22362,7 +22136,7 @@ msgstr "Empacotando"
#: 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"
@@ -22413,7 +22187,7 @@ 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
@@ -22512,7 +22286,7 @@ 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
@@ -22764,9 +22538,8 @@ msgid "Font"
msgstr "Fontes"
#: 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
@@ -22877,6 +22650,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
@@ -23131,15 +22906,15 @@ 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
@@ -23456,7 +23231,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
@@ -23563,7 +23338,7 @@ 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
@@ -23789,7 +23564,7 @@ msgstr "Manter Transformação Global"
#: scene/3d/spatial.cpp
msgid "Matrix"
-msgstr ""
+msgstr "Matriz"
#: scene/3d/spatial.cpp
#, fuzzy
@@ -23807,7 +23582,7 @@ 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
msgid "Transparent"
@@ -23906,9 +23681,8 @@ msgid "Cast Shadow"
msgstr "Criar Nó Shader"
#: scene/3d/visual_instance.cpp
-#, fuzzy
msgid "Extra Cull Margin"
-msgstr "Argumentos de Chamada Extras:"
+msgstr "Margem de Descarte Extra"
#: scene/3d/visual_instance.cpp
#, fuzzy
@@ -23930,9 +23704,8 @@ msgstr ""
#: scene/3d/visual_instance.cpp scene/animation/skeleton_ik.cpp
#: scene/resources/material.cpp
-#, fuzzy
msgid "Min Distance"
-msgstr "Escolha uma Distância:"
+msgstr "Distância Mínima"
#: scene/3d/visual_instance.cpp
msgid "Min Hysteresis"
@@ -23979,33 +23752,28 @@ msgid "Mix Mode"
msgstr "Nó Mix"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Fadein Time"
-msgstr "Tempo do X-Fade (s):"
+msgstr "Tempo de Esmaecer de Entrada"
#: scene/animation/animation_blend_tree.cpp
-#, fuzzy
msgid "Fadeout Time"
-msgstr "Tempo do 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
@@ -24029,9 +23797,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 do X-Fade (s):"
+msgstr "Tempo do Esmaecer Cruzado"
#: scene/animation/animation_node_state_machine.cpp
#, fuzzy
@@ -24064,7 +23831,7 @@ msgstr "Adicionar Animação"
#: scene/animation/animation_player.cpp
msgid "Reset On Save"
-msgstr ""
+msgstr "Redefinir ao Salvar"
#: scene/animation/animation_player.cpp
#, fuzzy
@@ -24077,9 +23844,8 @@ msgid "Current Animation Position"
msgstr "Adicionar ponto de 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
@@ -24122,9 +23888,8 @@ msgid "The AnimationPlayer root node is not a valid node."
msgstr "O nó raiz do 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
@@ -24234,7 +23999,7 @@ msgstr "Modo de Seleção"
#: scene/gui/aspect_ratio_container.cpp scene/gui/box_container.cpp
msgid "Alignment"
-msgstr ""
+msgstr "Alinhamento"
#: scene/gui/base_button.cpp
#, fuzzy
@@ -24272,11 +24037,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
@@ -24380,14 +24145,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 "Deslocamento da Grade:"
+msgstr "Deslocamento do Pivô"
#: scene/gui/control.cpp
#, fuzzy
@@ -24435,7 +24198,7 @@ msgstr "Anterior"
#: scene/gui/control.cpp
msgid "Mouse"
-msgstr ""
+msgstr "Mouse"
#: scene/gui/control.cpp
msgid "Default Cursor Shape"
@@ -24461,7 +24224,7 @@ msgstr "Propriedades do Tema"
#: scene/gui/dialogs.cpp
msgid "Window Title"
-msgstr ""
+msgstr "Título da Janela"
#: scene/gui/dialogs.cpp
#, fuzzy
@@ -24495,14 +24258,12 @@ msgid "Right Disconnects"
msgstr "Desconectar"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Scroll Offset"
-msgstr "Deslocamento da Grade:"
+msgstr "Deslocamento da Rolagem"
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Snap Distance"
-msgstr "Escolha uma Distância:"
+msgstr "Distância de Encaixe"
#: scene/gui/graph_edit.cpp
#, fuzzy
@@ -24527,7 +24288,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."
@@ -24600,9 +24361,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
@@ -24615,9 +24375,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
@@ -24641,9 +24400,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"
@@ -24704,16 +24462,15 @@ msgstr ""
#: 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
@@ -24796,9 +24553,8 @@ msgid "Allow Search"
msgstr "Pesquisar"
#: scene/gui/progress_bar.cpp
-#, fuzzy
msgid "Percent"
-msgstr "Recente:"
+msgstr "Porcentagem"
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
@@ -24858,9 +24614,8 @@ msgid "Absolute Index"
msgstr "Auto Recuar"
#: scene/gui/rich_text_effect.cpp
-#, fuzzy
msgid "Elapsed Time"
-msgstr "Tempos de Mistura:"
+msgstr "Tempo Decorrido"
#: scene/gui/rich_text_effect.cpp
#, fuzzy
@@ -24868,9 +24623,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"
@@ -24881,9 +24635,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
@@ -24904,9 +24657,8 @@ msgid "Selection Enabled"
msgstr "Selecionar Apenas"
#: 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
@@ -24934,9 +24686,8 @@ msgid "Follow Focus"
msgstr "Popular Superfície"
#: scene/gui/scroll_container.cpp
-#, fuzzy
msgid "Horizontal Enabled"
-msgstr "Horizontal:"
+msgstr "Horizontal Habilitado"
#: scene/gui/scroll_container.cpp
#, fuzzy
@@ -24957,24 +24708,20 @@ msgid "Tick Count"
msgstr "Escolher Cor"
#: scene/gui/slider.cpp
-#, fuzzy
msgid "Ticks On Borders"
-msgstr "Renomear pasta:"
+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 "Deslocamento da Grade:"
+msgstr "Deslocamento de Divisão"
#: scene/gui/split_container.cpp scene/gui/tree.cpp
#, fuzzy
@@ -24991,9 +24738,8 @@ msgid "Tab Align"
msgstr ""
#: scene/gui/tab_container.cpp scene/gui/tabs.cpp
-#, fuzzy
msgid "Current Tab"
-msgstr "Atual:"
+msgstr "Aba Atual"
#: scene/gui/tab_container.cpp
#, fuzzy
@@ -25035,9 +24781,8 @@ msgid "Breakpoint Gutter"
msgstr "Pular Breakpoints"
#: scene/gui/text_edit.cpp
-#, fuzzy
msgid "Fold Gutter"
-msgstr "Pasta:"
+msgstr "Espaçamento de Dobra"
#: scene/gui/text_edit.cpp
#, fuzzy
@@ -25055,19 +24800,16 @@ msgid "Wrap Enabled"
msgstr "Habilitar"
#: 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
@@ -25125,9 +24867,8 @@ msgid "Progress Offset"
msgstr ""
#: scene/gui/texture_progress.cpp
-#, fuzzy
msgid "Fill Mode"
-msgstr "Modo Panorâmico:"
+msgstr "Modo de Preenchimento"
#: scene/gui/texture_progress.cpp scene/resources/material.cpp
msgid "Tint"
@@ -25195,9 +24936,8 @@ msgid "Hide Folding"
msgstr "Botão Desativado"
#: scene/gui/tree.cpp
-#, fuzzy
msgid "Hide Root"
-msgstr "Criar nó raiz:"
+msgstr "Esconder Raiz"
#: scene/gui/tree.cpp
msgid "Drop Mode Flags"
@@ -25210,7 +24950,7 @@ msgstr "Adicionar Faixa"
#: 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
@@ -25295,19 +25035,16 @@ msgid "Filename"
msgstr "Renomear"
#: scene/main/node.cpp
-#, fuzzy
msgid "Owner"
-msgstr "Donos De:"
+msgstr "Dono"
#: scene/main/node.cpp scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer"
-msgstr "Definir Múltiplos:"
+msgstr "Multijogador"
#: scene/main/node.cpp
-#, fuzzy
msgid "Custom Multiplayer"
-msgstr "Definir Múltiplos:"
+msgstr "Multijogador Personalizado"
#: scene/main/node.cpp
#, fuzzy
@@ -25340,17 +25077,16 @@ msgstr "Nova Raiz de Cena"
#: scene/main/scene_tree.cpp
msgid "Root"
-msgstr ""
+msgstr "Raiz"
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid "Multiplayer Poll"
-msgstr "Definir Múltiplos:"
+msgstr ""
#: 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"
@@ -25384,9 +25120,8 @@ msgid "Reflections"
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"
@@ -25398,7 +25133,7 @@ msgstr ""
#: scene/main/scene_tree.cpp
msgid "Use FXAA"
-msgstr ""
+msgstr "Usar FXAA"
#: scene/main/scene_tree.cpp
msgid "Use Debanding"
@@ -25406,7 +25141,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"
@@ -25444,9 +25179,8 @@ msgstr ""
"Timer 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
@@ -25472,7 +25206,7 @@ msgstr ""
#: scene/main/viewport.cpp
msgid "ARVR"
-msgstr ""
+msgstr "ARVR"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25485,11 +25219,11 @@ 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
@@ -25503,7 +25237,7 @@ msgstr "Alterar Valor da Entrada"
#: scene/main/viewport.cpp
msgid "FXAA"
-msgstr ""
+msgstr "FXAA"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25521,8 +25255,9 @@ msgid "Keep 3D Linear"
msgstr "Linear Esquerda"
#: scene/main/viewport.cpp
+#, fuzzy
msgid "Render Direct To Screen"
-msgstr ""
+msgstr "Renderizar Diretamente para a Tela"
#: scene/main/viewport.cpp
#, fuzzy
@@ -25530,9 +25265,8 @@ msgid "Debug Draw"
msgstr "Depuração"
#: scene/main/viewport.cpp
-#, fuzzy
msgid "Render Target"
-msgstr "Renderizador:"
+msgstr "Alvo do Renderizador"
#: scene/main/viewport.cpp
msgid "V Flip"
@@ -25640,7 +25374,7 @@ msgstr "Navegação"
#: scene/register_scene_types.cpp
msgid "Use hiDPI"
-msgstr ""
+msgstr "Usar hiDPI"
#: scene/register_scene_types.cpp
#, fuzzy
@@ -25660,12 +25394,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
@@ -25678,7 +25411,7 @@ msgstr ""
#: scene/resources/default_theme/default_theme.cpp
msgid "Panel"
-msgstr ""
+msgstr "Painel"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25706,9 +25439,8 @@ msgid "Font Color Disabled"
msgstr "Corte Desabilitado"
#: 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
@@ -25717,7 +25449,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
@@ -25796,14 +25528,12 @@ msgid "Font Outline Modulate"
msgstr "Forçar Módulo Branco"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset X"
-msgstr "Deslocamento da Grade X:"
+msgstr "Deslocamento da Sombra em X"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Shadow Offset Y"
-msgstr "Deslocamento da Grade Y:"
+msgstr "Deslocamento da Sombra em Y"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -25861,14 +25591,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"
@@ -26036,9 +25764,8 @@ msgid "Font Color Separator"
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
@@ -26091,9 +25818,8 @@ msgid "Close Offset"
msgstr "Deslocamento do Ruído"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Port Offset"
-msgstr "Deslocamento da Grade:"
+msgstr "Deslocamento de Porta"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26203,14 +25929,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 "Deslocamento da Grade:"
+msgstr "Velocidade de Rolagem"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26218,9 +25942,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
@@ -26239,7 +25962,7 @@ msgstr "Item Desativado"
#: scene/resources/default_theme/default_theme.cpp
msgid "Menu"
-msgstr ""
+msgstr "Menu"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26280,9 +26003,8 @@ msgid "Large"
msgstr "Destino"
#: scene/resources/default_theme/default_theme.cpp
-#, fuzzy
msgid "Folder"
-msgstr "Pasta:"
+msgstr "Pasta"
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
@@ -26374,7 +26096,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
@@ -26382,14 +26104,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
@@ -26418,11 +26138,11 @@ msgstr "Auto Fatiar"
#: 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
@@ -26482,9 +26202,8 @@ msgid "Font Path"
msgstr "Habilitar"
#: scene/resources/dynamic_font.cpp
-#, fuzzy
msgid "Outline Size"
-msgstr "Tamanho do Contorno:"
+msgstr "Tamanho do Contorno"
#: scene/resources/dynamic_font.cpp
#, fuzzy
@@ -26497,14 +26216,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
@@ -26517,7 +26234,7 @@ msgstr ""
#: scene/resources/environment.cpp scene/resources/sky.cpp
msgid "Sky"
-msgstr ""
+msgstr "Céu"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26530,9 +26247,8 @@ msgid "Sky Orientation"
msgstr "Documentação Online"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sky Rotation"
-msgstr "Passo de Rotação:"
+msgstr "Rotação do Céu"
#: scene/resources/environment.cpp
msgid "Sky Rotation Degrees"
@@ -26561,14 +26277,12 @@ msgid "Fog"
msgstr "Névoa"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sun Color"
-msgstr "Armazenando Arquivo:"
+msgstr "Cor do Sol"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Sun Amount"
-msgstr "Quantidade:"
+msgstr "Quantidade do Sol"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26632,7 +26346,7 @@ msgstr "Exportação"
#: scene/resources/environment.cpp
msgid "White"
-msgstr ""
+msgstr "Branco"
#: scene/resources/environment.cpp
msgid "Auto Exposure"
@@ -26657,14 +26371,12 @@ msgid "Max Steps"
msgstr "Passo"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Fade In"
-msgstr "[i]Fade In[/i](s):"
+msgstr "Esmaecer de Entrada"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Fade Out"
-msgstr "[i]Fade Out[/i](s):"
+msgstr "Esmaecer de Saída"
#: scene/resources/environment.cpp
#, fuzzy
@@ -26677,12 +26389,11 @@ 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"
@@ -26700,7 +26411,7 @@ msgstr "Depuração do Canal UV"
#: scene/resources/environment.cpp
msgid "Blur"
-msgstr ""
+msgstr "Blur"
#: scene/resources/environment.cpp
msgid "Edge Sharpness"
@@ -26711,9 +26422,8 @@ msgid "DOF Far Blur"
msgstr ""
#: scene/resources/environment.cpp scene/resources/material.cpp
-#, fuzzy
msgid "Distance"
-msgstr "Escolha uma Distância:"
+msgstr "Distância"
#: scene/resources/environment.cpp
msgid "Transition"
@@ -26796,18 +26506,16 @@ msgid "Brightness"
msgstr "Luz"
#: scene/resources/environment.cpp
-#, fuzzy
msgid "Saturation"
-msgstr "Separação:"
+msgstr "Separação"
#: scene/resources/environment.cpp
msgid "Color Correction"
msgstr "Correção de Cor"
#: scene/resources/font.cpp
-#, fuzzy
msgid "Ascent"
-msgstr "Recente:"
+msgstr "Subida"
#: scene/resources/font.cpp
#, fuzzy
@@ -26820,9 +26528,8 @@ msgid "Raw Data"
msgstr "Profundidade"
#: scene/resources/gradient.cpp
-#, fuzzy
msgid "Offsets"
-msgstr "Deslocamento:"
+msgstr "Deslocamentos"
#: scene/resources/height_map_shape.cpp
msgid "Map Width"
@@ -26902,7 +26609,7 @@ msgstr ""
#: scene/resources/material.cpp
msgid "Is sRGB"
-msgstr ""
+msgstr "É sRGB"
#: scene/resources/material.cpp servers/visual_server.cpp
msgid "Parameters"
@@ -26948,9 +26655,8 @@ msgid "Grow"
msgstr "Crescer"
#: scene/resources/material.cpp
-#, fuzzy
msgid "Grow Amount"
-msgstr "Quantidade:"
+msgstr "Quantidade de Crescimento"
#: scene/resources/material.cpp
msgid "Use Alpha Scissor"
@@ -27105,7 +26811,7 @@ msgstr "Faça mapas de luz"
#: scene/resources/mesh.cpp scene/resources/primitive_meshes.cpp
msgid "Custom AABB"
-msgstr ""
+msgstr "AABB Personalizado"
#: scene/resources/mesh_library.cpp
#, fuzzy
@@ -27139,9 +26845,8 @@ msgid "Visible Instance Count"
msgstr ""
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sampling"
-msgstr "Escala:"
+msgstr "Mostragem"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27162,12 +26867,11 @@ 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"
@@ -27189,7 +26893,7 @@ msgstr "Fundir a partir de Cena"
#: scene/resources/navigation_mesh.cpp
msgid "Edges"
-msgstr ""
+msgstr "Arestas"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27206,9 +26910,8 @@ msgid "Details"
msgstr "Detalhe"
#: scene/resources/navigation_mesh.cpp
-#, fuzzy
msgid "Sample Distance"
-msgstr "Escolha uma Distância:"
+msgstr "Distância de Amostra"
#: scene/resources/navigation_mesh.cpp
#, fuzzy
@@ -27278,9 +26981,8 @@ msgid "Color Modifier"
msgstr "Modificador de velocidade lenta da Visão Livre"
#: 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"
@@ -27297,9 +26999,8 @@ msgid "Point Count"
msgstr "Adicionar porta de entrada"
#: scene/resources/particles_material.cpp
-#, fuzzy
msgid "Scale Random"
-msgstr "Razão de Escala:"
+msgstr "Randomização de Escala"
#: scene/resources/particles_material.cpp
#, fuzzy
@@ -27315,9 +27016,8 @@ msgid "Absorbent"
msgstr ""
#: scene/resources/plane_shape.cpp
-#, fuzzy
msgid "Plane"
-msgstr "Plano:"
+msgstr "Plano"
#: scene/resources/primitive_meshes.cpp
#, fuzzy
@@ -27341,9 +27041,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
@@ -27392,13 +27091,12 @@ 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"
-msgstr ""
+msgstr "Panorama"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27406,9 +27104,8 @@ msgid "Top Color"
msgstr "Próximo Chão"
#: scene/resources/sky.cpp
-#, fuzzy
msgid "Horizon Color"
-msgstr "Armazenando Arquivo:"
+msgstr "Cor do Horizonte"
#: scene/resources/sky.cpp
#, fuzzy
@@ -27432,7 +27129,7 @@ msgstr "Substituir"
#: scene/resources/sky.cpp
msgid "Longitude"
-msgstr ""
+msgstr "Longitude"
#: scene/resources/sky.cpp
msgid "Angle Min"
@@ -27467,7 +27164,7 @@ msgstr ""
#: scene/resources/style_box.cpp
msgid "Anti Aliasing"
-msgstr ""
+msgstr "Anti Aliasing"
#: scene/resources/style_box.cpp
msgid "Grow Begin"
@@ -27517,9 +27214,8 @@ msgid "Lossy Storage Quality"
msgstr "Capturar"
#: scene/resources/texture.cpp
-#, fuzzy
msgid "From"
-msgstr "Modo Panorâmico:"
+msgstr "À Partir de"
#: scene/resources/texture.cpp
#, fuzzy
@@ -27723,9 +27419,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
@@ -27741,21 +27436,21 @@ msgstr ""
#: 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
@@ -27770,23 +27465,22 @@ 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
#: servers/audio/effects/audio_effect_panner.cpp
-#, fuzzy
msgid "Pan"
-msgstr "Plano:"
+msgstr "Panoramizar"
#: 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
@@ -27823,7 +27517,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"
@@ -27831,7 +27525,7 @@ msgstr ""
#: servers/audio/effects/audio_effect_distortion.cpp
msgid "Drive"
-msgstr ""
+msgstr "Drive"
#: servers/audio/effects/audio_effect_distortion.cpp
#, fuzzy
@@ -27873,21 +27567,20 @@ 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"
-msgstr ""
+msgstr "Msec"
#: servers/audio/effects/audio_effect_reverb.cpp
msgid "Room Size"
-msgstr ""
+msgstr "Tamanho da Sala"
#: servers/audio/effects/audio_effect_reverb.cpp
#, fuzzy
@@ -27970,9 +27663,8 @@ msgid "Time Before Sleep"
msgstr ""
#: 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"
@@ -28345,7 +28037,7 @@ msgstr ""
#: servers/visual_server.cpp
msgid "Compatibility"
-msgstr ""
+msgstr "Compatibilidade"
#: servers/visual_server.cpp
msgid "Disable Half Float"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 395185bd3e..aaa6e1cbcb 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -2186,14 +2186,15 @@ msgstr "Favorite:"
msgid "Recent:"
msgstr "Recent:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Cautați:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Potriviri:"
@@ -2253,8 +2254,8 @@ msgstr "Cautați Înlocuitor Resursă:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5633,6 +5634,10 @@ msgid "Drag And Drop Selection"
msgstr "Toată selecția"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12024,6 +12029,11 @@ msgid "New Animation"
msgstr "Animație"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Metode de filtrare"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index befaceac4c..c50dce8e01 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -85,7 +85,7 @@
# kyanukovich <ianu0001@algonquinlive.com>, 2020.
# Ron788 <ustinov200511@gmail.com>, 2020.
# Daniel <dan.ef1999@gmail.com>, 2020.
-# NeoLan Qu <it.bulla@mail.ru>, 2020.
+# NeoLan Qu <it.bulla@mail.ru>, 2020, 2022.
# Nikita Epifanov <nikgreens@protonmail.com>, 2020.
# Cube Show <griiv.06@gmail.com>, 2020.
# Roman Tolkachyov <roman@tolkachyov.name>, 2020.
@@ -118,13 +118,14 @@
# Jasuse <jasusemaele@gmail.com>, 2022.
# Vadim Mitroshkin <Vadim7540@yandex.ru>, 2022.
# Maksim Marchukov <mar.maksim63@gmail.com>, 2022.
+# Slava Beloglazov <slavathedeveloper@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-07-17 07:14+0000\n"
-"Last-Translator: Maksim Marchukov <mar.maksim63@gmail.com>\n"
+"PO-Revision-Date: 2022-07-26 01:55+0000\n"
+"Last-Translator: NeoLan Qu <it.bulla@mail.ru>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -561,7 +562,7 @@ msgstr "Давление"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Перо Инвертировано"
#: core/os/input_event.cpp
msgid "Relative"
@@ -1244,9 +1245,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
@@ -1437,24 +1437,22 @@ msgid "(Invalid, expected type: %s)"
msgstr "(Ðеверный, ожидаемый тип: %s)"
#: 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
msgid "Start (s):"
@@ -2215,14 +2213,15 @@ msgstr "Избранное:"
msgid "Recent:"
msgstr "Ðедавнее:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "ПоиÑк:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "СовпадениÑ:"
@@ -2282,8 +2281,8 @@ msgstr "Ðайти заменÑемый реÑурÑ:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2292,7 +2291,7 @@ msgstr "Открыть"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Владельцы: %s (Ð’Ñего: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2342,9 +2341,8 @@ msgid "Fix Dependencies"
msgstr "ИÑправить завиÑимоÑти"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Errors loading!"
-msgstr "Ошибки загружаютÑÑ!"
+msgstr "Ошибки при загрузке!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
@@ -2851,17 +2849,15 @@ msgstr "Выбрать"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "ЭкÑпорт проекта Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ñ‹:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed with errors."
-msgstr "Завершать пути файлов"
+msgstr "Завершено Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸."
#: editor/editor_export.cpp
-#, fuzzy
msgid "Completed successfully."
-msgstr "Пакет уÑпешно уÑтановлен!"
+msgstr "Завершено без ошибок."
#: editor/editor_export.cpp
#, fuzzy
@@ -2881,9 +2877,8 @@ msgid "Packing"
msgstr "Упаковывание"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Save PCK"
-msgstr "Сохранить как"
+msgstr "Сохранить PCK"
#: editor/editor_export.cpp
#, fuzzy
@@ -2910,16 +2905,16 @@ msgid ""
"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
"Etc' in Project Settings."
msgstr ""
-"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует Ñжатие текÑтур «ETC» Ð´Ð»Ñ GLES2. Включите «Import "
-"Etc» в ÐаÑтройках проекта."
+"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует Ñжатие текÑтур «ETC» Ð´Ð»Ñ GLES2. Включите "
+"«Импортировать Etc» в ÐаÑтройках Проекта."
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC2' texture compression for GLES3. Enable "
"'Import Etc 2' in Project Settings."
msgstr ""
-"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует компреÑÑию текÑтур «ETC2» Ð´Ð»Ñ GLES2. Включите "
-"«Import Etc 2» в ÐаÑтройках проекта."
+"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует компреÑÑию текÑтур «ETC2» Ð´Ð»Ñ GLES3. Включите "
+"«Импортировать Etc 2» в ÐаÑтройках Проекта."
#: editor/editor_export.cpp
msgid ""
@@ -2929,8 +2924,8 @@ msgid ""
"Enabled'."
msgstr ""
"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует ÑÐ¶Ð°Ñ‚Ð¸Ñ Ñ‚ÐµÐºÑтур «ETC» Ð´Ð»Ñ Ð¾Ñ‚ÐºÐ°Ñ‚Ð° драйвера к GLES2.\n"
-"Включите «Import Etc» в ÐаÑтройках проекта или отключите «Driver Fallback "
-"Enabled»."
+"Включите «Импортировать Etc» в ÐаÑтройках проекта или отключите «Driver "
+"Fallback Enabled»."
#: editor/editor_export.cpp
msgid ""
@@ -2946,7 +2941,8 @@ msgid ""
"Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."
msgstr ""
"Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð° требует компреÑÑию текÑтур «ETC2» или «PVRTC» Ð´Ð»Ñ GLES3. "
-"Включите «Import Etc 2» или «Import Pvrtc» в ÐаÑтройках проекта."
+"Включите «Импортировать Etc 2» или «Импортировать Pvrtc» в ÐаÑтройках "
+"Проекта."
#: editor/editor_export.cpp
msgid ""
@@ -5604,6 +5600,10 @@ msgid "Drag And Drop Selection"
msgstr "Выделение Ñетки"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Внешний вид"
@@ -7257,12 +7257,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: Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ñ‚ÐµÐºÑтура иÑпользуетÑÑ ÐºÐ°Ðº карта нормалей в 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. Включена фильтрациÑ, повторение и Ð³ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ "
+"mipmap-карт, а также VRAM Ñжатие текÑтуры."
#: editor/import/resource_importer_texture.cpp
msgid "2D, Detect 3D"
@@ -11699,6 +11704,11 @@ msgid "New Animation"
msgstr "ÐÐ¾Ð²Ð°Ñ Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Фильтр методов"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "СкороÑть:"
@@ -15361,7 +15371,7 @@ msgstr "Сделать локальным"
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
msgid "Another node already uses this unique name in the scene."
-msgstr "Ð˜Ð¼Ñ ÑƒÐ·Ð»Ð° уже иÑпользовано в Ñцене"
+msgstr "Данное уникальное Ð¸Ð¼Ñ ÑƒÐ¶Ðµ иÑпользовано у другого узла в Ñцене."
#: editor/scene_tree_dock.cpp
msgid "Enable Scene Unique Name"
@@ -15794,9 +15804,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:"
@@ -16774,7 +16783,7 @@ msgstr "Выключен GDNative Ñинглтон"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
#, fuzzy
msgid "Libraries:"
-msgstr "Библиотеки: "
+msgstr "Библиотеки:"
#: modules/gdnative/nativescript/nativescript.cpp
msgid "Class Name"
@@ -17050,7 +17059,7 @@ msgstr "СфокуÑироватьÑÑ Ð½Ð° начале координат"
#: modules/gltf/gltf_skin.cpp
msgid "Inverse Binds"
-msgstr ""
+msgstr "Инвертировать СвÑзи"
#: modules/gltf/gltf_skin.cpp
#, fuzzy
@@ -17059,11 +17068,11 @@ 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"
@@ -17079,7 +17088,7 @@ msgstr "Диффузный фактор"
#: modules/gltf/gltf_spec_gloss.cpp
msgid "Gloss Factor"
-msgstr ""
+msgstr "КоÑфф. ГлÑнца"
#: modules/gltf/gltf_spec_gloss.cpp
#, fuzzy
@@ -17628,9 +17637,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!"
@@ -17640,7 +17648,7 @@ msgstr ""
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid "Stack overflow with stack depth:"
-msgstr "Переполнение Ñтека Ñ Ð³Ð»ÑƒÐ±Ð¸Ð½Ð¾Ð¹ Ñтека: "
+msgstr "Переполнение Ñтека Ñ Ð³Ð»ÑƒÐ±Ð¸Ð½Ð¾Ð¹ Ñтека:"
#: modules/visual_script/visual_script.cpp
msgid "Visual Script"
@@ -18009,7 +18017,7 @@ 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"
@@ -18018,7 +18026,7 @@ 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"
@@ -18172,14 +18180,12 @@ msgid "Operator"
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"
@@ -18190,14 +18196,13 @@ msgid "Var Name"
msgstr "Ð˜Ð¼Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹"
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "VariableGet not found in script:"
-msgstr "VariableGet не найден в Ñкрипте: "
+msgstr "VariableGet отÑутÑтвует в Ñкрипте:"
#: modules/visual_script/visual_script_nodes.cpp
#, fuzzy
msgid "VariableSet not found in script:"
-msgstr "VariableSet не найден в Ñкрипте: "
+msgstr "VariableSet не найден в Ñкрипте:"
#: modules/visual_script/visual_script_nodes.cpp
msgid "Preload"
@@ -18334,7 +18339,7 @@ msgstr "Режим запиÑи"
#: modules/webrtc/webrtc_data_channel.h
msgid "WebRTC"
-msgstr ""
+msgstr "WebRTC"
#: modules/webrtc/webrtc_data_channel.h
#, fuzzy
@@ -18350,36 +18355,32 @@ 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 "МакÑимальный размер (КБ)"
+msgstr "МакÑимальный Входной Буфер (КБ)"
#: modules/websocket/websocket_macros.h
msgid "Max In Packets"
-msgstr ""
+msgstr "МакÑимальные ВходÑщие Пакеты"
#: modules/websocket/websocket_macros.h
-#, fuzzy
msgid "Max Out Buffer (KB)"
-msgstr "МакÑимальный размер (КБ)"
+msgstr "МакÑимальный Буфер Вывода (КБ)"
#: 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"
-msgstr ""
+msgstr "ПривÑзать IP"
#: modules/websocket/websocket_server.cpp
msgid "Private Key"
@@ -18403,14 +18404,12 @@ 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
msgid "Requested Reference Space Types"
@@ -18421,9 +18420,8 @@ msgid "Reference Space Type"
msgstr ""
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "Visibility State"
-msgstr "Переключить видимоÑть"
+msgstr "ВидимоÑть"
#: modules/webxr/webxr_interface.cpp
#, fuzzy
@@ -18431,9 +18429,8 @@ msgid "Bounds Geometry"
msgstr "Повторить"
#: modules/webxr/webxr_interface.cpp
-#, fuzzy
msgid "XR Standard Mapping"
-msgstr "Ð˜Ð½Ñ‚ÐµÐ»Ð»ÐµÐºÑ‚ÑƒÐ°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"
+msgstr "Стандартный Маппинг XR"
#: platform/android/export/export.cpp
msgid "Android SDK Path"
@@ -18462,19 +18459,19 @@ msgstr "Выключение ADB при выходе"
#: platform/android/export/export_plugin.cpp
msgid "Launcher Icons"
-msgstr ""
+msgstr "Иконки Лаунчера"
#: platform/android/export/export_plugin.cpp
msgid "Main 192 X 192"
-msgstr ""
+msgstr "ОÑÐ½Ð¾Ð²Ð½Ð°Ñ 192 X 192"
#: platform/android/export/export_plugin.cpp
msgid "Adaptive Foreground 432 X 432"
-msgstr ""
+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."
@@ -18501,39 +18498,32 @@ msgid "The package must have at least one '.' separator."
msgstr "Пакет должен иметь Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ один разделитель «.»."
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Custom Build"
-msgstr "ИÑпользовать ÑобÑтвенную директорию данных пользователÑ"
+msgstr "ÐаÑÑ‚Ñ€Ð°Ð¸Ð²Ð°ÐµÐ¼Ð°Ñ Ð¡Ð±Ð¾Ñ€ÐºÐ°"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Use Custom Build"
-msgstr "ИÑпользовать ÑобÑтвенную директорию данных пользователÑ"
+msgstr "ИÑпользовать ÐаÑтраиваемую Сборку"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Export Format"
-msgstr "Путь ÑкÑпорта"
+msgstr "Формат ЭкÑпорта"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Min SDK"
-msgstr "Минимальный размер"
+msgstr "Min SDK"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Target SDK"
-msgstr "Целевой FPS"
+msgstr "Целевой SDK"
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
-#, fuzzy
msgid "Architectures"
-msgstr "Добавить поле архитектуры"
+msgstr "Ðрхитектуры"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Keystore"
-msgstr "Отладочное хранилище ключей"
+msgstr "Хранилище ключей"
#: platform/android/export/export_plugin.cpp
#, fuzzy
@@ -18557,31 +18547,27 @@ msgstr "Пароль"
#: platform/android/export/export_plugin.cpp
msgid "One Click Deploy"
-msgstr ""
+msgstr "Развёртывание в Один Клик"
#: platform/android/export/export_plugin.cpp
-#, fuzzy
msgid "Clear Previous Install"
-msgstr "ОÑмотреть предыдущий ÑкземплÑÑ€"
+msgstr "ОчиÑтить Предыдущую УÑтановку"
#: platform/android/export/export_plugin.cpp
msgid "Code"
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
@@ -18891,14 +18877,12 @@ msgid "Code Signing"
msgstr "ПодпиÑÑŒ кода 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 ""
-"Ðе удалоÑÑŒ найти команду «apksigner».\n"
-"ПожалуйÑта, проверьте наличие программы в каталоге Android SDK build-tools.\n"
-"Результат %s не подпиÑан."
+"Ðе удалоÑÑŒ найти «apksigner». ПожалуйÑта, убедитеÑÑŒ в наличии команды в "
+"каталоге build-tools Android SDK. Результирующий %s не подпиÑан."
#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
@@ -18913,9 +18897,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"
@@ -18946,9 +18929,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 ""
@@ -18959,15 +18941,12 @@ 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
@@ -18977,9 +18956,8 @@ msgstr ""
"Ðевозможно перезапиÑать файлы 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!"
@@ -18990,14 +18968,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"
@@ -19021,22 +18998,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..."
@@ -19726,9 +19699,8 @@ msgid "Could not open icon file \"%s\"."
msgstr "Ðе удалоÑÑŒ ÑкÑпортировать файлы проекта"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Could not start xcrun executable."
-msgstr "Ðе удаётÑÑ Ð·Ð°Ð¿ÑƒÑтить подпроцеÑÑ!"
+msgstr "Ðе удаётÑÑ Ð·Ð°Ð¿ÑƒÑтить иÑполнÑемый файл xcrun."
#: platform/osx/export/export.cpp
#, fuzzy
@@ -19812,9 +19784,8 @@ msgid "DMG Creation"
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."
@@ -19901,9 +19872,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 "Ðе удалоÑÑŒ открыть файл Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð¾ пути \"%s\"."
#: platform/osx/export/export.cpp
msgid "Invalid bundle identifier:"
@@ -22940,11 +22910,11 @@ msgstr ""
#: scene/3d/physics_body.cpp
msgid "Angular Spring Damping"
-msgstr ""
+msgstr "Угловое Затухание Пружины"
#: scene/3d/physics_body.cpp
msgid "Angular Equilibrium Point"
-msgstr ""
+msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ Ð¢Ð¾Ñ‡ÐºÐ° РавновеÑиÑ"
#: scene/3d/physics_body.cpp
#, fuzzy
@@ -22973,7 +22943,7 @@ msgstr "Узел Ри Узел В должны быть различными о
#: scene/3d/physics_joint.cpp
msgid "Solver"
-msgstr ""
+msgstr "Разрешитель"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -22987,7 +22957,7 @@ msgstr "Параметры"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit"
-msgstr ""
+msgstr "Угловой Предел"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23001,7 +22971,7 @@ msgstr "нижний региÑтр"
#: scene/3d/physics_joint.cpp
msgid "Motor"
-msgstr ""
+msgstr "Мотор"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23085,11 +23055,11 @@ msgstr "МежÑтрочный интервал"
#: scene/3d/physics_joint.cpp
msgid "Equilibrium Point"
-msgstr ""
+msgstr "Точка РавновеÑиÑ"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit X"
-msgstr ""
+msgstr "X Углового Предела"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23098,7 +23068,7 @@ msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ ÑкороÑть"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring X"
-msgstr ""
+msgstr "X Угловой Пружины"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23117,7 +23087,7 @@ msgstr "МежÑтрочный интервал"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Y"
-msgstr ""
+msgstr "Y Углового Предела"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23126,7 +23096,7 @@ msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ ÑкороÑть"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Y"
-msgstr ""
+msgstr "Y Угловой Пружины"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23145,7 +23115,7 @@ msgstr "МежÑтрочный интервал"
#: scene/3d/physics_joint.cpp
msgid "Angular Limit Z"
-msgstr ""
+msgstr "Z Углового Предела"
#: scene/3d/physics_joint.cpp
#, fuzzy
@@ -23154,7 +23124,7 @@ msgstr "Ð£Ð³Ð»Ð¾Ð²Ð°Ñ ÑкороÑть"
#: scene/3d/physics_joint.cpp
msgid "Angular Spring Z"
-msgstr ""
+msgstr "Z Угловой Пружины"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
@@ -23174,7 +23144,7 @@ msgstr "Портал активен"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
-msgstr ""
+msgstr "В обе Стороны"
#: scene/3d/portal.cpp
msgid "Linked Room"
@@ -27789,14 +27759,12 @@ msgid "Import S3TC"
msgstr "Импорт"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import ETC"
-msgstr "Импорт"
+msgstr "Импортировать ETC"
#: servers/visual_server.cpp
-#, fuzzy
msgid "Import ETC2"
-msgstr "Импорт"
+msgstr "Импортировать ETC2"
#: servers/visual_server.cpp
#, fuzzy
diff --git a/editor/translations/si.po b/editor/translations/si.po
index bfba193a6a..e30d6c27ab 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -2120,14 +2120,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2183,8 +2184,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5345,6 +5346,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11392,6 +11397,11 @@ msgid "New Animation"
msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "à·à·Šâ€à¶»à·’à¶­:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index f711be3039..c3a64ecc2f 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -2204,14 +2204,15 @@ msgstr "Obľúbené:"
msgid "Recent:"
msgstr "Nedávne:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Hľadať:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Zhody:"
@@ -2271,8 +2272,8 @@ msgstr "Hľadať Náhradný Zdroj:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5658,6 +5659,10 @@ msgid "Drag And Drop Selection"
msgstr "Všetky vybrané"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11963,6 +11968,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filter:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index aae6c8ba68..4f7f11baa3 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -2223,14 +2223,15 @@ msgstr "Priljubljene:"
msgid "Recent:"
msgstr "Nedavni:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Iskanje:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Zadetki:"
@@ -2292,8 +2293,8 @@ msgstr "Iskanje Nadomestnih Virov:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5729,6 +5730,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap Izbriši Izbor"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12183,6 +12188,11 @@ msgid "New Animation"
msgstr "Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Lastnosti objekta."
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index f405b8b8a9..d011c34407 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -2162,14 +2162,15 @@ msgstr "Të Preferuarat:"
msgid "Recent:"
msgstr "Të fundit:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Kërko:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Përputhjet:"
@@ -2231,8 +2232,8 @@ msgstr "Kërko Resursin Zëvendësues:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5665,6 +5666,10 @@ msgid "Drag And Drop Selection"
msgstr "Fshi të Selektuarat"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11886,6 +11891,11 @@ msgid "New Animation"
msgstr "Animacionin i Ri"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Nyjet filtruese"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index 9d7c4c5db8..4a9d933004 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -2333,14 +2333,15 @@ msgstr "Омиљене:"
msgid "Recent:"
msgstr "ЧеÑте:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Тражи:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Подударање:"
@@ -2402,8 +2403,8 @@ msgstr "Потражи замену за реÑурÑ:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5978,6 +5979,10 @@ msgid "Drag And Drop Selection"
msgstr "МапаМреже ИÑпуни Одабрано"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12753,6 +12758,11 @@ msgstr "Ðнимација"
#: editor/plugins/sprite_frames_editor_plugin.cpp
#, fuzzy
+msgid "Filter animations"
+msgstr "Филтрирај методе"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Speed:"
msgstr "Брзина (FPS):"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index d3f588aca6..41b23339de 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -2137,14 +2137,15 @@ msgstr "Omiljeno:"
msgid "Recent:"
msgstr "Nedavno:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Pretraga:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Podudaranja:"
@@ -2204,8 +2205,8 @@ msgstr "Traži Resurs Zamene:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5364,6 +5365,10 @@ msgid "Drag And Drop Selection"
msgstr "Sve sekcije"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11398,6 +11403,11 @@ msgid "New Animation"
msgstr "Nova Animacija"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Animacija"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 08b57d1a25..3baefa6356 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -14,7 +14,7 @@
# Mattias Münster <mattiasmun@gmail.com>, 2019.
# Anonymous <noreply@weblate.org>, 2020.
# Joakim Lundberg <joakim@joakimlundberg.com>, 2020.
-# Kristoffer Grundström <swedishsailfishosuser@tutanota.com>, 2020, 2021.
+# Kristoffer Grundström <swedishsailfishosuser@tutanota.com>, 2020, 2021, 2022.
# Jonas Robertsson <jonas.robertsson@posteo.net>, 2020, 2021.
# André Andersson <andre.eric.andersson@gmail.com>, 2020.
# Andreas Westrell <andreas.westrell@gmail.com>, 2020.
@@ -22,16 +22,18 @@
# Shaggy <anton_christoffersson@hotmail.com>, 2020.
# Marcus Toftedahl <marcus.toftedahl@his.se>, 2020.
# Alex25820 <Alexander_sjogren@hotmail.se>, 2021.
-# Leon <joel.lundborg@gmail.com>, 2021.
+# 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.
+# Kenny Andersson <kenny@ordinary.se>, 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-12-20 18:53+0000\n"
-"Last-Translator: Alex25820 <alexs25820@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: Kenny Andersson <kenny@ordinary.se>\n"
"Language-Team: Swedish <https://hosted.weblate.org/projects/godot-engine/"
"godot/sv/>\n"
"Language: sv\n"
@@ -39,11 +41,12 @@ 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.10\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
+#, fuzzy
msgid "Tablet Driver"
-msgstr ""
+msgstr "Drivrutin för surfplatta"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -51,18 +54,16 @@ msgid "Clipboard"
msgstr "Klippbordet är tomt!"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Current Screen"
-msgstr "Nuvarande Scen"
+msgstr "Nuvarande Skärm"
#: core/bind/core_bind.cpp
msgid "Exit Code"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "V-Sync Enabled"
-msgstr "Aktivera"
+msgstr "V-Synk Aktivt"
#: core/bind/core_bind.cpp main/main.cpp
msgid "V-Sync Via Compositor"
@@ -73,9 +74,8 @@ msgid "Delta Smoothing"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Low Processor Usage Mode"
-msgstr "Exportera Projekt"
+msgstr "Läge för låg processoranvändning"
#: core/bind/core_bind.cpp
msgid "Low Processor Usage Mode Sleep (µsec)"
@@ -86,9 +86,8 @@ msgid "Keep Screen On"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Min Window Size"
-msgstr "Storlek:"
+msgstr "Minsta fönsterstorlek"
#: core/bind/core_bind.cpp
#, fuzzy
@@ -108,11 +107,11 @@ msgstr "Nytt Fönster"
#: core/bind/core_bind.cpp core/project_settings.cpp
msgid "Borderless"
-msgstr ""
+msgstr "Kantlös"
#: core/bind/core_bind.cpp
msgid "Per Pixel Transparency Enabled"
-msgstr ""
+msgstr "Genomskinlighet per pixel aktiverad"
#: core/bind/core_bind.cpp core/project_settings.cpp
#, fuzzy
@@ -121,16 +120,16 @@ msgstr "Växla Fullskärm"
#: core/bind/core_bind.cpp
msgid "Maximized"
-msgstr ""
+msgstr "Maximerad"
#: core/bind/core_bind.cpp
msgid "Minimized"
-msgstr ""
+msgstr "Minimerad"
#: core/bind/core_bind.cpp core/project_settings.cpp scene/gui/dialogs.cpp
#: scene/gui/graph_node.cpp
msgid "Resizable"
-msgstr ""
+msgstr "Anpassningsbar"
#: 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
@@ -150,36 +149,32 @@ msgstr "Dockposition"
#: 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 "Storlek:"
+msgstr "Storlek"
#: core/bind/core_bind.cpp
msgid "Endian Swap"
msgstr ""
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Editor Hint"
-msgstr "Redigera Tema"
+msgstr "Redigeringsförslag"
#: core/bind/core_bind.cpp
msgid "Print Error Messages"
-msgstr ""
+msgstr "Skriv ut felmeddelanden"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Iterations Per Second"
-msgstr "Interpolationsläge"
+msgstr "Upprepningar per sekund"
#: core/bind/core_bind.cpp
msgid "Target FPS"
-msgstr ""
+msgstr "MÃ¥l FPS"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Time Scale"
-msgstr "Skala"
+msgstr "Tidsskala"
#: core/bind/core_bind.cpp main/main.cpp
#, fuzzy
@@ -201,13 +196,12 @@ msgid "Error Line"
msgstr "Fel vid sparande"
#: core/bind/core_bind.cpp
-#, fuzzy
msgid "Result"
-msgstr "Sök Hjälp"
+msgstr "Resultat"
#: core/command_queue_mt.cpp core/message_queue.cpp main/main.cpp
msgid "Memory"
-msgstr ""
+msgstr "Minne"
#: core/command_queue_mt.cpp core/message_queue.cpp
#: core/register_core_types.cpp drivers/gles2/rasterizer_canvas_base_gles2.cpp
@@ -218,7 +212,7 @@ msgstr ""
#: modules/webrtc/webrtc_data_channel.h modules/websocket/websocket_macros.h
#: servers/visual_server.cpp
msgid "Limits"
-msgstr ""
+msgstr "Begränsningar"
#: core/command_queue_mt.cpp
#, fuzzy
@@ -227,68 +221,63 @@ msgstr "Ctrl: Rotera"
#: core/command_queue_mt.cpp
msgid "Multithreading Queue Size (KB)"
-msgstr ""
+msgstr "Flertrådsköstorlek (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 "Funktioner"
+msgstr "Funktion"
#: 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 "Data"
#: 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 "Nätverksprofilerare"
+msgstr "Nätverk"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Remote FS"
-msgstr "Ta bort"
+msgstr "Fjärr FS"
#: core/io/file_access_network.cpp
-#, fuzzy
msgid "Page Size"
-msgstr "Sida: "
+msgstr "Sidstorlek"
#: core/io/file_access_network.cpp
msgid "Page Read Ahead"
-msgstr ""
+msgstr "Sida läs framåt"
#: core/io/http_client.cpp
msgid "Blocking Mode Enabled"
-msgstr ""
+msgstr "Blockeringsläge Aktiverat"
#: core/io/http_client.cpp
-#, fuzzy
msgid "Connection"
-msgstr "Anslut"
+msgstr "Anslutning"
#: core/io/http_client.cpp
msgid "Read Chunk Size"
-msgstr ""
+msgstr "Läs segmentstorlek"
#: core/io/marshalls.cpp
msgid "Object ID"
-msgstr ""
+msgstr "Objekt ID"
#: core/io/multiplayer_api.cpp core/io/packet_peer.cpp
msgid "Allow Object Decoding"
-msgstr ""
+msgstr "Tillåt objekt avkodning"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
msgid "Refuse New Network Connections"
-msgstr ""
+msgstr "Neka nya nätverksanslutningar"
#: core/io/multiplayer_api.cpp scene/main/scene_tree.cpp
#, fuzzy
@@ -312,36 +301,35 @@ msgstr "Transformera"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Maxstorlek för kodningsbufferten"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "Maximal storlek på inmatningsbufferten"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+msgstr "Maxstorlek för utgångsbuffert"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
-msgstr ""
+msgstr "Strömningsenhet"
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr ""
+msgstr "Big Endian"
#: core/io/stream_peer.cpp
msgid "Data Array"
-msgstr ""
+msgstr "Datamatris"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
-msgstr ""
+msgstr "Blockering av handskakning"
#: core/io/udp_server.cpp
-#, fuzzy
msgid "Max Pending Connections"
-msgstr "Redigera Koppling:"
+msgstr "Max väntande anslutningar"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -356,12 +344,11 @@ msgstr "Förväntade en sträng av längden 1 (ett tecken)."
#: 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 "Inte nog med bytes för att avkoda, eller ogiltigt format."
+msgstr "Otillräckligt antal bytes för att avkoda, eller ogiltigt format."
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid input %d (not passed) in expression"
-msgstr "Ogiltig indata %i (ej överförd) i uttrycket"
+msgstr "Ogiltig inmatning %d (ej överförd) i uttrycket"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
@@ -390,7 +377,7 @@ msgstr "I anrop till '%s':"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
msgid "Seed"
-msgstr ""
+msgstr "Seed"
#: core/math/random_number_generator.cpp
#, fuzzy
@@ -399,11 +386,11 @@ msgstr "Status"
#: core/message_queue.cpp
msgid "Message Queue"
-msgstr ""
+msgstr "Meddelandekö"
#: core/message_queue.cpp
msgid "Max Size (KB)"
-msgstr ""
+msgstr "Maxstorlek (KB)"
#: core/os/input.cpp
#, fuzzy
@@ -412,7 +399,7 @@ msgstr "Växla Läge"
#: core/os/input.cpp
msgid "Use Accumulated Input"
-msgstr ""
+msgstr "Använd ackumulerad input"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -420,13 +407,12 @@ msgid "Device"
msgstr "Enhet"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Alt"
-msgstr "Alla"
+msgstr "Alt"
#: core/os/input_event.cpp
msgid "Shift"
-msgstr ""
+msgstr "Shift"
#: core/os/input_event.cpp
#, fuzzy
@@ -435,7 +421,7 @@ msgstr "Versionshantering"
#: core/os/input_event.cpp
msgid "Meta"
-msgstr ""
+msgstr "Meta"
#: core/os/input_event.cpp
#, fuzzy
@@ -455,9 +441,8 @@ msgid "Pressed"
msgstr "Återställ Zoom"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
-msgstr "Skanna"
+msgstr "Scancode"
#: core/os/input_event.cpp
msgid "Physical Scancode"
@@ -465,7 +450,7 @@ msgstr ""
#: core/os/input_event.cpp
msgid "Unicode"
-msgstr ""
+msgstr "Unicode"
#: core/os/input_event.cpp
msgid "Echo"
@@ -482,9 +467,8 @@ msgid "Global Position"
msgstr "Konstant"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Factor"
-msgstr "Vektor"
+msgstr "Faktor"
#: core/os/input_event.cpp
#, fuzzy
@@ -493,25 +477,23 @@ msgstr "Automatisk Indentering"
#: core/os/input_event.cpp
msgid "Doubleclick"
-msgstr ""
+msgstr "Dubbelklick"
#: core/os/input_event.cpp
msgid "Tilt"
msgstr ""
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pressure"
-msgstr "Återställ Zoom"
+msgstr "Tryck"
#: core/os/input_event.cpp
msgid "Pen Inverted"
-msgstr ""
+msgstr "Invertera penna"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Relative"
-msgstr "GDNative"
+msgstr "Relativ"
#: 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
@@ -527,9 +509,8 @@ msgid "Axis"
msgstr "Axel"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Axis Value"
-msgstr "Värde"
+msgstr "Axelvärde"
#: core/os/input_event.cpp modules/visual_script/visual_script_func_nodes.cpp
#, fuzzy
@@ -545,21 +526,19 @@ msgstr "Åtgärd"
#: core/os/input_event.cpp scene/resources/environment.cpp
#: scene/resources/material.cpp
msgid "Strength"
-msgstr ""
+msgstr "Styrka"
#: core/os/input_event.cpp
msgid "Delta"
-msgstr ""
+msgstr "Delta"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Channel"
-msgstr "Ändra"
+msgstr "Kanal"
#: core/os/input_event.cpp main/main.cpp
-#, fuzzy
msgid "Message"
-msgstr "Synkronisera Skript-ändringar"
+msgstr "Meddelande"
#: core/os/input_event.cpp
#, fuzzy
@@ -570,11 +549,11 @@ msgstr "Växla"
#: 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 "Hastighet"
#: core/os/input_event.cpp
msgid "Instrument"
-msgstr ""
+msgstr "Instrument"
#: core/os/input_event.cpp
#, fuzzy
@@ -588,13 +567,13 @@ 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 "Åtgärd"
+msgstr "Applikation"
#: core/project_settings.cpp main/main.cpp
+#, fuzzy
msgid "Config"
-msgstr ""
+msgstr "Konfigurera"
#: core/project_settings.cpp
#, fuzzy
@@ -630,7 +609,7 @@ msgstr "Kör"
#: core/project_settings.cpp editor/editor_node.cpp
#: editor/run_settings_dialog.cpp main/main.cpp
msgid "Main Scene"
-msgstr ""
+msgstr "Huvudscen"
#: core/project_settings.cpp
#, fuzzy
@@ -644,15 +623,15 @@ msgstr "Avaktiverad"
#: core/project_settings.cpp
msgid "Use Hidden Project Data Directory"
-msgstr ""
+msgstr "Använda dold projektdatakatalog"
#: core/project_settings.cpp
msgid "Use Custom User Dir"
-msgstr ""
+msgstr "Använd anpassad användarkatalog"
#: core/project_settings.cpp
msgid "Custom User Dir Name"
-msgstr ""
+msgstr "Anpassad användarkatalognamn"
#: core/project_settings.cpp main/main.cpp
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
@@ -665,7 +644,7 @@ msgstr "Ersätt Alla"
#: 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 "Bredd"
#: core/project_settings.cpp main/main.cpp modules/csg/csg_shape.cpp
#: modules/gltf/gltf_node.cpp modules/opensimplex/noise_texture.cpp
@@ -673,13 +652,12 @@ 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 "Höger"
+msgstr "Höjd"
#: core/project_settings.cpp
msgid "Always On Top"
-msgstr ""
+msgstr "Alltid överst"
#: core/project_settings.cpp
#, fuzzy
@@ -706,11 +684,11 @@ msgstr "Ladda standard Buss-Layouten."
#: 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 "Redigerare"
#: core/project_settings.cpp
msgid "Main Run Args"
-msgstr ""
+msgstr "Huvudkörnings arg"
#: core/project_settings.cpp
#, fuzzy
@@ -719,11 +697,12 @@ msgstr "Scen Filsökväg:"
#: core/project_settings.cpp
msgid "Search In File Extensions"
-msgstr ""
+msgstr "Sök i filändelser"
#: core/project_settings.cpp
+#, fuzzy
msgid "Script Templates Search Path"
-msgstr ""
+msgstr "Sökväg för skriptmallar"
#: core/project_settings.cpp
#, fuzzy
@@ -738,16 +717,16 @@ msgstr "Versionshantering"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
msgid "Input"
-msgstr ""
+msgstr "Input"
#: core/project_settings.cpp
+#, fuzzy
msgid "UI Accept"
-msgstr ""
+msgstr "UI Acceptera"
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Select"
-msgstr "Välj"
+msgstr "Ui Välj"
#: core/project_settings.cpp
#, fuzzy
@@ -779,9 +758,8 @@ msgid "UI Up"
msgstr ""
#: core/project_settings.cpp
-#, fuzzy
msgid "UI Down"
-msgstr "Ladda ner"
+msgstr "UI Ner"
#: core/project_settings.cpp
#, fuzzy
@@ -790,11 +768,11 @@ msgstr "Sida: "
#: core/project_settings.cpp
msgid "UI Page Down"
-msgstr ""
+msgstr "UI sida ner"
#: core/project_settings.cpp
msgid "UI Home"
-msgstr ""
+msgstr "UI hem"
#: core/project_settings.cpp
msgid "UI End"
@@ -931,7 +909,7 @@ msgstr ""
#: core/register_core_types.cpp
msgid "TCP"
-msgstr ""
+msgstr "TCP"
#: core/register_core_types.cpp
#, fuzzy
@@ -944,11 +922,12 @@ msgstr ""
#: core/register_core_types.cpp
msgid "Max Buffer (Power of 2)"
-msgstr ""
+msgstr "Max buffer (2 potenser)"
#: core/register_core_types.cpp editor/editor_settings.cpp main/main.cpp
+#, fuzzy
msgid "SSL"
-msgstr ""
+msgstr "SSL"
#: core/register_core_types.cpp main/main.cpp
#, fuzzy
@@ -964,7 +943,7 @@ msgstr "Resurs"
#: core/resource.cpp
#, fuzzy
msgid "Local To Scene"
-msgstr "Stäng Scen"
+msgstr "Lokalt till scenen"
#: core/resource.cpp editor/dependency_editor.cpp
#: editor/editor_autoload_settings.cpp editor/plugins/path_editor_plugin.cpp
@@ -983,12 +962,13 @@ msgid "Locale"
msgstr ""
#: core/translation.cpp
+#, fuzzy
msgid "Test"
-msgstr ""
+msgstr "Test"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "Reserv"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -1023,18 +1003,21 @@ msgstr "EiB"
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp modules/gltf/gltf_state.cpp
+#, fuzzy
msgid "Buffers"
-msgstr ""
+msgstr "Buffertar"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
+#, fuzzy
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Buffertstorlek för canvaspolygon (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
+#, fuzzy
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr ""
+msgstr "Buffertstorlek för Canvas Polygon Index (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -1045,8 +1028,9 @@ msgstr ""
#: servers/physics_2d/physics_2d_server_wrap_mt.h
#: servers/physics_2d/space_2d_sw.cpp servers/physics_2d_server.cpp
#: servers/visual_server.cpp
+#, fuzzy
msgid "2D"
-msgstr ""
+msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
@@ -1057,42 +1041,47 @@ msgstr "Alternativ"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Use GPU Pixel Snap"
-msgstr ""
+msgstr "Använd GPU pixel vidhäftning"
#: drivers/gles2/rasterizer_scene_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Immediate Buffer Size (KB)"
-msgstr ""
+msgstr "Omedelbar buffertstorlek (KB)"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
+#, fuzzy
msgid "Lightmapping"
-msgstr ""
+msgstr "Ljusmappning"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
+#, fuzzy
msgid "Use Bicubic Sampling"
-msgstr ""
+msgstr "Använd bikubisk sampling"
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Max Renderable Elements"
-msgstr ""
+msgstr "Max återgivningsbara element"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
-msgstr ""
+msgstr "Max renderbara ljuskällor"
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Max Renderable Reflections"
-msgstr ""
+msgstr "Max renderingsbara reflektioner"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Lights Per Object"
-msgstr ""
+msgstr "Max antal ljuskällor per objekt"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Subsurface Scattering"
-msgstr ""
+msgstr "Subsurface Scattering"
#: drivers/gles3/rasterizer_scene_gles3.cpp editor/animation_track_editor.cpp
#: editor/import/resource_importer_texture.cpp
@@ -1116,16 +1105,19 @@ msgid "Weight Samples"
msgstr ""
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Voxel Cone Tracing"
-msgstr ""
+msgstr "Voxel Kon Spårning"
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
+#, fuzzy
msgid "High Quality"
-msgstr ""
+msgstr "Hög kvalitet"
#: drivers/gles3/rasterizer_storage_gles3.cpp
+#, fuzzy
msgid "Blend Shape Max Buffer Size (KB)"
-msgstr ""
+msgstr "Mixform Max buffertstorlek (KB)"
#. TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror).
#: editor/animation_bezier_editor.cpp
@@ -1178,7 +1170,7 @@ msgstr "Anim Ta Bort Nycklar"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Time"
-msgstr "Anim Ändra Nyckelbildstid"
+msgstr "Anim Ändra Tidsnyckelns Tid"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
@@ -1236,7 +1228,7 @@ msgstr "Välj Färg"
#: editor/animation_track_editor.cpp main/main.cpp
#: modules/mono/mono_gd/gd_mono.cpp
msgid "Args"
-msgstr ""
+msgstr "Argument"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#: editor/script_editor_debugger.cpp modules/gltf/gltf_accessor.cpp
@@ -1247,23 +1239,25 @@ msgstr "Typ"
#: editor/animation_track_editor.cpp
msgid "In Handle"
-msgstr ""
+msgstr "Handtag in"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Out Handle"
-msgstr ""
+msgstr "Handtag ut"
#: 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
+#, fuzzy
msgid "Stream"
-msgstr ""
+msgstr "Ström"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Start Offset"
-msgstr "Icon Läge"
+msgstr "Startförskjutning"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1282,7 +1276,7 @@ msgstr "Animation"
#: editor/animation_track_editor.cpp
msgid "Easing"
-msgstr ""
+msgstr "Lätta"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Keyframe Time"
@@ -1435,7 +1429,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Out-Handle:"
-msgstr ""
+msgstr "Handtag ut:"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1448,8 +1442,9 @@ msgid "Start (s):"
msgstr "Starta"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "End (s):"
-msgstr ""
+msgstr "Slut (s):"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1509,7 +1504,7 @@ msgstr "Duplicera Nycklar"
#: editor/animation_track_editor.cpp
msgid "Add RESET Value(s)"
-msgstr ""
+msgstr "Lägg till RESET-värde(n)"
#: editor/animation_track_editor.cpp
msgid "Delete Key(s)"
@@ -1591,7 +1586,7 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
msgid "property '%s'"
-msgstr "egenskapen '%s'"
+msgstr "egenskap '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1824,9 +1819,8 @@ msgid "Go to Previous Step"
msgstr "Gå till Föregående Steg"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "Återställ Zoom"
+msgstr "Verkställ återställning"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -2209,14 +2203,15 @@ msgstr "Favoriter:"
msgid "Recent:"
msgstr "Senaste:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Sök:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Matchar:"
@@ -2276,8 +2271,8 @@ msgstr "Sök Ersättningsresurs:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2286,17 +2281,17 @@ msgstr "Öppna"
#: editor/dependency_editor.cpp
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Ägare av: %s (Totalt: %d)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"Ta bort valda filer från projektet? (Kan ej återställas)\n"
-"Du kan hitta de borttagna filerna i systemets papperskorg."
+"Ta bort de valda filerna från projektet? (Kan ej ångras.)\n"
+"Beroende på hur ditt filsystem är konfigurerat så kommer filerna antingen "
+"flyttas till systemets papperskorg eller tas bort permanent."
#: editor/dependency_editor.cpp
msgid ""
@@ -2381,7 +2376,7 @@ msgstr "Tack från Godot-gemenskapen!"
#: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp
msgid "Click to copy."
-msgstr "Klicka för att kopiera."
+msgstr "Klicka för att kopiera"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
@@ -2479,30 +2474,32 @@ msgid "Licenses"
msgstr "Licenser"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Fel vid öppning av paketetfil, inte i zip-format."
+msgstr "Fel vid öppning av tillgångsfilen för \"%s\" (inte i ZIP-format)."
#: editor/editor_asset_installer.cpp
msgid "%s (already exists)"
msgstr "%s (existerar redan)"
#: editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
msgstr ""
+"Innehållet i resursen \"%s\" - %d fil(er) står i konflikt med ditt projekt:"
#: editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Contents of asset \"%s\" - No files conflict with your project:"
msgstr ""
+"Innehållet i resursen \"%s\" - Inga filer står i konflikt med ditt projekt:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "Dekomprimerar Tillgångar"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "Följande filer misslyckades att packas upp från paketet:"
+msgstr "Följande filer misslyckades att packas upp från paketet \"%s\":"
#: editor/editor_asset_installer.cpp
msgid "(and %s more files)"
@@ -2510,7 +2507,7 @@ msgstr "(och %s fler filer)"
#: editor/editor_asset_installer.cpp
msgid "Asset \"%s\" installed successfully!"
-msgstr "Paketet \"%s\" har installerats!"
+msgstr "Installation av tillgången \"%s\" lyckades!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -2522,9 +2519,8 @@ msgid "Install"
msgstr "Installera"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Paketinstallerare"
+msgstr "Tillgångsinstallerare"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -2705,8 +2701,9 @@ msgid "Invalid name."
msgstr "Ogiltigt namn."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Cannot begin with a digit."
-msgstr ""
+msgstr "Kan inte börja med en siffra."
#: editor/editor_autoload_settings.cpp
msgid "Valid characters:"
@@ -2771,7 +2768,7 @@ msgstr "%s är en ogiltig genväg. Filen existerar inte."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s är en ogiltig genväg. Inte i resurs-genväg (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -2851,7 +2848,7 @@ msgstr "Välj"
#: editor/editor_export.cpp
msgid "Project export for platform:"
-msgstr ""
+msgstr "Projektexport för plattformen:"
#: editor/editor_export.cpp
#, fuzzy
@@ -2938,8 +2935,8 @@ msgid ""
"Target platform requires 'PVRTC' texture compression for GLES2. Enable "
"'Import Pvrtc' in Project Settings."
msgstr ""
-"Målplattformen kräver 'PVRTC'-texturkomprimering för GLES2. Aktivera 'Import "
-"Pvrtc' i projektinställningarna."
+"Målplattformen kräver 'PVRTC' texturkomprimering för GLES2. Aktivera "
+"'Importera Pvrtc' i Projektinställningarna."
#: editor/editor_export.cpp
msgid ""
@@ -2971,7 +2968,7 @@ msgstr "Redigera Tema"
#: platform/javascript/export/export.cpp platform/osx/export/export.cpp
#: platform/uwp/export/export.cpp
msgid "Release"
-msgstr ""
+msgstr "Släpp"
#: editor/editor_export.cpp
#, fuzzy
@@ -2980,11 +2977,12 @@ msgstr "Färg enhetlig."
#: editor/editor_export.cpp
msgid "64 Bits"
-msgstr ""
+msgstr "64 bitar"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Embed PCK"
-msgstr ""
+msgstr "Bädda in PCK"
#: editor/editor_export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -3046,7 +3044,7 @@ msgstr "Hantera exportmallar..."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
msgid "PCK Embedding"
-msgstr ""
+msgstr "PCK Inbäddning"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -3054,7 +3052,7 @@ msgstr "Den inbäddade PCK får inte vara större än 4 GiB på 32 bitars export
#: editor/editor_export.cpp
msgid "Convert Text Resources To Binary On Export"
-msgstr ""
+msgstr "Konvertera textresurser till binära vid export"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3083,9 +3081,8 @@ msgid "FileSystem Dock"
msgstr "FilSystem"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Import Dock"
-msgstr "Importera"
+msgstr "Importera Brygga"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
@@ -3097,17 +3094,19 @@ msgstr "Tillåter att redigera skript via den integrerade skript-redigeraren."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Ger inbyggd tillgång till tillgångsbiblioteket."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Tillåter redigering av nodhierarkin i scendockan."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Tillåter arbete med signaler och grupper av noden som valts i Scendockan."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
@@ -3145,19 +3144,16 @@ msgid "(Editor Disabled, Properties Disabled)"
msgstr "(Editor inaktiverad, Egenskaper inaktiverad)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Properties Disabled)"
-msgstr "Egenskaper"
+msgstr "(Egenskaper avstängda)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(Editor Disabled)"
-msgstr "Redigera Variabel"
+msgstr "(Redigeraren är avstängd)"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Options:"
-msgstr "Beskrivning:"
+msgstr "Klassalternativ:"
#: editor/editor_feature_profile.cpp
msgid "Enable Contextual Editor"
@@ -3194,9 +3190,8 @@ msgid "Error saving profile to path: '%s'."
msgstr "Fel vid laddning av mall '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "Ladda Standard"
+msgstr "Återställ till Standard"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
@@ -3249,18 +3244,16 @@ msgid "Create or import a profile to edit available classes and properties."
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "New profile name:"
-msgstr "Nytt namn:"
+msgstr "Nytt profilnamn:"
#: editor/editor_feature_profile.cpp
msgid "Godot Feature Profile"
msgstr "Godot funktions profil"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Import Profile(s)"
-msgstr "%d fler filer"
+msgstr "Importera profil(er)"
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -3294,9 +3287,8 @@ msgid "Copy Path"
msgstr "Kopiera Sökväg"
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
-#, fuzzy
msgid "Open in File Manager"
-msgstr "Visa I Filhanteraren"
+msgstr "Öppna i filhanteraren"
#: editor/editor_file_dialog.cpp editor/editor_node.cpp
#: editor/filesystem_dock.cpp editor/project_manager.cpp
@@ -5556,7 +5548,7 @@ msgstr "Miniatyr..."
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr ""
+msgstr "Anslutningar"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5674,6 +5666,10 @@ msgid "Drag And Drop Selection"
msgstr "Alla urval"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11301,7 +11297,7 @@ msgstr "Spela"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
-msgstr ""
+msgstr "Ortogonal"
#: editor/plugins/spatial_editor_plugin.cpp modules/gltf/gltf_camera.cpp
msgid "Perspective"
@@ -11468,7 +11464,7 @@ msgstr "Partiklar"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -12049,6 +12045,11 @@ msgid "New Animation"
msgstr "Animation"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Filtrera noder"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
@@ -24738,8 +24739,9 @@ msgid "Alpha"
msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+#, fuzzy
msgid "Caret"
-msgstr ""
+msgstr "Markör"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -25397,9 +25399,8 @@ msgid "Draw 2D Outlines"
msgstr ""
#: scene/main/scene_tree.cpp servers/visual_server.cpp
-#, fuzzy
msgid "Reflections"
-msgstr "Riktningar"
+msgstr "Reflektioner"
#: scene/main/scene_tree.cpp
msgid "Atlas Size"
@@ -28332,12 +28333,13 @@ msgid "UV Contract Amount"
msgstr ""
#: servers/visual_server.cpp
+#, fuzzy
msgid "Use Simple PVS"
-msgstr ""
+msgstr "Använd enkel PVS"
#: servers/visual_server.cpp
msgid "PVS Logging"
-msgstr ""
+msgstr "PVS loggning"
#: servers/visual_server.cpp
#, fuzzy
@@ -28350,8 +28352,9 @@ msgid "Remove Danglers"
msgstr "Ta Bort Mall"
#: servers/visual_server.cpp
+#, fuzzy
msgid "Flip Imported Portals"
-msgstr ""
+msgstr "Vänd importerade portaler"
#: servers/visual_server.cpp
#, fuzzy
@@ -28359,8 +28362,9 @@ msgid "Occlusion Culling"
msgstr "Redigera Polygon"
#: servers/visual_server.cpp
+#, fuzzy
msgid "Max Active Spheres"
-msgstr ""
+msgstr "Max aktiva sfärer"
#: servers/visual_server.cpp
#, fuzzy
@@ -28373,13 +28377,15 @@ msgid "Shader Compilation Mode"
msgstr "Interpolationsläge"
#: servers/visual_server.cpp
+#, fuzzy
msgid "Max Simultaneous Compiles"
-msgstr ""
+msgstr "Max samtidiga kompileringar"
#: servers/visual_server.cpp
msgid "Log Active Async Compiles Count"
msgstr ""
#: servers/visual_server.cpp
+#, fuzzy
msgid "Shader Cache Size (MB)"
-msgstr ""
+msgstr "Shader Cache Storlek (MB)"
diff --git a/editor/translations/te.po b/editor/translations/te.po
index 98eb54ce5c..03919233f7 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -2074,14 +2074,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2137,8 +2138,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5271,6 +5272,10 @@ msgid "Drag And Drop Selection"
msgstr ""
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11232,6 +11237,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "గణనలà±"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 9460318ef8..1690916a54 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -2223,14 +2223,15 @@ msgstr "ที่ชื่นชอบ:"
msgid "Recent:"
msgstr "ล่าสุด:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "ค้นหา:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "พบ:"
@@ -2291,8 +2292,8 @@ msgstr "ค้นหาทรัพยาà¸à¸£à¸¡à¸²à¹à¸—นที่:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5653,6 +5654,10 @@ msgid "Drag And Drop Selection"
msgstr "เติมที่เลือà¸à¹ƒà¸™ GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11947,6 +11952,11 @@ msgid "New Animation"
msgstr "à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™à¹ƒà¸«à¸¡à¹ˆ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "วิธีà¸à¸²à¸£à¸à¸£à¸­à¸‡"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "ความเร็ว:"
diff --git a/editor/translations/tl.po b/editor/translations/tl.po
index a7a9bacaeb..cc20958dd1 100644
--- a/editor/translations/tl.po
+++ b/editor/translations/tl.po
@@ -2175,14 +2175,15 @@ msgstr "Mga Paborito:"
msgid "Recent:"
msgstr "Kamakailan:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Maghanap:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Mga Tugma:"
@@ -2242,8 +2243,8 @@ msgstr "Maghanap ng Pangpalit na Resource:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5467,6 +5468,10 @@ msgid "Drag And Drop Selection"
msgstr "Kopyahin Ang Pinagpipilian"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11573,6 +11578,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Salain ang mga method"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Bilis:"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 3cbd52b7e4..4980240671 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -74,13 +74,16 @@
# Ramazan Aslan <legendraslan@gmail.com>, 2022.
# paledega <paledega@yandex.ru>, 2022.
# Yekez <yasintonge@gmail.com>, 2022.
+# Deleted User <noreply+46833@weblate.org>, 2022.
+# Emre <mr.inkaya@gmail.com>, 2022.
+# Deleted User <noreply+46858@weblate.org>, 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-07-03 00:44+0000\n"
-"Last-Translator: Yekez <yasintonge@gmail.com>\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
+"Last-Translator: Deleted User <noreply+46858@weblate.org>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\n"
@@ -88,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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -333,15 +336,15 @@ msgstr "Transfer Modu"
#: core/io/packet_peer.cpp
msgid "Encode Buffer Max Size"
-msgstr ""
+msgstr "Kodlama ArabelleÄŸi Maksimum Boyutu"
#: core/io/packet_peer.cpp
msgid "Input Buffer Max Size"
-msgstr ""
+msgstr "GiriÅŸ ArabelleÄŸi Maksimum Boyutu"
#: core/io/packet_peer.cpp
msgid "Output Buffer Max Size"
-msgstr ""
+msgstr "Çıkış Arabelleği Maksimum Boyutu"
#: core/io/packet_peer.cpp
msgid "Stream Peer"
@@ -349,11 +352,11 @@ msgstr ""
#: core/io/stream_peer.cpp
msgid "Big Endian"
-msgstr ""
+msgstr "big-endian"
#: core/io/stream_peer.cpp
msgid "Data Array"
-msgstr ""
+msgstr "Veri Dizisi"
#: core/io/stream_peer_ssl.cpp
msgid "Blocking Handshake"
@@ -383,12 +386,10 @@ msgid "Invalid input %d (not passed) in expression"
msgstr "İfadede geçersiz giriş %d"
#: core/math/expression.cpp
-#, fuzzy
msgid "self can't be used because instance is null (not passed)"
msgstr "self kullanılamaz çünkü örnek boş (geçilmedi)"
#: core/math/expression.cpp
-#, fuzzy
msgid "Invalid operands to operator %s, %s and %s."
msgstr "\"%s\" işlecinde geçersiz terimler, '%s' ve '%s'."
@@ -410,8 +411,9 @@ msgstr "'%s' çağrıldığında:"
#: core/math/random_number_generator.cpp
#: modules/opensimplex/open_simplex_noise.cpp
+#, fuzzy
msgid "Seed"
-msgstr ""
+msgstr "Tohum"
#: core/math/random_number_generator.cpp
msgid "State"
@@ -426,14 +428,12 @@ msgid "Max Size (KB)"
msgstr "En Büyük Boyut (KB)"
#: core/os/input.cpp
-#, fuzzy
msgid "Mouse Mode"
-msgstr "Biçimi Taşı"
+msgstr "Fare Modu"
#: core/os/input.cpp
-#, fuzzy
msgid "Use Accumulated Input"
-msgstr "GiriÅŸi Sil"
+msgstr "BirikmiÅŸ Girdiyi Kullan"
#: core/os/input_event.cpp editor/project_settings_editor.cpp
#: servers/audio_server.cpp
@@ -451,10 +451,9 @@ msgstr "Shift"
#: core/os/input_event.cpp
#, fuzzy
msgid "Control"
-msgstr "Ctrl"
+msgstr "Kontrol TuÅŸu"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Meta"
msgstr "Meta"
@@ -463,9 +462,8 @@ msgid "Command"
msgstr "Komut"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Physical"
-msgstr " (Fiziksel)"
+msgstr "Fiziksel"
#: core/os/input_event.cpp scene/2d/touch_screen_button.cpp
#: scene/gui/base_button.cpp scene/gui/texture_button.cpp
@@ -474,7 +472,6 @@ msgid "Pressed"
msgstr "Basılmış"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Scancode"
msgstr "Tarama kodu"
@@ -483,14 +480,12 @@ msgid "Physical Scancode"
msgstr "Fiziksel TuÅŸ Kodu"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Unicode"
-msgstr "Unicode"
+msgstr "Evrensel Kod"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Echo"
-msgstr "Eko"
+msgstr "Yankı"
#: core/os/input_event.cpp scene/gui/base_button.cpp
msgid "Button Mask"
@@ -501,9 +496,8 @@ msgid "Global Position"
msgstr "Global Pozisyon"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Factor"
-msgstr "Vektör"
+msgstr "Etken"
#: core/os/input_event.cpp
msgid "Button Index"
@@ -522,8 +516,9 @@ msgid "Pressure"
msgstr "Baskı"
#: core/os/input_event.cpp
+#, fuzzy
msgid "Pen Inverted"
-msgstr ""
+msgstr "Ters Kalem"
#: core/os/input_event.cpp
msgid "Relative"
@@ -584,18 +579,16 @@ msgid "Velocity"
msgstr "Hız"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Instrument"
msgstr "Alet"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Controller Number"
-msgstr "Satır Numarası:"
+msgstr "Denetleyici Numarası"
#: core/os/input_event.cpp
msgid "Controller Value"
-msgstr ""
+msgstr "Denetleyici DeÄŸeri"
#: core/project_settings.cpp editor/editor_node.cpp main/main.cpp
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
@@ -719,7 +712,7 @@ msgstr "Ana Sahne DeÄŸiÅŸtirgenleri:"
#: core/project_settings.cpp
#, fuzzy
msgid "Scene Naming"
-msgstr "Sahne Yolu:"
+msgstr "Sahne Adlandırma"
#: core/project_settings.cpp
msgid "Search In File Extensions"
@@ -732,12 +725,12 @@ msgstr "Script Dosyalarını Aramak İçin Dosya Yolu"
#: core/project_settings.cpp
#, fuzzy
msgid "Version Control Autoload On Startup"
-msgstr "Başlangıçta Otomatik Yükleme"
+msgstr "Başlangıçta Otomatik Sürüm Kontrolü"
#: core/project_settings.cpp
#, fuzzy
msgid "Version Control Plugin Name"
-msgstr "Sürüm Kontrol"
+msgstr "Sürüm Denetimi Eklenti Adı"
#: core/project_settings.cpp scene/2d/collision_object_2d.cpp
#: scene/3d/collision_object.cpp scene/gui/control.cpp
@@ -921,7 +914,6 @@ msgid "Modules"
msgstr "Modüller"
#: core/register_core_types.cpp
-#, fuzzy
msgid "TCP"
msgstr "TCP"
@@ -930,8 +922,9 @@ msgid "Connect Timeout Seconds"
msgstr "Bağlanma Zaman Aşımı Süresi(Saniye)"
#: core/register_core_types.cpp
+#, fuzzy
msgid "Packet Peer Stream"
-msgstr ""
+msgstr "Paket Eş Akışı"
#: core/register_core_types.cpp
msgid "Max Buffer (Power of 2)"
@@ -977,7 +970,7 @@ msgstr "Deneme"
#: core/translation.cpp scene/resources/font.cpp
msgid "Fallback"
-msgstr ""
+msgstr "Geri Dönüş"
#: core/ustring.cpp scene/resources/segment_shape_2d.cpp
msgid "B"
@@ -1018,12 +1011,12 @@ msgstr "Arabellek"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Buffer Size (KB)"
-msgstr ""
+msgstr "Tuval Çokgen Arabellek Boyutu (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
msgid "Canvas Polygon Index Buffer Size (KB)"
-msgstr ""
+msgstr "Tuval Çokgen Dizini Arabellek Boyutu (KB)"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp editor/editor_settings.cpp
@@ -1039,36 +1032,33 @@ msgstr "2D"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Snapping"
msgstr "Akıllı Hizalama"
#: drivers/gles2/rasterizer_canvas_base_gles2.cpp
#: drivers/gles3/rasterizer_canvas_base_gles3.cpp
-#, fuzzy
msgid "Use GPU Pixel Snap"
msgstr "Piksel Yapışması Kullan"
#: drivers/gles2/rasterizer_scene_gles2.cpp
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Immediate Buffer Size (KB)"
-msgstr ""
+msgstr "Anlık Arabellek Boyutu (KB)"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
-#, fuzzy
msgid "Lightmapping"
-msgstr "Işık-Haritalarını Pişir"
+msgstr "Işık Haritalama"
#: drivers/gles2/rasterizer_storage_gles2.cpp
#: drivers/gles3/rasterizer_storage_gles3.cpp
+#, fuzzy
msgid "Use Bicubic Sampling"
-msgstr ""
+msgstr "Bicubic Örneklemeyi Kullanın"
#: drivers/gles3/rasterizer_scene_gles3.cpp
-#, fuzzy
msgid "Max Renderable Elements"
-msgstr "Maks. Renderlanabilinecek Ögeler"
+msgstr "Maksimum İşlenebilir Öğeler"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Max Renderable Lights"
@@ -1105,11 +1095,12 @@ msgstr "Yüzeyi Takip Et"
#: drivers/gles3/rasterizer_scene_gles3.cpp
msgid "Weight Samples"
-msgstr ""
+msgstr "Ağırlık Örnekleri"
#: drivers/gles3/rasterizer_scene_gles3.cpp
+#, fuzzy
msgid "Voxel Cone Tracing"
-msgstr ""
+msgstr "Işın İzleme"
#: drivers/gles3/rasterizer_scene_gles3.cpp scene/resources/environment.cpp
msgid "High Quality"
@@ -1117,7 +1108,7 @@ msgstr "Yüksek Kalite"
#: drivers/gles3/rasterizer_storage_gles3.cpp
msgid "Blend Shape Max Buffer Size (KB)"
-msgstr ""
+msgstr "Karışım Şekli Maksimum Arabellek Boyutu (KB)"
#. TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror).
#: editor/animation_bezier_editor.cpp
@@ -1191,9 +1182,8 @@ msgstr "Animasyon Değişikliği Çağrısı"
#: 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 "Kare %"
+msgstr "Kare"
#: editor/animation_track_editor.cpp editor/editor_profiler.cpp
#: scene/2d/cpu_particles_2d.cpp scene/2d/particles_2d.cpp
@@ -1248,8 +1238,9 @@ msgstr "Tutamacı Ayarla"
#: 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 "Aktarım"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -1410,7 +1401,7 @@ msgstr "Tür:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "(Invalid, expected type: %s)"
-msgstr "Geçersiz Dışa Aktarım Şablonu:"
+msgstr "(Geçersiz Dışa Aktarım Şablonu: %s)"
#: editor/animation_track_editor.cpp
msgid "Easing:"
@@ -1429,22 +1420,22 @@ msgstr "Tutamacı Ayarla"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Stream:"
-msgstr "Radyo Ögesi"
+msgstr "Aktarım:"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Start (s):"
-msgstr "Yeniden BaÅŸlat (sn):"
+msgstr "Başlangıç (lar):"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "End (s):"
-msgstr "Açılma (sn):"
+msgstr "BitiÅŸ (ler):"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Animation Clip:"
-msgstr "Animasyonlar:"
+msgstr "Animasyon Klibi:"
#: editor/animation_track_editor.cpp
msgid "Toggle Track Enabled"
@@ -1535,7 +1526,7 @@ msgstr "Düzenleyici"
#: editor/animation_track_editor.cpp editor/editor_settings.cpp
#, fuzzy
msgid "Confirm Insert Track"
-msgstr "Animasyon İz & Anahtar Ekle"
+msgstr "Parça Eklemeyi Onayla"
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
@@ -1662,7 +1653,7 @@ msgstr "Yöntem İz Anahtarı Ekle"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Method not found in object:"
-msgstr "Metot, nesne içinde bulunamadı: "
+msgstr "Metot, nesne içinde bulunamadı:"
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -2195,14 +2186,15 @@ msgstr "BeÄŸeniler:"
msgid "Recent:"
msgstr "Yakın zamanda:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Ara:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "EÅŸleÅŸmeler:"
@@ -2262,8 +2254,8 @@ msgstr "Yerine Geçecek Kaynak Ara:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -2271,8 +2263,9 @@ msgid "Open"
msgstr "Aç"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Owners of: %s (Total: %d)"
-msgstr ""
+msgstr "Sahipleri: %s (Toplam: %d)"
#: editor/dependency_editor.cpp
msgid ""
@@ -2631,7 +2624,7 @@ msgstr "'%s' dosyası bulunamadı."
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Layout:"
-msgstr "Yerleşim Düzeni"
+msgstr "Yerleşim Düzeni:"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -2682,7 +2675,7 @@ msgstr "Yeni bir Bus Yerleşim Düzeni oluştur."
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Audio Bus Layout"
-msgstr "Audio Bus Yerleşim Düzenini Aç"
+msgstr "Ses Veri Yolu Düzeni"
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
@@ -2834,23 +2827,24 @@ msgid "Choose"
msgstr "Seç"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Project export for platform:"
-msgstr ""
+msgstr "Platform için proje dışa aktarımı:"
#: editor/editor_export.cpp
#, fuzzy
msgid "Completed with errors."
-msgstr "Düğüm Yolunu Kopyala"
+msgstr "Hatalarla tamamlandı."
#: editor/editor_export.cpp
#, fuzzy
msgid "Completed successfully."
-msgstr "Paket Başarı ile Kuruldu!"
+msgstr "Başarıyla tamamlandı."
#: editor/editor_export.cpp
#, fuzzy
msgid "Failed."
-msgstr "Başarısız:"
+msgstr "Başarısız."
#: editor/editor_export.cpp
msgid "Storing File:"
@@ -2867,27 +2861,27 @@ msgstr "Çıkınla"
#: editor/editor_export.cpp
#, fuzzy
msgid "Save PCK"
-msgstr "Farklı Kaydet"
+msgstr "PCK'yi kaydet"
#: editor/editor_export.cpp
#, fuzzy
msgid "Cannot create file \"%s\"."
-msgstr "Klasör oluşturulamadı."
+msgstr "\"%s\" dosyası oluşturulamıyor."
#: editor/editor_export.cpp
#, fuzzy
msgid "Failed to export project files."
-msgstr "Proje dosyaları dışa aktarılamadı"
+msgstr "Proje dosyaları dışa aktarılamadı."
#: editor/editor_export.cpp
#, fuzzy
msgid "Can't open file to read from path \"%s\"."
-msgstr "Dosya yazmak için açılamıyor:"
+msgstr "\"%s\" yolundan okunacak dosya açılamıyor."
#: editor/editor_export.cpp
#, fuzzy
msgid "Save ZIP"
-msgstr "Farklı Kaydet"
+msgstr "ZIP dosyasını kaydet"
#: editor/editor_export.cpp
msgid ""
@@ -2950,7 +2944,7 @@ msgstr ""
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom Template"
-msgstr "Editör Teması"
+msgstr "Özel Şablon"
#: editor/editor_export.cpp editor/project_export.cpp
#: platform/android/export/export_plugin.cpp platform/iphone/export/export.cpp
@@ -2962,36 +2956,42 @@ msgstr "Yayınlamak"
#: editor/editor_export.cpp
#, fuzzy
msgid "Binary Format"
-msgstr "Renk operatörü."
+msgstr "Çift Biçim"
#: editor/editor_export.cpp
+#, fuzzy
msgid "64 Bits"
-msgstr ""
+msgstr "64 Bit"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Embed PCK"
-msgstr ""
+msgstr "PCK'yı yerleştirin"
#: editor/editor_export.cpp platform/osx/export/export.cpp
#, fuzzy
msgid "Texture Format"
-msgstr "DokuBölgesi"
+msgstr "Doku Biçimi"
#: editor/editor_export.cpp
+#, fuzzy
msgid "BPTC"
-msgstr ""
+msgstr "BPTC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
+#, fuzzy
msgid "S3TC"
-msgstr ""
+msgstr "S3TC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
+#, fuzzy
msgid "ETC"
-msgstr ""
+msgstr "ETC"
#: editor/editor_export.cpp platform/osx/export/export.cpp
+#, fuzzy
msgid "ETC2"
-msgstr ""
+msgstr "ETC2"
#: editor/editor_export.cpp
#, fuzzy
@@ -3013,7 +3013,7 @@ msgstr "Özel yayınlama şablonu bulunamadı."
#: editor/editor_export.cpp
#, fuzzy
msgid "Prepare Template"
-msgstr "Şablonlarını Yönet"
+msgstr "Şablon Hazırla"
#: editor/editor_export.cpp platform/osx/export/export.cpp
#, fuzzy
@@ -3023,12 +3023,12 @@ msgstr "Belirtilen Dışa aktarım yolu mevcut değil:"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
#, fuzzy
msgid "Template file not found: \"%s\"."
-msgstr "Şablon dosyası bulunamadı:"
+msgstr "Şablon dosyası bulunamadı: \"%s\"."
#: editor/editor_export.cpp
#, fuzzy
msgid "Failed to copy export template."
-msgstr "Geçersiz Dışa Aktarım Şablonu:"
+msgstr "Dışa aktarma şablonu kopyalanamadı."
#: editor/editor_export.cpp platform/windows/export/export.cpp
#: platform/x11/export/export.cpp
@@ -3041,8 +3041,9 @@ msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
msgstr "32-bit dışa aktarımlarda gömülü PCK 4GiB'tan büyük olamaz."
#: editor/editor_export.cpp
+#, fuzzy
msgid "Convert Text Resources To Binary On Export"
-msgstr ""
+msgstr "Dışa Aktarmada Metin Kaynaklarını İkili Dosyaya Dönüştür"
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
@@ -3253,7 +3254,7 @@ msgstr "Dışa Aktarım Şablonlarını Yönet"
#: editor/editor_feature_profile.cpp
#, fuzzy
msgid "Default Feature Profile"
-msgstr "Godot Özellik Profili"
+msgstr "Varsayılan Özellik Profili"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
@@ -3327,12 +3328,12 @@ msgstr "Bir Dosya Kaydet"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Access"
-msgstr "Başarılı!"
+msgstr "EriÅŸim"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#, fuzzy
msgid "Display Mode"
-msgstr "Oynatma Modu:"
+msgstr "Ekran Modu"
#: editor/editor_file_dialog.cpp
#: editor/import/resource_importer_layered_texture.cpp
@@ -3347,32 +3348,33 @@ msgstr "Oynatma Modu:"
#: servers/audio/effects/audio_effect_distortion.cpp
#, fuzzy
msgid "Mode"
-msgstr "Kaydırma Biçimi"
+msgstr "Mod"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current Dir"
-msgstr "Geçerli:"
+msgstr "Geçerli Dizin"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current File"
-msgstr "Åžu Anki Profil:"
+msgstr "Geçerli Dosya"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Current Path"
-msgstr "Geçerli:"
+msgstr "Geçerli Yol"
#: editor/editor_file_dialog.cpp editor/editor_settings.cpp
#: scene/gui/file_dialog.cpp
#, fuzzy
msgid "Show Hidden Files"
-msgstr "Gizli Dosyalari Aç / Kapat"
+msgstr "Gizli Dosyaları Göster"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Disable Overwrite Warning"
-msgstr ""
+msgstr "Üzerine Yazma Uyarısını Devre Dışı Bırak"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
@@ -3474,8 +3476,9 @@ msgid "(Re)Importing Assets"
msgstr "Varlıklar Yeniden-İçe Aktarılıyor"
#: editor/editor_file_system.cpp
+#, fuzzy
msgid "Reimport Missing Imported Files"
-msgstr ""
+msgstr "İçe Aktarılan Eksik Dosyaları Yeniden İçe Aktar"
#: editor/editor_help.cpp scene/2d/camera_2d.cpp scene/gui/control.cpp
#: scene/gui/nine_patch_rect.cpp scene/resources/dynamic_font.cpp
@@ -3507,7 +3510,7 @@ msgstr "Özellikler"
#: editor/editor_help.cpp
#, fuzzy
msgid "overrides %s:"
-msgstr "% üzerine yazılmışlar:"
+msgstr "%s'yi geçersiz kılar:"
#: editor/editor_help.cpp
msgid "default:"
@@ -3579,7 +3582,7 @@ msgstr ""
#: modules/gdscript/gdscript_editor.cpp
#, fuzzy
msgid "Text Editor"
-msgstr "Düzenleyiciyi Aç"
+msgstr "Metin Düzenleyici"
#: editor/editor_help.cpp editor/editor_node.cpp editor/editor_settings.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -3587,8 +3590,9 @@ msgid "Help"
msgstr "Yardım"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Sort Functions Alphabetically"
-msgstr ""
+msgstr "Fonksiyonları Alfabetik Olarak Sırala"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -3670,34 +3674,34 @@ msgstr "Özellik:"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
#, fuzzy
msgid "Label"
-msgstr "DeÄŸer"
+msgstr "Etiket"
#: editor/editor_inspector.cpp editor/editor_spin_slider.cpp
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Read Only"
-msgstr "Sadece Metotlar"
+msgstr "Sadece Okunur"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
#, fuzzy
msgid "Checkable"
-msgstr "Öğeyi Denetle"
+msgstr "Kontrol edilebilir"
#: editor/editor_inspector.cpp editor/plugins/item_list_editor_plugin.cpp
#: scene/resources/default_theme/default_theme.cpp
#, fuzzy
msgid "Checked"
-msgstr "Denetlenen Öğe"
+msgstr "Kontrol edildi"
#: editor/editor_inspector.cpp
#, fuzzy
msgid "Draw Red"
-msgstr "Çizim Çağrıları:"
+msgstr "Kırmızı Çiz"
#: editor/editor_inspector.cpp
#, fuzzy
msgid "Keying"
-msgstr "Oynat"
+msgstr "Anahtarlama"
#: editor/editor_inspector.cpp
msgid "Pin value"
@@ -4062,12 +4066,12 @@ msgstr "Betiği Hızlı Aç..."
#: editor/editor_node.cpp
#, fuzzy
msgid "Save & Reload"
-msgstr "Kaydet ve BaÅŸtan BaÅŸlat"
+msgstr "Kaydet ve Yeniden Yükle"
#: editor/editor_node.cpp
#, fuzzy
msgid "Save changes to '%s' before reloading?"
-msgstr "Kapatmadan önce değişklikler buraya '%s' kaydedilsin mi?"
+msgstr "Çıkmadan önce değişiklikler '%s' ‘ye kaydedilsin mi?"
#: editor/editor_node.cpp
msgid "Save & Close"
@@ -4188,7 +4192,7 @@ msgstr "Proje Yöneticisi Açılsın Mı?"
#: editor/editor_node.cpp
#, fuzzy
msgid "Save changes to the following scene(s) before reloading?"
-msgstr "Çıkmadan önce değişiklikler aşağıdaki sahne(ler)e kaydedilsin mi?"
+msgstr "Çıkmadan önce değişiklikler sahne(ler)e kaydedilsin mi?"
#: editor/editor_node.cpp
msgid "Save & Quit"
@@ -4372,54 +4376,53 @@ msgid "%d more files"
msgstr "%d daha fazla dosyalar"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"Unable to write to file '%s', file in use, locked or lacking permissions."
msgstr ""
+"'%s' dosyasına yazılamıyor, dosya kullanımda, kilitli veya izinler eksik."
#: editor/editor_node.cpp editor/editor_settings.cpp editor/scene_tree_dock.cpp
#: servers/arvr/arvr_interface.cpp
-#, fuzzy
msgid "Interface"
-msgstr "Kullanıcı Arayüzü"
+msgstr "Arayüz"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Scene Tabs"
-msgstr "Sahne Sekmesine Geç"
+msgstr "Sahne Sekmeleri"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Always Show Close Button"
-msgstr "Daima Izgarayı Göster"
+msgstr "Daima Kapatma Düğmesini Göster"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Resize If Many Tabs"
-msgstr ""
+msgstr "Çok Sayıda Sekme Varsa Yeniden Boyutlandır"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Minimum Width"
-msgstr ""
+msgstr "Minimum GeniÅŸlik"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Output"
msgstr "Çıktı"
#: editor/editor_node.cpp editor/editor_settings.cpp
-#, fuzzy
msgid "Always Clear Output On Play"
-msgstr "Çıktıyı Temizle"
+msgstr "Oynatıldığında Çıktıyı Daima Temizle"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Open Output On Play"
-msgstr ""
+msgstr "Oynatıldığında Çıktıyı Daima Aç"
#: editor/editor_node.cpp editor/editor_settings.cpp
msgid "Always Close Output On Stop"
-msgstr ""
+msgstr "Durdurulduğunda Çıktıyı Daima Kapat"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Save On Focus Loss"
-msgstr ""
+msgstr "Odak Kaybından Tasarruf Edin"
#: editor/editor_node.cpp editor/editor_settings.cpp
#, fuzzy
@@ -5235,9 +5238,8 @@ msgid "Size:"
msgstr "Boyut:"
#: editor/editor_properties_array_dict.cpp
-#, fuzzy
msgid "Page:"
-msgstr "Sayfa: "
+msgstr "Sayfa:"
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -5537,7 +5539,7 @@ msgstr "Küçük Resim..."
#: editor/editor_settings.cpp
msgid "Docks"
-msgstr ""
+msgstr "Eklentiler"
#: editor/editor_settings.cpp
#, fuzzy
@@ -5658,6 +5660,10 @@ msgid "Drag And Drop Selection"
msgstr "GridMap Seçimi"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -6204,7 +6210,7 @@ msgstr "Önden Görünüm"
#: modules/gdscript/language_server/gdscript_language_server.cpp
#, fuzzy
msgid "Remote Host"
-msgstr "Uzak "
+msgstr "Uzak Ana Bilgisayar"
#: editor/editor_settings.cpp
#: modules/gdscript/language_server/gdscript_language_server.cpp
@@ -7199,7 +7205,7 @@ msgstr "İfade"
#: editor/import/resource_importer_obj.cpp
#, fuzzy
msgid "Optimize Mesh Flags"
-msgstr "Boyut: "
+msgstr "Boyut:"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Single Scene"
@@ -7403,7 +7409,7 @@ msgstr "Işık-haritaları Üretiliyor"
#: editor/import/resource_importer_scene.cpp
#, fuzzy
msgid "Generating for Mesh:"
-msgstr "Örüntü için Üretiliyor: "
+msgstr "Örüntü için Üretiliyor:"
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -7503,7 +7509,7 @@ msgstr "Rastgele Ölçek:"
#: editor/import/resource_importer_texture.cpp
#, fuzzy
msgid "Size Limit"
-msgstr "Boyut: "
+msgstr "Boyut Limiti"
#: editor/import/resource_importer_texture.cpp
msgid "Detect 3D"
@@ -8426,7 +8432,7 @@ msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
msgid "Transition:"
-msgstr "Geçiş: "
+msgstr "Geçiş:"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Play Mode:"
@@ -10195,7 +10201,7 @@ msgstr "Oylum"
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "Emission Source:"
-msgstr "Emisyon Kaynağı: "
+msgstr "Emisyon Kaynağı:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -11293,15 +11299,13 @@ msgstr "Çevir"
#. TRANSLATORS: Refers to changing the scale of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scaling:"
-msgstr "Ölçekleniyor: "
+msgstr "Ölçekleniyor:"
#. TRANSLATORS: Refers to changing the position of a node in the 3D editor.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translating:"
-msgstr "Çeviriliyor: "
+msgstr "Çevriliyor:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
@@ -11843,19 +11847,17 @@ msgid "Sprite"
msgstr "HayaliÇizimlik"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Simplification:"
-msgstr "SadeleÅŸtirme: "
+msgstr "SadeleÅŸtirme:"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
msgid "Shrink (Pixels):"
-msgstr "Sıkıştır (Pikselleri): "
+msgstr "Sıkıştır (Pikselleri):"
#: editor/plugins/sprite_editor_plugin.cpp
-#, fuzzy
msgid "Grow (Pixels):"
-msgstr "Büyüt (Pikselleri): "
+msgstr "Büyüt (Piksel):"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -11918,6 +11920,11 @@ msgid "New Animation"
msgstr "Yeni Animasyon"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Metotları filtrele"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Hız:"
@@ -13308,7 +13315,6 @@ msgid "Select SSH private key path"
msgstr "SSH özel anahtar yolu seç"
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "SSH Passphrase"
msgstr "SSH Parolası"
@@ -16017,7 +16023,7 @@ msgstr "Düğüm Betiği İliştir"
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Remote %s:"
-msgstr "Uzak "
+msgstr "Uzak %s:"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -17077,9 +17083,8 @@ msgid "Disabled GDNative Singleton"
msgstr "GDNative İskeleti Pasifleştirildi"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
-#, fuzzy
msgid "Libraries:"
-msgstr "Kütüphaneler: "
+msgstr "Kütüphaneler:"
#: modules/gdnative/nativescript/nativescript.cpp
#, fuzzy
@@ -17983,7 +17988,7 @@ msgstr ""
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid "Node returned an invalid sequence output:"
-msgstr "Düğüm geçersiz bir dizi çıktısı döndürdü: "
+msgstr "Düğüm geçersiz bir dizi çıktısı döndürdü:"
#: modules/visual_script/visual_script.cpp
msgid "Found sequence bit but not the node in the stack, report bug!"
@@ -18345,8 +18350,9 @@ msgid "if (cond) is:"
msgstr ""
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "While"
-msgstr "While"
+msgstr "Sürece"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "while (cond):"
@@ -22071,7 +22077,7 @@ msgstr "Kenar BoÅŸluk Belirle"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
msgid "Sync To Physics"
-msgstr " (Fiziksel)"
+msgstr "FiziÄŸe Senkronize Et"
#: scene/2d/physics_body_2d.cpp scene/3d/physics_body.cpp
#, fuzzy
@@ -23575,7 +23581,7 @@ msgstr "Bir RoomGroup, bir Portal'ın çocuğu veya torunu olmamalıdır."
#: scene/3d/portal.cpp
#, fuzzy
msgid "Portal Active"
-msgstr " [portallar aktif]"
+msgstr "Portal Aktif"
#: scene/3d/portal.cpp scene/resources/occluder_shape_polygon.cpp
msgid "Two Way"
@@ -24866,7 +24872,7 @@ msgstr ""
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Caret"
-msgstr ""
+msgstr "Karet"
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Blink"
@@ -25788,14 +25794,12 @@ msgid "3D Render"
msgstr "OluÅŸturucu:"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "2D Physics"
-msgstr " (Fiziksel)"
+msgstr "2B Fizik"
#: scene/register_scene_types.cpp
-#, fuzzy
msgid "3D Physics"
-msgstr " (Fiziksel)"
+msgstr "3B Fizik"
#: scene/register_scene_types.cpp
#, fuzzy
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index fd20ea0a29..0feae1a849 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -29,7 +29,7 @@ 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-07-03 00:44+0000\n"
+"PO-Revision-Date: 2022-07-26 01:55+0000\n"
"Last-Translator: Artem <artem@molotov.work>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -39,7 +39,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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -2116,14 +2116,15 @@ msgstr "Вибране:"
msgid "Recent:"
msgstr "Ðещодавні:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Пошук:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Збіги:"
@@ -2183,8 +2184,8 @@ msgstr "Знайти замінний реÑурÑ:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5500,6 +5501,10 @@ msgid "Drag And Drop Selection"
msgstr "Вибір GridMap"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "ВиглÑд"
@@ -11612,6 +11617,11 @@ msgid "New Animation"
msgstr "Ðова анімаціÑ"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Фільтрувати методи"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "ШвидкіÑть:"
@@ -25888,11 +25898,11 @@ msgstr "Розмір крапки"
#: scene/resources/material.cpp
msgid "Billboard Mode"
-msgstr "Режим афіші"
+msgstr "Режим розголоÑника"
#: scene/resources/material.cpp
msgid "Billboard Keep Scale"
-msgstr "Зберегти маÑштаб афіші"
+msgstr "Зберегти маÑштаб розголоÑника"
#: scene/resources/material.cpp
msgid "Grow"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 46cd56a57b..9cb56f3c21 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -2132,14 +2132,15 @@ msgstr ""
msgid "Recent:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr ""
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr ""
@@ -2195,8 +2196,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5421,6 +5422,10 @@ msgid "Drag And Drop Selection"
msgstr ".تمام کا انتخاب"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -11599,6 +11604,11 @@ msgid "New Animation"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 32fe3c1087..4a6164f7e1 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -2149,14 +2149,15 @@ msgstr "Ưa thích:"
msgid "Recent:"
msgstr "Gần đây:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "Tìm kiếm:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "Phù hợp:"
@@ -2216,8 +2217,8 @@ msgstr "Tìm kiếm tài nguyên thay thế:"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5506,6 +5507,10 @@ msgid "Drag And Drop Selection"
msgstr "Chá»n tất cả"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "Ngoại hình"
@@ -11788,6 +11793,11 @@ msgid "New Animation"
msgstr "Hoạt hình mới"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "Lá»c phương thức"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "Tốc độ:"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index a2183dd550..bd012a4c76 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -89,7 +89,7 @@ msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"Report-Msgid-Bugs-To: https://github.com/godotengine/godot\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2022-07-09 21:12+0000\n"
+"PO-Revision-Date: 2022-07-19 16:26+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 +98,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.13.1-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: core/bind/core_bind.cpp main/main.cpp
msgid "Tablet Driver"
@@ -521,9 +521,8 @@ msgid "Pressure"
msgstr "压力"
#: core/os/input_event.cpp
-#, fuzzy
msgid "Pen Inverted"
-msgstr "翻转"
+msgstr "笔触翻转"
#: core/os/input_event.cpp
msgid "Relative"
@@ -2157,14 +2156,15 @@ msgstr "æ”¶è—:"
msgid "Recent:"
msgstr "最近使用:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "æœç´¢ï¼š"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "匹é…项:"
@@ -2224,8 +2224,8 @@ msgstr "查找替æ¢èµ„æºï¼š"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5444,6 +5444,10 @@ msgid "Drag And Drop Selection"
msgstr "拖放选中内容"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "外观"
@@ -10700,7 +10704,7 @@ msgid ""
"This shader has been modified on on disk.\n"
"What action should be taken?"
msgstr ""
-"æ­¤ç€è‰²å™¨å·²åœ¨ç£ç›˜ä¸Šä¿®æ”¹ã€‚\n"
+"这个ç€è‰²å™¨å·²åœ¨ç£ç›˜ä¸Šä¿®æ”¹ã€‚\n"
"应该采å–什么行动?"
#: editor/plugins/shader_editor_plugin.cpp scene/resources/material.cpp
@@ -11466,6 +11470,11 @@ msgid "New Animation"
msgstr "新建动画"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "筛选方法"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "速度:"
@@ -22562,9 +22571,8 @@ msgstr ""
"建议修改å­èŠ‚ç‚¹çš„ç¢°æ’žä½“å½¢çŠ¶å°ºå¯¸ã€‚"
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "å…¨å±€å˜æ¢"
+msgstr "全局平移"
#: scene/3d/spatial.cpp
msgid "Matrix"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index dcd0403c6a..424752a849 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -2228,14 +2228,15 @@ msgstr "最愛:"
msgid "Recent:"
msgstr "最近:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "æœå°‹ï¼š"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "å»åˆï¼š"
@@ -2291,8 +2292,8 @@ msgstr ""
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5677,6 +5678,10 @@ msgid "Drag And Drop Selection"
msgstr "刪除é¸ä¸­æª”案"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr ""
@@ -12116,6 +12121,11 @@ msgid "New Animation"
msgstr "新的動畫å稱:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "篩é¸:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr ""
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index d56bc9ec23..f5568c41b5 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -41,7 +41,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-07-18 08:11+0000\n"
+"PO-Revision-Date: 2022-07-23 03:57+0000\n"
"Last-Translator: è˜è˜ <rrt467778@gmail.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
@@ -2112,14 +2112,15 @@ msgstr "我的最愛:"
msgid "Recent:"
msgstr "最近存å–:"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/rename_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search:"
msgstr "æœå°‹ï¼š"
-#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/create_dialog.cpp editor/editor_quick_open.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Matches:"
msgstr "ç¬¦åˆæ¢ä»¶ï¼š"
@@ -2179,8 +2180,8 @@ msgstr "æœå°‹ä¸¦å–代資æºï¼š"
#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
#: editor/editor_help_search.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
-#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/editor_quick_open.cpp editor/filesystem_dock.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/script_create_dialog.cpp
#: modules/visual_script/visual_script_property_selector.cpp
#: scene/gui/file_dialog.cpp
@@ -5402,6 +5403,10 @@ msgid "Drag And Drop Selection"
msgstr "æ‹–ç§»é¸æ“‡çš„æª”案"
#: editor/editor_settings.cpp
+msgid "Stay In Script Editor On Node Selected"
+msgstr ""
+
+#: editor/editor_settings.cpp
msgid "Appearance"
msgstr "外觀"
@@ -11438,6 +11443,11 @@ msgid "New Animation"
msgstr "新增動畫"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
+msgid "Filter animations"
+msgstr "ç¯©é¸æ–¹æ³•"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed:"
msgstr "速度:"
@@ -23144,9 +23154,8 @@ msgstr ""
"請改為修改其å­ç¯€é»žçš„碰撞形狀之大å°ã€‚"
#: scene/3d/spatial.cpp
-#, fuzzy
msgid "Global Translation"
-msgstr "ä¿æŒå…¨åŸŸè®Šæ›"
+msgstr "全域變æ›"
#: scene/3d/spatial.cpp
msgid "Matrix"
diff --git a/main/main.cpp b/main/main.cpp
index 73950f3471..190f25dbe6 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -181,7 +181,6 @@ static bool debug_navigation = false;
static int frame_delay = 0;
static bool disable_render_loop = false;
static int fixed_fps = -1;
-static String write_movie_path;
static MovieWriter *movie_writer = nullptr;
static bool disable_vsync = false;
static bool print_fps = false;
@@ -286,6 +285,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Run options:\n");
+ OS::get_singleton()->print(" -- Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n");
#ifdef TOOLS_ENABLED
OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
@@ -344,6 +344,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
+ OS::get_singleton()->print(" --xr-mode <mode> Select XR mode (default/off/on).\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Debug options:\n");
@@ -623,6 +624,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
/* argument parsing and main creation */
List<String> args;
List<String> main_args;
+ List<String> user_args;
+ bool adding_user_args = false;
List<String> platform_args = OS::get_singleton()->get_cmdline_platform_args();
// Add command line arguments.
@@ -695,9 +698,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
continue;
}
#endif
+
List<String>::Element *N = I->next();
- if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
+ if (adding_user_args) {
+ user_args.push_back(I->get());
+ } else if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
show_help = true;
exit_code = ERR_HELP; // Hack to force an early exit in `main()` with a success code.
@@ -1162,7 +1168,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
} else if (I->get() == "--write-movie") {
if (I->next()) {
- write_movie_path = I->next()->get();
+ Engine::get_singleton()->set_write_movie_path(I->next()->get());
N = I->next()->next();
if (fixed_fps == -1) {
fixed_fps = 60;
@@ -1182,6 +1188,26 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->disable_crash_handler();
} else if (I->get() == "--skip-breakpoints") {
skip_breakpoints = true;
+ } else if (I->get() == "--xr-mode") {
+ if (I->next()) {
+ String xr_mode = I->next()->get().to_lower();
+ N = I->next()->next();
+ if (xr_mode == "default") {
+ XRServer::set_xr_mode(XRServer::XRMODE_DEFAULT);
+ } else if (xr_mode == "off") {
+ XRServer::set_xr_mode(XRServer::XRMODE_OFF);
+ } else if (xr_mode == "on") {
+ XRServer::set_xr_mode(XRServer::XRMODE_ON);
+ } else {
+ OS::get_singleton()->print("Unknown --xr-mode argument \"%s\", aborting.\n", xr_mode.ascii().get_data());
+ goto error;
+ }
+ } else {
+ OS::get_singleton()->print("Missing --xr-mode argument, aborting.\n");
+ goto error;
+ }
+ } else if (I->get() == "--") {
+ adding_user_args = true;
} else {
main_args.push_back(I->get());
}
@@ -1358,7 +1384,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Logger::set_flush_stdout_on_print(ProjectSettings::get_singleton()->get("application/run/flush_stdout_on_print"));
- OS::get_singleton()->set_cmdline(execpath, main_args);
+ OS::get_singleton()->set_cmdline(execpath, main_args, user_args);
// possibly be worth changing the default from vulkan to something lower spec,
// for the project manager, depending on how smooth the fallback is.
@@ -1512,7 +1538,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
audio_driver_idx = 0;
}
- if (write_movie_path != String()) {
+ if (Engine::get_singleton()->get_write_movie_path() != String()) {
// Always use dummy driver for audio driver (which is last), also in no threaded mode.
audio_driver_idx = AudioDriverManager::get_driver_count() - 1;
AudioDriverDummy::get_dummy_singleton()->set_use_threads(false);
@@ -1609,7 +1635,7 @@ error:
display_driver = "";
audio_driver = "";
tablet_driver = "";
- write_movie_path = "";
+ Engine::get_singleton()->set_write_movie_path(String());
project_path = "";
args.clear();
@@ -1651,6 +1677,7 @@ error:
unregister_core_types();
OS::get_singleton()->_cmdline.clear();
+ OS::get_singleton()->_user_args.clear();
if (message_queue) {
memdelete(message_queue);
@@ -1784,11 +1811,11 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
rendering_server->set_print_gpu_profile(true);
}
- if (write_movie_path != String()) {
- movie_writer = MovieWriter::find_writer_for_file(write_movie_path);
+ if (Engine::get_singleton()->get_write_movie_path() != String()) {
+ movie_writer = MovieWriter::find_writer_for_file(Engine::get_singleton()->get_write_movie_path());
if (movie_writer == nullptr) {
- ERR_PRINT("Can't find movie writer for file type, aborting: " + write_movie_path);
- write_movie_path = String();
+ ERR_PRINT("Can't find movie writer for file type, aborting: " + Engine::get_singleton()->get_write_movie_path());
+ Engine::get_singleton()->set_write_movie_path(String());
}
}
@@ -2079,7 +2106,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
// able to load resources, load the global shader variables.
// If running on editor, don't load the textures because the editor
// may want to import them first. Editor will reload those later.
- rendering_server->global_variables_load_settings(!editor);
+ rendering_server->global_shader_uniforms_load_settings(!editor);
}
_start_success = true;
@@ -2411,6 +2438,8 @@ bool Main::start() {
}
if (debug_navigation) {
sml->set_debug_navigation_hint(true);
+ NavigationServer3D::get_singleton()->set_active(true);
+ NavigationServer3D::get_singleton_mut()->set_debug_enabled(true);
}
#endif
@@ -2576,7 +2605,7 @@ bool Main::start() {
PropertyInfo(Variant::FLOAT,
"display/window/stretch/scale",
PROPERTY_HINT_RANGE,
- "1.0,8.0,0.1"));
+ "0.5,8.0,0.01"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
@@ -2724,7 +2753,7 @@ bool Main::start() {
OS::get_singleton()->set_main_loop(main_loop);
if (movie_writer) {
- movie_writer->begin(DisplayServer::get_singleton()->window_get_size(), fixed_fps, write_movie_path);
+ movie_writer->begin(DisplayServer::get_singleton()->window_get_size(), fixed_fps, Engine::get_singleton()->get_write_movie_path());
}
if (minimum_time_msec) {
@@ -2980,6 +3009,7 @@ void Main::cleanup(bool p_force) {
OS::get_singleton()->delete_main_loop();
OS::get_singleton()->_cmdline.clear();
+ OS::get_singleton()->_user_args.clear();
OS::get_singleton()->_execpath = "";
OS::get_singleton()->_local_clipboard = "";
@@ -2992,7 +3022,7 @@ void Main::cleanup(bool p_force) {
RenderingServer::get_singleton()->sync();
//clear global shader variables before scene and other graphics stuff are deinitialized.
- rendering_server->global_variables_clear();
+ rendering_server->global_shader_uniforms_clear();
if (xr_server) {
// Now that we're unregistering properly in plugins we need to keep access to xr_server for a little longer
diff --git a/main/performance.cpp b/main/performance.cpp
index 25659b999f..0de525134e 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -283,7 +283,7 @@ Variant Performance::MonitorCall::call(bool &r_error, String &r_error_message) {
int argc = _arguments.size();
Variant return_value;
Callable::CallError error;
- _callable.call(args, argc, return_value, error);
+ _callable.callp(args, argc, return_value, error);
r_error = (error.error != Callable::CallError::CALL_OK);
if (r_error) {
r_error_message = Variant::get_callable_error_text(_callable, args, argc, error);
diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh
index c767d3f8a0..731b3ee005 100755
--- a/misc/scripts/file_format.sh
+++ b/misc/scripts/file_format.sh
@@ -37,6 +37,8 @@ while IFS= read -rd '' f; do
continue
elif [[ "$f" == *"-so_wrap."* ]]; then
continue
+ elif [[ "$f" == *".test.txt" ]]; then
+ continue
fi
# Ensure that files are UTF-8 formatted.
recode UTF-8 "$f" 2> /dev/null
diff --git a/misc/scripts/install_vulkan_sdk_macos.sh b/misc/scripts/install_vulkan_sdk_macos.sh
index 817302d77f..d78659fa9f 100755
--- a/misc/scripts/install_vulkan_sdk_macos.sh
+++ b/misc/scripts/install_vulkan_sdk_macos.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
set -euo pipefail
IFS=$'\n\t'
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 0f09eb2020..56be4e65f0 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -1858,7 +1858,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
}
Transform3D facing = Transform3D().looking_at(direction, current_up);
- current_xform = base_xform.translated(current_point) * facing;
+ current_xform = base_xform.translated_local(current_point) * facing;
}
// Create the mesh.
@@ -1897,7 +1897,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
switch (mode) {
case MODE_DEPTH: {
- current_xform.translate(Vector3(0, 0, -depth));
+ current_xform.translate_local(Vector3(0, 0, -depth));
} break;
case MODE_SPIN: {
current_xform.rotate(Vector3(0, 1, 0), spin_step);
@@ -1945,7 +1945,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
}
Transform3D facing = Transform3D().looking_at(direction, current_up);
- current_xform = base_xform.translated(current_point) * facing;
+ current_xform = base_xform.translated_local(current_point) * facing;
} break;
}
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp
index a7cfcaa262..3322ff0a1b 100644
--- a/modules/cvtt/image_compress_cvtt.cpp
+++ b/modules/cvtt/image_compress_cvtt.cpp
@@ -129,14 +129,6 @@ static void _digest_row_task(const CVTTCompressionJobParams &p_job_params, const
}
}
-static void _digest_job_queue(void *p_job_queue) {
- CVTTCompressionJobQueue *job_queue = static_cast<CVTTCompressionJobQueue *>(p_job_queue);
-
- for (uint32_t next_task = job_queue->current_task.increment(); next_task <= job_queue->num_tasks; next_task = job_queue->current_task.increment()) {
- _digest_row_task(job_queue->job_params, job_queue->job_tasks[next_task - 1]);
- }
-}
-
void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) {
if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) {
return; //do not compress, already compressed
@@ -202,7 +194,6 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
job_queue.job_params.bytes_per_pixel = is_hdr ? 6 : 4;
cvtt::Kernels::ConfigureBC7EncodingPlanFromQuality(job_queue.job_params.bc7_plan, 5);
- int num_job_threads = 0;
// Amdahl's law (Wikipedia)
// If a program needs 20 hours to complete using a single thread, but a one-hour portion of the program cannot be parallelized,
// therefore only the remaining 19 hours (p = 0.95) of execution time can be parallelized, then regardless of how many threads are devoted
@@ -229,11 +220,7 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
row_task.in_mm_bytes = in_bytes;
row_task.out_mm_bytes = out_bytes;
- if (num_job_threads > 0) {
- tasks.push_back(row_task);
- } else {
- _digest_row_task(job_queue.job_params, row_task);
- }
+ _digest_row_task(job_queue.job_params, row_task);
out_bytes += 16 * (bw / 4);
}
@@ -243,29 +230,6 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
h = MAX(h / 2, 1);
}
- if (num_job_threads > 0) {
- Vector<Thread *> threads;
- threads.resize(num_job_threads);
-
- Thread **threads_wb = threads.ptrw();
-
- const CVTTCompressionRowTask *tasks_rb = tasks.ptr();
-
- job_queue.job_tasks = &tasks_rb[0];
- job_queue.current_task.set(0);
- job_queue.num_tasks = static_cast<uint32_t>(tasks.size());
-
- for (int i = 0; i < num_job_threads; i++) {
- threads_wb[i] = memnew(Thread);
- threads_wb[i]->start(_digest_job_queue, &job_queue);
- }
- _digest_job_queue(&job_queue);
-
- for (int i = 0; i < num_job_threads; i++) {
- threads_wb[i]->wait_to_finish();
- memdelete(threads_wb[i]);
- }
- }
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
}
diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp
index cd94cc9425..dfdd08c9f4 100644
--- a/modules/enet/enet_multiplayer_peer.cpp
+++ b/modules/enet/enet_multiplayer_peer.cpp
@@ -441,15 +441,15 @@ Error ENetMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size
channel = SYSCH_MAX + transfer_channel - 1;
} else {
switch (get_transfer_mode()) {
- case Multiplayer::TRANSFER_MODE_UNRELIABLE: {
+ case TRANSFER_MODE_UNRELIABLE: {
packet_flags = ENET_PACKET_FLAG_UNSEQUENCED | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT;
channel = SYSCH_UNRELIABLE;
} break;
- case Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED: {
+ case TRANSFER_MODE_UNRELIABLE_ORDERED: {
packet_flags = ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT;
channel = SYSCH_UNRELIABLE;
} break;
- case Multiplayer::TRANSFER_MODE_RELIABLE: {
+ case TRANSFER_MODE_RELIABLE: {
packet_flags = ENET_PACKET_FLAG_RELIABLE;
channel = SYSCH_RELIABLE;
} break;
diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h
index 131aa04df1..3152068d46 100644
--- a/modules/enet/enet_multiplayer_peer.h
+++ b/modules/enet/enet_multiplayer_peer.h
@@ -32,7 +32,7 @@
#define ENET_MULTIPLAYER_PEER_H
#include "core/crypto/crypto.h"
-#include "core/multiplayer/multiplayer_peer.h"
+#include "scene/main/multiplayer_peer.h"
#include "enet_connection.h"
#include <enet/enet.h>
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp
index 4372bb33ba..a23f19de85 100644
--- a/modules/gdscript/editor/gdscript_highlighter.cpp
+++ b/modules/gdscript/editor/gdscript_highlighter.cpp
@@ -623,11 +623,11 @@ void GDScriptSyntaxHighlighter::_update_cache() {
annotation_color = Color(1.0, 0.7, 0.45);
string_name_color = Color(1.0, 0.66, 0.72);
} else {
- function_definition_color = Color(0.0, 0.65, 0.73);
- node_path_color = Color(0.62, 0.67, 0.39);
- node_ref_color = Color(0.32, 0.55, 0.29);
- annotation_color = Color(0.8, 0.5, 0.25);
- string_name_color = Color(0.9, 0.56, 0.62);
+ function_definition_color = Color(0, 0.6, 0.6);
+ node_path_color = Color(0.18, 0.55, 0);
+ node_ref_color = Color(0.0, 0.5, 0);
+ annotation_color = Color(0.8, 0.37, 0);
+ string_name_color = Color(0.8, 0.46, 0.52);
}
EDITOR_DEF("text_editor/theme/highlighting/gdscript/function_definition_color", function_definition_color);
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index a34bf6ef82..d752bef14f 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -51,7 +51,7 @@
#endif
#ifdef TOOLS_ENABLED
-#include "editor/editor_settings.h"
+#include "editor/editor_paths.h"
#endif
///////////////////////////
@@ -848,7 +848,7 @@ Error GDScript::reload(bool p_keep_state) {
// Loading a template, don't parse.
#ifdef TOOLS_ENABLED
- if (EditorSettings::get_singleton() && basedir.begins_with(EditorSettings::get_singleton()->get_project_script_templates_dir())) {
+ if (EditorPaths::get_singleton() && basedir.begins_with(EditorPaths::get_singleton()->get_project_script_templates_dir())) {
return OK;
}
#endif
@@ -954,8 +954,8 @@ void GDScript::get_members(HashSet<StringName> *p_members) {
}
}
-const Vector<Multiplayer::RPCConfig> GDScript::get_rpc_methods() const {
- return rpc_functions;
+const Variant GDScript::get_rpc_config() const {
+ return rpc_config;
}
Variant GDScript::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
@@ -1212,9 +1212,9 @@ void GDScript::_save_orphaned_subclasses() {
void GDScript::_init_rpc_methods_properties() {
// Copy the base rpc methods so we don't mask their IDs.
- rpc_functions.clear();
+ rpc_config.clear();
if (base.is_valid()) {
- rpc_functions = base->rpc_functions;
+ rpc_config = base->rpc_config.duplicate();
}
GDScript *cscript = this;
@@ -1222,12 +1222,9 @@ void GDScript::_init_rpc_methods_properties() {
while (cscript) {
// RPC Methods
for (KeyValue<StringName, GDScriptFunction *> &E : cscript->member_functions) {
- Multiplayer::RPCConfig config = E.value->get_rpc_config();
- if (config.rpc_mode != Multiplayer::RPC_MODE_DISABLED) {
- config.name = E.value->get_name();
- if (rpc_functions.find(config) == -1) {
- rpc_functions.push_back(config);
- }
+ Variant config = E.value->get_rpc_config();
+ if (config.get_type() != Variant::NIL) {
+ rpc_config[E.value->get_name()] = config;
}
}
@@ -1241,9 +1238,6 @@ void GDScript::_init_rpc_methods_properties() {
cscript = nullptr;
}
}
-
- // Sort so we are 100% that they are always the same.
- rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
}
GDScript::~GDScript() {
@@ -1408,9 +1402,7 @@ bool GDScriptInstance::get(const StringName &p_name, Variant &r_ret) const {
while (sl) {
HashMap<StringName, GDScriptFunction *>::ConstIterator E = sl->member_functions.find(p_name);
if (E) {
- Multiplayer::RPCConfig config;
- config.name = p_name;
- if (sptr->rpc_functions.find(config) != -1) {
+ if (sptr->rpc_config.has(p_name)) {
r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key)));
} else {
r_ret = Callable(this->owner, E->key);
@@ -1629,15 +1621,13 @@ ScriptLanguage *GDScriptInstance::get_language() {
return GDScriptLanguage::get_singleton();
}
-const Vector<Multiplayer::RPCConfig> GDScriptInstance::get_rpc_methods() const {
- return script->get_rpc_methods();
+const Variant GDScriptInstance::get_rpc_config() const {
+ return script->get_rpc_config();
}
void GDScriptInstance::reload_members() {
#ifdef DEBUG_ENABLED
- members.resize(script->member_indices.size()); //resize
-
Vector<Variant> new_members;
new_members.resize(script->member_indices.size());
@@ -1649,6 +1639,8 @@ void GDScriptInstance::reload_members() {
}
}
+ members.resize(new_members.size()); //resize
+
//apply
members = new_members;
@@ -2388,7 +2380,7 @@ void ResourceFormatLoaderGDScript::get_dependencies(const String &p_path, List<S
}
}
-Error ResourceFormatSaverGDScript::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverGDScript::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<GDScript> sqscr = p_resource;
ERR_FAIL_COND_V(sqscr.is_null(), ERR_INVALID_PARAMETER);
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index e9a206f48b..5123cccddd 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -87,7 +87,7 @@ class GDScript : public Script {
HashMap<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script.
HashMap<StringName, Ref<GDScript>> subclasses;
HashMap<StringName, Vector<StringName>> _signals;
- Vector<Multiplayer::RPCConfig> rpc_functions;
+ Dictionary rpc_config;
#ifdef TOOLS_ENABLED
@@ -250,7 +250,7 @@ public:
virtual void get_constants(HashMap<StringName, Variant> *p_constants) override;
virtual void get_members(HashSet<StringName> *p_members) override;
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
+ virtual const Variant get_rpc_config() const override;
#ifdef TOOLS_ENABLED
virtual bool is_placeholder_fallback_enabled() const override { return placeholder_fallback_enabled; }
@@ -304,7 +304,7 @@ public:
void reload_members();
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
+ virtual const Variant get_rpc_config() const;
GDScriptInstance();
~GDScriptInstance();
@@ -524,7 +524,7 @@ public:
class ResourceFormatSaverGDScript : public ResourceFormatSaver {
public:
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
virtual bool recognize(const Ref<Resource> &p_resource) const;
};
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index a1a28e7675..fa158591fd 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -158,7 +158,7 @@ void GDScriptByteCodeGenerator::end_parameters() {
function->default_arguments.reverse();
}
-void GDScriptByteCodeGenerator::write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) {
+void GDScriptByteCodeGenerator::write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Variant p_rpc_config, const GDScriptDataType &p_return_type) {
function = memnew(GDScriptFunction);
debug_stack = EngineDebugger::is_active();
@@ -1608,7 +1608,7 @@ void GDScriptByteCodeGenerator::write_return(const Address &p_return_value) {
// Typed array.
const GDScriptDataType &element_type = function->return_type.get_container_element_type();
- Variant script = function->return_type.script_type;
+ Variant script = element_type.script_type;
int script_idx = get_constant_pos(script) | (GDScriptFunction::ADDR_TYPE_CONSTANT << GDScriptFunction::ADDR_BITS);
append(GDScriptFunction::OPCODE_RETURN_TYPED_ARRAY, 2);
diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h
index ffc3178c83..7dd51845df 100644
--- a/modules/gdscript/gdscript_byte_codegen.h
+++ b/modules/gdscript/gdscript_byte_codegen.h
@@ -419,7 +419,7 @@ public:
virtual void start_block() override;
virtual void end_block() override;
- virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) override;
+ virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Variant p_rpc_config, const GDScriptDataType &p_return_type) override;
virtual GDScriptFunction *write_end() override;
#ifdef DEBUG_ENABLED
diff --git a/modules/gdscript/gdscript_codegen.h b/modules/gdscript/gdscript_codegen.h
index 7b5f133ec5..5972481c3a 100644
--- a/modules/gdscript/gdscript_codegen.h
+++ b/modules/gdscript/gdscript_codegen.h
@@ -31,7 +31,6 @@
#ifndef GDSCRIPT_CODEGEN_H
#define GDSCRIPT_CODEGEN_H
-#include "core/multiplayer/multiplayer.h"
#include "core/string/string_name.h"
#include "core/variant/variant.h"
#include "gdscript_function.h"
@@ -80,7 +79,7 @@ public:
virtual void start_block() = 0;
virtual void end_block() = 0;
- virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) = 0;
+ virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Variant p_rpc_config, const GDScriptDataType &p_return_type) = 0;
virtual GDScriptFunction *write_end() = 0;
#ifdef DEBUG_ENABLED
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index e36252ada5..00e8223b9a 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -1975,7 +1975,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
StringName func_name;
bool is_static = false;
- Multiplayer::RPCConfig rpc_config;
+ Variant rpc_config;
GDScriptDataType return_type;
return_type.has_type = true;
return_type.kind = GDScriptDataType::BUILTIN;
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 90dcfa307e..d943974ce4 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1473,11 +1473,16 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
if (callee_type == GDScriptParser::Node::IDENTIFIER || call->is_super) {
// Simple call, so base is 'self'.
if (p_context.current_class) {
- base.type.kind = GDScriptParser::DataType::CLASS;
- base.type.type_source = GDScriptParser::DataType::INFERRED;
- base.type.is_constant = true;
- base.type.class_type = p_context.current_class;
- base.value = p_context.base;
+ if (call->is_super) {
+ base.type = p_context.current_class->base_type;
+ base.value = p_context.base;
+ } else {
+ base.type.kind = GDScriptParser::DataType::CLASS;
+ base.type.type_source = GDScriptParser::DataType::INFERRED;
+ base.type.is_constant = true;
+ base.type.class_type = p_context.current_class;
+ base.value = p_context.base;
+ }
} else {
break;
}
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index 53c75648a0..e44038d6da 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -477,7 +477,7 @@ private:
int _initial_line = 0;
bool _static = false;
- Multiplayer::RPCConfig rpc_config;
+ Variant rpc_config;
GDScript *_script = nullptr;
@@ -599,7 +599,7 @@ public:
void disassemble(const Vector<String> &p_code_lines) const;
#endif
- _FORCE_INLINE_ Multiplayer::RPCConfig get_rpc_config() const { return rpc_config; }
+ _FORCE_INLINE_ const Variant get_rpc_config() const { return rpc_config; }
GDScriptFunction();
~GDScriptFunction();
};
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index e8fa2981ba..6f5397e1a3 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -35,6 +35,7 @@
#include "core/io/resource_loader.h"
#include "core/math/math_defs.h"
#include "gdscript.h"
+#include "scene/main/multiplayer_api.h"
#ifdef DEBUG_ENABLED
#include "core/os/os.h"
@@ -145,7 +146,7 @@ GDScriptParser::GDScriptParser() {
// Warning annotations.
register_annotation(MethodInfo("@warning_ignore", PropertyInfo(Variant::STRING, "warning")), AnnotationInfo::CLASS | AnnotationInfo::VARIABLE | AnnotationInfo::SIGNAL | AnnotationInfo::CONSTANT | AnnotationInfo::FUNCTION | AnnotationInfo::STATEMENT, &GDScriptParser::warning_annotations, varray(), true);
// Networking.
- register_annotation(MethodInfo("@rpc", PropertyInfo(Variant::STRING, "mode"), PropertyInfo(Variant::STRING, "sync"), PropertyInfo(Variant::STRING, "transfer_mode"), PropertyInfo(Variant::INT, "transfer_channel")), AnnotationInfo::FUNCTION, &GDScriptParser::network_annotations<Multiplayer::RPC_MODE_AUTHORITY>, varray("", "", "", 0), true);
+ register_annotation(MethodInfo("@rpc", PropertyInfo(Variant::STRING, "mode"), PropertyInfo(Variant::STRING, "sync"), PropertyInfo(Variant::STRING, "transfer_mode"), PropertyInfo(Variant::INT, "transfer_channel")), AnnotationInfo::FUNCTION, &GDScriptParser::rpc_annotation, varray("", "", "", 0), true);
}
GDScriptParser::~GDScriptParser() {
@@ -3867,16 +3868,21 @@ bool GDScriptParser::warning_annotations(const AnnotationNode *p_annotation, Nod
#endif // DEBUG_ENABLED
}
-template <Multiplayer::RPCMode t_mode>
-bool GDScriptParser::network_annotations(const AnnotationNode *p_annotation, Node *p_node) {
- ERR_FAIL_COND_V_MSG(p_node->type != Node::VARIABLE && p_node->type != Node::FUNCTION, false, vformat(R"("%s" annotation can only be applied to variables and functions.)", p_annotation->name));
+bool GDScriptParser::rpc_annotation(const AnnotationNode *p_annotation, Node *p_node) {
+ ERR_FAIL_COND_V_MSG(p_node->type != Node::FUNCTION, false, vformat(R"("%s" annotation can only be applied to functions.)", p_annotation->name));
- Multiplayer::RPCConfig rpc_config;
- rpc_config.rpc_mode = t_mode;
+ FunctionNode *function = static_cast<FunctionNode *>(p_node);
+ if (function->rpc_config.get_type() != Variant::NIL) {
+ push_error(R"(RPC annotations can only be used once per function.)", p_annotation);
+ return false;
+ }
+
+ Dictionary rpc_config;
+ rpc_config["rpc_mode"] = MultiplayerAPI::RPC_MODE_AUTHORITY;
if (p_annotation->resolved_arguments.size()) {
int last = p_annotation->resolved_arguments.size() - 1;
if (p_annotation->resolved_arguments[last].get_type() == Variant::INT) {
- rpc_config.channel = p_annotation->resolved_arguments[last].operator int();
+ rpc_config["channel"] = p_annotation->resolved_arguments[last].operator int();
last -= 1;
}
if (last > 3) {
@@ -3886,37 +3892,25 @@ bool GDScriptParser::network_annotations(const AnnotationNode *p_annotation, Nod
for (int i = last; i >= 0; i--) {
String mode = p_annotation->resolved_arguments[i].operator String();
if (mode == "any_peer") {
- rpc_config.rpc_mode = Multiplayer::RPC_MODE_ANY_PEER;
+ rpc_config["rpc_mode"] = MultiplayerAPI::RPC_MODE_ANY_PEER;
} else if (mode == "authority") {
- rpc_config.rpc_mode = Multiplayer::RPC_MODE_AUTHORITY;
+ rpc_config["rpc_mode"] = MultiplayerAPI::RPC_MODE_AUTHORITY;
} else if (mode == "call_local") {
- rpc_config.call_local = true;
+ rpc_config["call_local"] = true;
} else if (mode == "call_remote") {
- rpc_config.call_local = false;
+ rpc_config["call_local"] = false;
} else if (mode == "reliable") {
- rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE;
+ rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
} else if (mode == "unreliable") {
- rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_UNRELIABLE;
+ rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE;
} else if (mode == "unreliable_ordered") {
- rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED;
+ rpc_config["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE_ORDERED;
} else {
push_error(R"(Invalid RPC argument. Must be one of: 'call_local'/'call_remote' (local calls), 'any_peer'/'authority' (permission), 'reliable'/'unreliable'/'unreliable_ordered' (transfer mode).)", p_annotation);
}
}
}
- switch (p_node->type) {
- case Node::FUNCTION: {
- FunctionNode *function = static_cast<FunctionNode *>(p_node);
- if (function->rpc_config.rpc_mode != Multiplayer::RPC_MODE_DISABLED) {
- push_error(R"(RPC annotations can only be used once per function.)", p_annotation);
- return false;
- }
- function->rpc_config = rpc_config;
- break;
- }
- default:
- return false; // Unreachable.
- }
+ function->rpc_config = rpc_config;
return true;
}
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index 9c97f98fbc..d4efab173b 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -32,7 +32,6 @@
#define GDSCRIPT_PARSER_H
#include "core/io/resource.h"
-#include "core/multiplayer/multiplayer.h"
#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
#include "core/string/string_name.h"
@@ -750,7 +749,7 @@ public:
SuiteNode *body = nullptr;
bool is_static = false;
bool is_coroutine = false;
- Multiplayer::RPCConfig rpc_config;
+ Variant rpc_config;
MethodInfo info;
LambdaNode *source_lambda = nullptr;
#ifdef TOOLS_ENABLED
@@ -1371,8 +1370,7 @@ private:
template <PropertyUsageFlags t_usage>
bool export_group_annotations(const AnnotationNode *p_annotation, Node *p_target);
bool warning_annotations(const AnnotationNode *p_annotation, Node *p_target);
- template <Multiplayer::RPCMode t_mode>
- bool network_annotations(const AnnotationNode *p_annotation, Node *p_target);
+ bool rpc_annotation(const AnnotationNode *p_annotation, Node *p_target);
// Statements.
Node *parse_statement();
VariableNode *parse_variable();
diff --git a/modules/gdscript/gdscript_rpc_callable.cpp b/modules/gdscript/gdscript_rpc_callable.cpp
index 63ebd8acf5..4e12419357 100644
--- a/modules/gdscript/gdscript_rpc_callable.cpp
+++ b/modules/gdscript/gdscript_rpc_callable.cpp
@@ -76,11 +76,11 @@ GDScriptRPCCallable::GDScriptRPCCallable(Object *p_object, const StringName &p_m
ERR_FAIL_COND_MSG(!node, "RPC can only be defined on class that extends Node.");
}
-void GDScriptRPCCallable::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
+Error GDScriptRPCCallable::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
if (unlikely(!node)) {
r_call_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
- return;
+ return ERR_UNCONFIGURED;
}
r_call_error.error = Callable::CallError::CALL_OK;
- node->rpcp(p_peer_id, method, p_arguments, p_argcount);
+ return node->rpcp(p_peer_id, method, p_arguments, p_argcount);
}
diff --git a/modules/gdscript/gdscript_rpc_callable.h b/modules/gdscript/gdscript_rpc_callable.h
index c8a91d6259..83b9c7e2df 100644
--- a/modules/gdscript/gdscript_rpc_callable.h
+++ b/modules/gdscript/gdscript_rpc_callable.h
@@ -52,7 +52,7 @@ public:
CompareLessFunc get_compare_less_func() const override;
ObjectID get_object() const override;
void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;
- void rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
+ Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
GDScriptRPCCallable(Object *p_object, const StringName &p_method);
virtual ~GDScriptRPCCallable() = default;
diff --git a/modules/gdscript/gdscript_utility_functions.cpp b/modules/gdscript/gdscript_utility_functions.cpp
index a914374985..4b97486cb3 100644
--- a/modules/gdscript/gdscript_utility_functions.cpp
+++ b/modules/gdscript/gdscript_utility_functions.cpp
@@ -115,6 +115,7 @@ struct GDScriptUtilityFunctionsDefinitions {
if (p_arg_count < 1) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
+ r_error.expected = 1;
*r_ret = Variant();
return;
}
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp
index 10365f8481..61e2c61abc 100644
--- a/modules/gdscript/gdscript_vm.cpp
+++ b/modules/gdscript/gdscript_vm.cpp
@@ -2234,7 +2234,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
retvalue = gdfs;
- Error err = sig.connect(callable_bind(Callable(gdfs.ptr(), "_signal_callback"), retvalue), Object::CONNECT_ONESHOT);
+ Error err = sig.connect(Callable(gdfs.ptr(), "_signal_callback").bind(retvalue), Object::CONNECT_ONESHOT);
if (err != OK) {
err_text = "Error connecting to signal: " + sig.get_name() + " during await.";
OPCODE_BREAK;
@@ -3295,6 +3295,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
int globalname_idx = _code_ptr[ip + 2];
GD_ERR_BREAK(globalname_idx < 0 || globalname_idx >= _global_names_count);
const StringName *globalname = &_global_names_ptr[globalname_idx];
+ GD_ERR_BREAK(!GDScriptLanguage::get_singleton()->get_named_globals_map().has(*globalname));
GET_INSTRUCTION_ARG(dst, 0);
*dst = GDScriptLanguage::get_singleton()->get_named_globals_map()[*globalname];
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index 03e93821c7..46a9b33eb0 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -690,9 +690,7 @@ Dictionary ExtendGDScriptParser::dump_function_api(const GDScriptParser::Functio
ERR_FAIL_NULL_V(p_func, func);
func["name"] = p_func->identifier->name;
func["return_type"] = p_func->get_datatype().to_string();
- func["rpc_mode"] = p_func->rpc_config.rpc_mode;
- func["rpc_transfer_mode"] = p_func->rpc_config.transfer_mode;
- func["rpc_transfer_channel"] = p_func->rpc_config.channel;
+ func["rpc_config"] = p_func->rpc_config;
Array parameters;
for (int i = 0; i < p_func->parameters.size(); i++) {
Dictionary arg;
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 7460f8edff..c0d5856be5 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -34,6 +34,7 @@
#include "editor/doc_tools.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
GDScriptLanguageProtocol *GDScriptLanguageProtocol::singleton = nullptr;
diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp
index 14337e87da..ead4ef1987 100644
--- a/modules/gdscript/language_server/gdscript_language_server.cpp
+++ b/modules/gdscript/language_server/gdscript_language_server.cpp
@@ -34,6 +34,7 @@
#include "core/os/os.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
GDScriptLanguageServer::GDScriptLanguageServer() {
_EDITOR_DEF("network/language_server/remote_host", host);
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 8d484a43b3..ded2a7b4d4 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -38,6 +38,7 @@
#include "editor/editor_file_system.h"
#include "editor/editor_help.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "gdscript_language_protocol.h"
#include "scene/resources/packed_scene.h"
@@ -499,7 +500,9 @@ Error GDScriptWorkspace::parse_local_script(const String &p_path) {
String GDScriptWorkspace::get_file_path(const String &p_uri) const {
String path = p_uri;
- path = path.replace(root_uri + "/", "res://");
+ path = path.replace("///", "//");
+ path = path.replace("%3A", ":");
+ path = path.replacen(root_uri + "/", "res://");
path = path.uri_decode();
return path;
}
diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp
index b230c6ba36..059ca703ab 100644
--- a/modules/gdscript/register_types.cpp
+++ b/modules/gdscript/register_types.cpp
@@ -52,10 +52,10 @@ GDScriptCache *gdscript_cache = nullptr;
#ifdef TOOLS_ENABLED
-#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_translation_parser.h"
+#include "editor/export/editor_export.h"
#include "editor/gdscript_highlighter.h"
#include "editor/gdscript_translation_parser_plugin.h"
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 4ca8482ba3..7e90f198f6 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -4938,7 +4938,8 @@ Error GLTFDocument::_parse_animations(Ref<GLTFState> state) {
if (d.has("name")) {
const String name = d["name"];
- if (name.begins_with("loop") || name.ends_with("loop") || name.begins_with("cycle") || name.ends_with("cycle")) {
+ const String name_lower = name.to_lower();
+ if (name_lower.begins_with("loop") || name_lower.ends_with("loop") || name_lower.begins_with("cycle") || name_lower.ends_with("cycle")) {
animation->set_loop(true);
}
animation->set_name(_gen_unique_animation_name(state, name));
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index f975d95079..09f0ff32f0 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -545,7 +545,7 @@ void GridMapEditor::_update_paste_indicator() {
Basis rot;
rot.set_orthogonal_index(paste_indicator.orientation);
xf.basis = rot * xf.basis;
- xf.translate((-center * node->get_cell_size()) / scale);
+ xf.translate_local((-center * node->get_cell_size()) / scale);
RenderingServer::get_singleton()->instance_set_transform(paste_instance, node->get_global_transform() * xf);
@@ -553,7 +553,7 @@ void GridMapEditor::_update_paste_indicator() {
xf = Transform3D();
xf.origin = (paste_indicator.begin + (paste_indicator.current - paste_indicator.click) + center) * node->get_cell_size();
xf.basis = rot * xf.basis;
- xf.translate(item.grid_offset * node->get_cell_size());
+ xf.translate_local(item.grid_offset * node->get_cell_size());
Basis item_rot;
item_rot.set_orthogonal_index(item.orientation);
@@ -1231,14 +1231,14 @@ GridMapEditor::GridMapEditor() {
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
hb->add_child(mode_thumbnail);
- mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_THUMBNAIL));
+ mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
mode_list = memnew(Button);
mode_list->set_flat(true);
mode_list->set_toggle_mode(true);
mode_list->set_pressed(false);
hb->add_child(mode_list);
- mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_LIST));
+ mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_LIST));
size_slider = memnew(HSlider);
size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/modules/minimp3/resource_importer_mp3.cpp b/modules/minimp3/resource_importer_mp3.cpp
index 8526aeef38..7492533094 100644
--- a/modules/minimp3/resource_importer_mp3.cpp
+++ b/modules/minimp3/resource_importer_mp3.cpp
@@ -128,7 +128,7 @@ Error ResourceImporterMP3::import(const String &p_source_file, const String &p_s
mp3_stream->set_beat_count(beat_count);
mp3_stream->set_bar_beats(bar_beats);
- return ResourceSaver::save(p_save_path + ".mp3str", mp3_stream);
+ return ResourceSaver::save(mp3_stream, p_save_path + ".mp3str");
}
ResourceImporterMP3::ResourceImporterMP3() {
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 1e4d82ca30..c7279be97f 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -2141,8 +2141,8 @@ bool CSharpInstance::refcount_decremented() {
return ref_dying;
}
-const Vector<Multiplayer::RPCConfig> CSharpInstance::get_rpc_methods() const {
- return script->get_rpc_methods();
+const Variant CSharpInstance::get_rpc_config() const {
+ return script->get_rpc_config();
}
void CSharpInstance::notification(int p_notification) {
@@ -3060,7 +3060,7 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
p_script->script_class->fetch_methods_with_godot_api_checks(p_script->native);
- p_script->rpc_functions.clear();
+ p_script->rpc_config.clear();
GDMonoClass *top = p_script->script_class;
while (top && top != p_script->native) {
@@ -3072,12 +3072,9 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
Vector<GDMonoMethod *> methods = top->get_all_methods();
for (int i = 0; i < methods.size(); i++) {
if (!methods[i]->is_static()) {
- Multiplayer::RPCConfig rpc_config = p_script->_member_get_rpc_config(methods[i]);
- if (rpc_config.rpc_mode != Multiplayer::RPC_MODE_DISABLED) {
- // RPC annotations can only be used once per method
- if (p_script->rpc_functions.find(rpc_config) == -1) {
- p_script->rpc_functions.push_back(rpc_config);
- }
+ const Variant rpc_config = p_script->_member_get_rpc_config(methods[i]);
+ if (rpc_config.get_type() != Variant::NIL) {
+ p_script->rpc_config[methods[i]->get_name()] = rpc_config;
}
}
}
@@ -3086,9 +3083,6 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
top = top->get_parent_class();
}
- // Sort so we are 100% that they are always the same.
- p_script->rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
-
p_script->load_script_signals(p_script->script_class, p_script->native);
}
@@ -3511,23 +3505,24 @@ int CSharpScript::get_member_line(const StringName &p_member) const {
return -1;
}
-Multiplayer::RPCConfig CSharpScript::_member_get_rpc_config(IMonoClassMember *p_member) const {
- Multiplayer::RPCConfig rpc_config;
+Variant CSharpScript::_member_get_rpc_config(IMonoClassMember *p_member) const {
+ Variant out;
MonoObject *rpc_attribute = p_member->get_attribute(CACHED_CLASS(RPCAttribute));
if (rpc_attribute != nullptr) {
- rpc_config.name = p_member->get_name();
- rpc_config.rpc_mode = (Multiplayer::RPCMode)CACHED_PROPERTY(RPCAttribute, Mode)->get_int_value(rpc_attribute);
- rpc_config.call_local = CACHED_PROPERTY(RPCAttribute, CallLocal)->get_bool_value(rpc_attribute);
- rpc_config.transfer_mode = (Multiplayer::TransferMode)CACHED_PROPERTY(RPCAttribute, TransferMode)->get_int_value(rpc_attribute);
- rpc_config.channel = CACHED_PROPERTY(RPCAttribute, TransferChannel)->get_int_value(rpc_attribute);
+ Dictionary rpc_config;
+ rpc_config["rpc_mode"] = CACHED_PROPERTY(RPCAttribute, Mode)->get_int_value(rpc_attribute);
+ rpc_config["call_local"] = CACHED_PROPERTY(RPCAttribute, CallLocal)->get_bool_value(rpc_attribute);
+ rpc_config["transfer_mode"] = CACHED_PROPERTY(RPCAttribute, TransferMode)->get_int_value(rpc_attribute);
+ rpc_config["channel"] = CACHED_PROPERTY(RPCAttribute, TransferChannel)->get_int_value(rpc_attribute);
+ out = rpc_config;
}
- return rpc_config;
+ return out;
}
-const Vector<Multiplayer::RPCConfig> CSharpScript::get_rpc_methods() const {
- return rpc_functions;
+const Variant CSharpScript::get_rpc_config() const {
+ return rpc_config;
}
Error CSharpScript::load_source_code(const String &p_path) {
@@ -3635,7 +3630,7 @@ String ResourceFormatLoaderCSharpScript::get_resource_type(const String &p_path)
return p_path.get_extension().to_lower() == "cs" ? CSharpLanguage::get_singleton()->get_type() : "";
}
-Error ResourceFormatSaverCSharpScript::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverCSharpScript::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<CSharpScript> sqscr = p_resource;
ERR_FAIL_COND_V(sqscr.is_null(), ERR_INVALID_PARAMETER);
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index b17473470f..48129e69cb 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -136,7 +136,7 @@ private:
HashMap<StringName, EventSignal> event_signals;
bool signals_invalidated = true;
- Vector<Multiplayer::RPCConfig> rpc_functions;
+ Dictionary rpc_config;
#ifdef TOOLS_ENABLED
List<PropertyInfo> exported_members_cache; // members_cache
@@ -179,7 +179,7 @@ private:
static void update_script_class_info(Ref<CSharpScript> p_script);
static void initialize_for_managed_type(Ref<CSharpScript> p_script, GDMonoClass *p_class, GDMonoClass *p_native);
- Multiplayer::RPCConfig _member_get_rpc_config(IMonoClassMember *p_member) const;
+ Variant _member_get_rpc_config(IMonoClassMember *p_member) const;
protected:
static void _bind_methods();
@@ -234,7 +234,7 @@ public:
int get_member_line(const StringName &p_member) const override;
- const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
+ const Variant get_rpc_config() const override;
#ifdef TOOLS_ENABLED
bool is_placeholder_fallback_enabled() const override { return placeholder_fallback_enabled; }
@@ -311,7 +311,7 @@ public:
void refcount_incremented() override;
bool refcount_decremented() override;
- const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
+ const Variant get_rpc_config() const override;
void notification(int p_notification) override;
void _call_notification(int p_notification);
@@ -543,7 +543,7 @@ public:
class ResourceFormatSaverCSharpScript : public ResourceFormatSaver {
public:
- Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0) override;
+ Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
bool recognize(const Ref<Resource> &p_resource) const override;
};
diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp
index 5e4fe90553..f830c7ffe1 100644
--- a/modules/mono/editor/editor_internal_calls.cpp
+++ b/modules/mono/editor/editor_internal_calls.cpp
@@ -39,7 +39,9 @@
#include "core/version.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
#include "main/main.h"
@@ -189,7 +191,7 @@ MonoString *godot_icall_Internal_UpdateApiAssembliesFromPrebuilt(MonoString *p_c
}
MonoString *godot_icall_Internal_FullExportTemplatesDir() {
- String full_templates_dir = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
+ String full_templates_dir = EditorPaths::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
return GDMonoMarshal::mono_string_from_godot(full_templates_dir);
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs
index 0a1c8322d7..fb37838ffa 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs
@@ -5,8 +5,8 @@ namespace Godot
/// <summary>
/// Attribute that changes the RPC mode for the annotated <c>method</c> to the given <see cref="Mode"/>,
/// optionally specifying the <see cref="TransferMode"/> and <see cref="TransferChannel"/> (on supported peers).
- /// See <see cref="RPCMode"/> and <see cref="TransferMode"/>. By default, methods are not exposed to networking
- /// (and RPCs).
+ /// See <see cref="MultiplayerAPI.RPCMode"/> and <see cref="MultiplayerPeer.TransferModeEnum"/>.
+ /// By default, methods are not exposed to networking (and RPCs).
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class RPCAttribute : Attribute
@@ -14,7 +14,7 @@ namespace Godot
/// <summary>
/// RPC mode for the annotated method.
/// </summary>
- public RPCMode Mode { get; } = RPCMode.Disabled;
+ public MultiplayerAPI.RPCMode Mode { get; } = MultiplayerAPI.RPCMode.Disabled;
/// <summary>
/// If the method will also be called locally; otherwise, it is only called remotely.
@@ -24,7 +24,7 @@ namespace Godot
/// <summary>
/// Transfer mode for the annotated method.
/// </summary>
- public TransferMode TransferMode { get; set; } = TransferMode.Reliable;
+ public MultiplayerPeer.TransferModeEnum TransferMode { get; set; } = MultiplayerPeer.TransferModeEnum.Reliable;
/// <summary>
/// Transfer channel for the annotated mode.
@@ -35,7 +35,7 @@ namespace Godot
/// Constructs a <see cref="RPCAttribute"/> instance.
/// </summary>
/// <param name="mode">The RPC mode to use.</param>
- public RPCAttribute(RPCMode mode = RPCMode.Authority)
+ public RPCAttribute(MultiplayerAPI.RPCMode mode = MultiplayerAPI.RPCMode.Authority)
{
Mode = mode;
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
index 37bdc42c2d..b1f1decd72 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
@@ -531,9 +531,9 @@ namespace Godot
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
/// <param name="angle">The angle to rotate, in radians.</param>
/// <returns>The rotated basis matrix.</returns>
- public Basis Rotated(Vector3 axis, real_t phi)
+ public Basis Rotated(Vector3 axis, real_t angle)
{
- return new Basis(axis, phi) * this;
+ return new Basis(axis, angle) * this;
}
/// <summary>
@@ -774,15 +774,15 @@ namespace Godot
/// </summary>
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
/// <param name="angle">The angle to rotate, in radians.</param>
- public Basis(Vector3 axis, real_t phi)
+ public Basis(Vector3 axis, real_t angle)
{
Vector3 axisSq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z);
- real_t cosine = Mathf.Cos(phi);
+ real_t cosine = Mathf.Cos(angle);
Row0.x = axisSq.x + cosine * (1.0f - axisSq.x);
Row1.y = axisSq.y + cosine * (1.0f - axisSq.y);
Row2.z = axisSq.z + cosine * (1.0f - axisSq.z);
- real_t sine = Mathf.Sin(phi);
+ real_t sine = Mathf.Sin(angle);
real_t t = 1.0f - cosine;
real_t xyzt = axis.x * axis.y * t;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs
new file mode 100644
index 0000000000..d774021131
--- /dev/null
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs
@@ -0,0 +1,820 @@
+#if REAL_T_IS_DOUBLE
+using real_t = System.Double;
+#else
+using real_t = System.Single;
+#endif
+using System;
+using System.Runtime.InteropServices;
+
+namespace Godot
+{
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Projection : IEquatable<Projection>
+ {
+ /// <summary>
+ /// Enumerated index values for the planes.
+ /// </summary>
+ public enum Planes
+ {
+ /// <summary>
+ /// The projection's near plane.
+ /// </summary>
+ Near,
+ /// <summary>
+ /// The projection's far plane.
+ /// </summary>
+ Far,
+ /// <summary>
+ /// The projection's left plane.
+ /// </summary>
+ Left,
+ /// <summary>
+ /// The projection's top plane.
+ /// </summary>
+ Top,
+ /// <summary>
+ /// The projection's right plane.
+ /// </summary>
+ Right,
+ /// <summary>
+ /// The projection's bottom plane.
+ /// </summary>
+ Bottom,
+ }
+
+ /// <summary>
+ /// The projections's X column. Also accessible by using the index position <c>[0]</c>.
+ /// </summary>
+ public Vector4 x;
+
+ /// <summary>
+ /// The projections's Y column. Also accessible by using the index position <c>[1]</c>.
+ /// </summary>
+ public Vector4 y;
+
+ /// <summary>
+ /// The projections's Z column. Also accessible by using the index position <c>[2]</c>.
+ /// </summary>
+ public Vector4 z;
+
+ /// <summary>
+ /// The projections's W column. Also accessible by using the index position <c>[3]</c>.
+ /// </summary>
+ public Vector4 w;
+
+ /// <summary>
+ /// Constructs a projection from 4 vectors (matrix columns).
+ /// </summary>
+ /// <param name="x">The X column, or column index 0.</param>
+ /// <param name="y">The Y column, or column index 1.</param>
+ /// <param name="z">The Z column, or column index 2.</param>
+ /// <param name="w">The W column, or column index 3.</param>
+ public Projection(Vector4 x, Vector4 y, Vector4 z, Vector4 w)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Projection"/> from an existing <see cref="Projection"/>.
+ /// </summary>
+ /// <param name="proj">The existing <see cref="Projection"/>.</param>
+ public Projection(Projection proj)
+ {
+ x = proj.x;
+ y = proj.y;
+ z = proj.z;
+ w = proj.w;
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Projection"/> from a <see cref="Transform3D"/>.
+ /// </summary>
+ /// <param name="transform">The <see cref="Transform3D"/>.</param>
+ public Projection(Transform3D transform)
+ {
+ x = new Vector4(transform.basis.Row0.x, transform.basis.Row1.x, transform.basis.Row2.x, 0);
+ y = new Vector4(transform.basis.Row0.y, transform.basis.Row1.y, transform.basis.Row2.y, 0);
+ z = new Vector4(transform.basis.Row0.z, transform.basis.Row1.z, transform.basis.Row2.z, 0);
+ w = new Vector4(transform.origin.x, transform.origin.y, transform.origin.z, 1);
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Transform3D"/> from the <see cref="Projection"/>.
+ /// </summary>
+ /// <param name="proj">The <see cref="Projection"/>.</param>
+ public static explicit operator Transform3D(Projection proj)
+ {
+ return new Transform3D(
+ new Basis(
+ new Vector3(proj.x.x, proj.x.y, proj.x.z),
+ new Vector3(proj.y.x, proj.y.y, proj.y.z),
+ new Vector3(proj.z.x, proj.z.y, proj.z.z)
+ ),
+ new Vector3(proj.w.x, proj.w.y, proj.w.z)
+ );
+ }
+
+ public static Projection CreateDepthCorrection(bool flipY)
+ {
+ return new Projection(
+ new Vector4(1, 0, 0, 0),
+ new Vector4(0, flipY ? -1 : 1, 0, 0),
+ new Vector4(0, 0, (real_t)0.5, 0),
+ new Vector4(0, 0, (real_t)0.5, 1)
+ );
+ }
+
+ public static Projection CreateFitAabb(AABB aabb)
+ {
+ Vector3 min = aabb.Position;
+ Vector3 max = aabb.Position + aabb.Size;
+
+ return new Projection(
+ new Vector4(2 / (max.x - min.x), 0, 0, 0),
+ new Vector4(0, 2 / (max.y - min.y), 0, 0),
+ new Vector4(0, 0, 2 / (max.z - min.z), 0),
+ new Vector4(-(max.x + min.x) / (max.x - min.x), -(max.y + min.y) / (max.y - min.y), -(max.z + min.z) / (max.z - min.z), 1)
+ );
+ }
+
+ public static Projection CreateForHmd(int eye, real_t aspect, real_t intraocularDist, real_t displayWidth, real_t displayToLens, real_t oversample, real_t zNear, real_t zFar)
+ {
+ real_t f1 = (intraocularDist * (real_t)0.5) / displayToLens;
+ real_t f2 = ((displayWidth - intraocularDist) * (real_t)0.5) / displayToLens;
+ real_t f3 = (displayWidth / (real_t)4.0) / displayToLens;
+
+ real_t add = ((f1 + f2) * (oversample - (real_t)1.0)) / (real_t)2.0;
+ f1 += add;
+ f2 += add;
+ f3 *= oversample;
+
+ f3 /= aspect;
+
+ switch (eye)
+ {
+ case 1:
+ return CreateFrustum(-f2 * zNear, f1 * zNear, -f3 * zNear, f3 * zNear, zNear, zFar);
+ case 2:
+ return CreateFrustum(-f1 * zNear, f2 * zNear, -f3 * zNear, f3 * zNear, zNear, zFar);
+ default:
+ return Zero;
+ }
+ }
+
+ public static Projection CreateFrustum(real_t left, real_t right, real_t bottom, real_t top, real_t near, real_t far)
+ {
+ if (right <= left)
+ {
+ throw new ArgumentException("right is less or equal to left.");
+ }
+ if (top <= bottom)
+ {
+ throw new ArgumentException("top is less or equal to bottom.");
+ }
+ if (far <= near)
+ {
+ throw new ArgumentException("far is less or equal to near.");
+ }
+
+ real_t x = 2 * near / (right - left);
+ real_t y = 2 * near / (top - bottom);
+
+ real_t a = (right + left) / (right - left);
+ real_t b = (top + bottom) / (top - bottom);
+ real_t c = -(far + near) / (far - near);
+ real_t d = -2 * far * near / (far - near);
+
+ return new Projection(
+ new Vector4(x, 0, 0, 0),
+ new Vector4(0, y, 0, 0),
+ new Vector4(a, b, c, -1),
+ new Vector4(0, 0, d, 0)
+ );
+ }
+
+ public static Projection CreateFrustumAspect(real_t size, real_t aspect, Vector2 offset, real_t near, real_t far, bool flipFov)
+ {
+ if (!flipFov)
+ {
+ size *= aspect;
+ }
+ return CreateFrustum(-size / 2 + offset.x, +size / 2 + offset.x, -size / aspect / 2 + offset.y, +size / aspect / 2 + offset.y, near, far);
+ }
+
+ public static Projection CreateLightAtlasRect(Rect2 rect)
+ {
+ return new Projection(
+ new Vector4(rect.Size.x, 0, 0, 0),
+ new Vector4(0, rect.Size.y, 0, 0),
+ new Vector4(0, 0, 1, 0),
+ new Vector4(rect.Position.x, rect.Position.y, 0, 1)
+ );
+ }
+
+ public static Projection CreateOrthogonal(real_t left, real_t right, real_t bottom, real_t top, real_t zNear, real_t zFar)
+ {
+ Projection proj = Projection.Identity;
+ proj.x.x = (real_t)2.0 / (right - left);
+ proj.w.x = -((right + left) / (right - left));
+ proj.y.y = (real_t)2.0 / (top - bottom);
+ proj.w.y = -((top + bottom) / (top - bottom));
+ proj.z.z = (real_t)(-2.0) / (zFar - zNear);
+ proj.w.z = -((zFar + zNear) / (zFar - zNear));
+ proj.w.w = (real_t)1.0;
+ return proj;
+ }
+
+ public static Projection CreateOrthogonalAspect(real_t size, real_t aspect, real_t zNear, real_t zFar, bool flipFov)
+ {
+ if (!flipFov)
+ {
+ size *= aspect;
+ }
+ return CreateOrthogonal(-size / 2, +size / 2, -size / aspect / 2, +size / aspect / 2, zNear, zFar);
+ }
+
+ public static Projection CreatePerspective(real_t fovyDegrees, real_t aspect, real_t zNear, real_t zFar, bool flipFov)
+ {
+ if (flipFov)
+ {
+ fovyDegrees = GetFovy(fovyDegrees, (real_t)1.0 / aspect);
+ }
+ real_t radians = Mathf.Deg2Rad(fovyDegrees / (real_t)2.0);
+ real_t deltaZ = zFar - zNear;
+ real_t sine = Mathf.Sin(radians);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
+ {
+ return Zero;
+ }
+
+ real_t cotangent = Mathf.Cos(radians) / sine;
+
+ Projection proj = Projection.Identity;
+
+ proj.x.x = cotangent / aspect;
+ proj.y.y = cotangent;
+ proj.z.z = -(zFar + zNear) / deltaZ;
+ proj.z.w = -1;
+ proj.w.z = -2 * zNear * zFar / deltaZ;
+ proj.w.w = 0;
+
+ return proj;
+ }
+
+ public static Projection CreatePerspectiveHmd(real_t fovyDegrees, real_t aspect, real_t zNear, real_t zFar, bool flipFov, int eye, real_t intraocularDist, real_t convergenceDist)
+ {
+ if (flipFov)
+ {
+ fovyDegrees = GetFovy(fovyDegrees, (real_t)1.0 / aspect);
+ }
+
+ real_t ymax = zNear * Mathf.Tan(Mathf.Deg2Rad(fovyDegrees / (real_t)2.0));
+ real_t xmax = ymax * aspect;
+ real_t frustumshift = (intraocularDist / (real_t)2.0) * zNear / convergenceDist;
+ real_t left;
+ real_t right;
+ real_t modeltranslation;
+ switch (eye)
+ {
+ case 1:
+ left = -xmax + frustumshift;
+ right = xmax + frustumshift;
+ modeltranslation = intraocularDist / (real_t)2.0;
+ break;
+ case 2:
+ left = -xmax - frustumshift;
+ right = xmax - frustumshift;
+ modeltranslation = -intraocularDist / (real_t)2.0;
+ break;
+ default:
+ left = -xmax;
+ right = xmax;
+ modeltranslation = (real_t)0.0;
+ break;
+ }
+ Projection proj = CreateFrustum(left, right, -ymax, ymax, zNear, zFar);
+ Projection cm = Projection.Identity;
+ cm.w.x = modeltranslation;
+ return proj * cm;
+ }
+
+ public real_t Determinant()
+ {
+ return x.w * y.z * z.y * w.x - x.z * y.w * z.y * w.x -
+ x.w * y.y * z.z * w.x + x.y * y.w * z.z * w.x +
+ x.z * y.y * z.w * w.x - x.y * y.z * z.w * w.x -
+ x.w * y.z * z.x * w.y + x.z * y.w * z.x * w.y +
+ x.w * y.x * z.z * w.y - x.x * y.w * z.z * w.y -
+ x.z * y.x * z.w * w.y + x.x * y.z * z.w * w.y +
+ x.w * y.y * z.x * w.z - x.y * y.w * z.x * w.z -
+ x.w * y.x * z.y * w.z + x.x * y.w * z.y * w.z +
+ x.y * y.x * z.w * w.z - x.x * y.y * z.w * w.z -
+ x.z * y.y * z.x * w.w + x.y * y.z * z.x * w.w +
+ x.z * y.x * z.y * w.w - x.x * y.z * z.y * w.w -
+ x.y * y.x * z.z * w.w + x.x * y.y * z.z * w.w;
+ }
+
+ public real_t GetAspect()
+ {
+ Vector2 vpHe = GetViewportHalfExtents();
+ return vpHe.x / vpHe.y;
+ }
+
+ public real_t GetFov()
+ {
+ Plane rightPlane = new Plane(x.w - x.x, y.w - y.x, z.w - z.x, -w.w + w.x).Normalized();
+ if (z.x == 0 && z.y == 0)
+ {
+ return Mathf.Rad2Deg(Mathf.Acos(Mathf.Abs(rightPlane.Normal.x))) * (real_t)2.0;
+ }
+ else
+ {
+ Plane leftPlane = new Plane(x.w + x.x, y.w + y.x, z.w + z.x, w.w + w.x).Normalized();
+ return Mathf.Rad2Deg(Mathf.Acos(Mathf.Abs(leftPlane.Normal.x))) + Mathf.Rad2Deg(Mathf.Acos(Mathf.Abs(rightPlane.Normal.x)));
+ }
+ }
+
+ public static real_t GetFovy(real_t fovx, real_t aspect)
+ {
+ return Mathf.Rad2Deg(Mathf.Atan(aspect * Mathf.Tan(Mathf.Deg2Rad(fovx) * (real_t)0.5)) * (real_t)2.0);
+ }
+
+ public real_t GetLodMultiplier()
+ {
+ if (IsOrthogonal())
+ {
+ return GetViewportHalfExtents().x;
+ }
+ else
+ {
+ real_t zn = GetZNear();
+ real_t width = GetViewportHalfExtents().x * (real_t)2.0;
+ return (real_t)1.0 / (zn / width);
+ }
+ }
+
+ public int GetPixelsPerMeter(int forPixelWidth)
+ {
+ Vector3 result = Xform(new Vector3(1, 0, -1));
+
+ return (int)((result.x * (real_t)0.5 + (real_t)0.5) * forPixelWidth);
+ }
+
+ public Plane GetProjectionPlane(Planes plane)
+ {
+ Plane newPlane = plane switch
+ {
+ Planes.Near => new Plane(x.w + x.z, y.w + y.z, z.w + z.z, w.w + w.z),
+ Planes.Far => new Plane(x.w - x.z, y.w - y.z, z.w - z.z, w.w - w.z),
+ Planes.Left => new Plane(x.w + x.x, y.w + y.x, z.w + z.x, w.w + w.x),
+ Planes.Top => new Plane(x.w - x.y, y.w - y.y, z.w - z.y, w.w - w.y),
+ Planes.Right => new Plane(x.w - x.x, y.w - y.x, z.w - z.x, w.w - w.x),
+ Planes.Bottom => new Plane(x.w + x.y, y.w + y.y, z.w + z.y, w.w + w.y),
+ _ => new Plane(),
+ };
+ newPlane.Normal = -newPlane.Normal;
+ return newPlane.Normalized();
+ }
+
+ public Vector2 GetFarPlaneHalfExtents()
+ {
+ var res = GetProjectionPlane(Planes.Far).Intersect3(GetProjectionPlane(Planes.Right), GetProjectionPlane(Planes.Top));
+ return new Vector2(res.Value.x, res.Value.y);
+ }
+
+ public Vector2 GetViewportHalfExtents()
+ {
+ var res = GetProjectionPlane(Planes.Near).Intersect3(GetProjectionPlane(Planes.Right), GetProjectionPlane(Planes.Top));
+ return new Vector2(res.Value.x, res.Value.y);
+ }
+
+ public real_t GetZFar()
+ {
+ return GetProjectionPlane(Planes.Far).D;
+ }
+
+ public real_t GetZNear()
+ {
+ return -GetProjectionPlane(Planes.Near).D;
+ }
+
+ public Projection FlippedY()
+ {
+ Projection proj = this;
+ proj.y = -proj.y;
+ return proj;
+ }
+
+ public Projection PerspectiveZNearAdjusted(real_t newZNear)
+ {
+ Projection proj = this;
+ real_t zFar = GetZFar();
+ real_t zNear = newZNear;
+ real_t deltaZ = zFar - zNear;
+ proj.z.z = -(zFar + zNear) / deltaZ;
+ proj.w.z = -2 * zNear * zFar / deltaZ;
+ return proj;
+ }
+
+ public Projection JitterOffseted(Vector2 offset)
+ {
+ Projection proj = this;
+ proj.w.x += offset.x;
+ proj.w.y += offset.y;
+ return proj;
+ }
+
+ public Projection Inverse()
+ {
+ Projection proj = this;
+ int i, j, k;
+ int[] pvt_i = new int[4];
+ int[] pvt_j = new int[4]; /* Locations of pivot matrix */
+ real_t pvt_val; /* Value of current pivot element */
+ real_t hold; /* Temporary storage */
+ real_t determinant = 1.0f;
+ for (k = 0; k < 4; k++)
+ {
+ /* Locate k'th pivot element */
+ pvt_val = proj[k][k]; /* Initialize for search */
+ pvt_i[k] = k;
+ pvt_j[k] = k;
+ for (i = k; i < 4; i++)
+ {
+ for (j = k; j < 4; j++)
+ {
+ if (Mathf.Abs(proj[i][j]) > Mathf.Abs(pvt_val))
+ {
+ pvt_i[k] = i;
+ pvt_j[k] = j;
+ pvt_val = proj[i][j];
+ }
+ }
+ }
+
+ /* Product of pivots, gives determinant when finished */
+ determinant *= pvt_val;
+ if (Mathf.IsZeroApprox(determinant))
+ {
+ return Zero;
+ }
+
+ /* "Interchange" rows (with sign change stuff) */
+ i = pvt_i[k];
+ if (i != k)
+ { /* If rows are different */
+ for (j = 0; j < 4; j++)
+ {
+ hold = -proj[k][j];
+ proj[k, j] = proj[i][j];
+ proj[i, j] = hold;
+ }
+ }
+
+ /* "Interchange" columns */
+ j = pvt_j[k];
+ if (j != k)
+ { /* If columns are different */
+ for (i = 0; i < 4; i++)
+ {
+ hold = -proj[i][k];
+ proj[i, k] = proj[i][j];
+ proj[i, j] = hold;
+ }
+ }
+
+ /* Divide column by minus pivot value */
+ for (i = 0; i < 4; i++)
+ {
+ if (i != k)
+ {
+ proj[i, k] /= (-pvt_val);
+ }
+ }
+
+ /* Reduce the matrix */
+ for (i = 0; i < 4; i++)
+ {
+ hold = proj[i][k];
+ for (j = 0; j < 4; j++)
+ {
+ if (i != k && j != k)
+ {
+ proj[i, j] += hold * proj[k][j];
+ }
+ }
+ }
+
+ /* Divide row by pivot */
+ for (j = 0; j < 4; j++)
+ {
+ if (j != k)
+ {
+ proj[k, j] /= pvt_val;
+ }
+ }
+
+ /* Replace pivot by reciprocal (at last we can touch it). */
+ proj[k, k] = (real_t)1.0 / pvt_val;
+ }
+
+ /* That was most of the work, one final pass of row/column interchange */
+ /* to finish */
+ for (k = 4 - 2; k >= 0; k--)
+ { /* Don't need to work with 1 by 1 corner*/
+ i = pvt_j[k]; /* Rows to swap correspond to pivot COLUMN */
+ if (i != k)
+ { /* If rows are different */
+ for (j = 0; j < 4; j++)
+ {
+ hold = proj[k][j];
+ proj[k, j] = -proj[i][j];
+ proj[i, j] = hold;
+ }
+ }
+
+ j = pvt_i[k]; /* Columns to swap correspond to pivot ROW */
+ if (j != k)
+ { /* If columns are different */
+ for (i = 0; i < 4; i++)
+ {
+ hold = proj[i][k];
+ proj[i, k] = -proj[i][j];
+ proj[i, j] = hold;
+ }
+ }
+ }
+ return proj;
+ }
+
+ public bool IsOrthogonal()
+ {
+ return w.w == (real_t)1.0;
+ }
+
+ /// <summary>
+ /// Composes these two projections by multiplying them
+ /// together. This has the effect of applying the right
+ /// and then the left projection.
+ /// </summary>
+ /// <param name="left">The parent transform.</param>
+ /// <param name="right">The child transform.</param>
+ /// <returns>The composed projection.</returns>
+ public static Projection operator *(Projection left, Projection right)
+ {
+ return new Projection(
+ new Vector4(
+ left.x.x * right.x.x + left.y.x * right.x.y + left.z.x * right.x.z + left.w.x * right.x.w,
+ left.x.y * right.x.x + left.y.y * right.x.y + left.z.y * right.x.z + left.w.y * right.x.w,
+ left.x.z * right.x.x + left.y.z * right.x.y + left.z.z * right.x.z + left.w.z * right.x.w,
+ left.x.w * right.x.x + left.y.w * right.x.y + left.z.w * right.x.z + left.w.w * right.x.w
+ ), new Vector4(
+ left.x.x * right.y.x + left.y.x * right.y.y + left.z.x * right.y.z + left.w.x * right.y.w,
+ left.x.y * right.y.x + left.y.y * right.y.y + left.z.y * right.y.z + left.w.y * right.y.w,
+ left.x.z * right.y.x + left.y.z * right.y.y + left.z.z * right.y.z + left.w.z * right.y.w,
+ left.x.w * right.y.x + left.y.w * right.y.y + left.z.w * right.y.z + left.w.w * right.y.w
+ ), new Vector4(
+ left.x.x * right.z.x + left.y.x * right.z.y + left.z.x * right.z.z + left.w.x * right.z.w,
+ left.x.y * right.z.x + left.y.y * right.z.y + left.z.y * right.z.z + left.w.y * right.z.w,
+ left.x.z * right.z.x + left.y.z * right.z.y + left.z.z * right.z.z + left.w.z * right.z.w,
+ left.x.w * right.z.x + left.y.w * right.z.y + left.z.w * right.z.z + left.w.w * right.z.w
+ ), new Vector4(
+ left.x.x * right.w.x + left.y.x * right.w.y + left.z.x * right.w.z + left.w.x * right.w.w,
+ left.x.y * right.w.x + left.y.y * right.w.y + left.z.y * right.w.z + left.w.y * right.w.w,
+ left.x.z * right.w.x + left.y.z * right.w.y + left.z.z * right.w.z + left.w.z * right.w.w,
+ left.x.w * right.w.x + left.y.w * right.w.y + left.z.w * right.w.z + left.w.w * right.w.w
+ )
+ );
+ }
+
+ /// <summary>
+ /// Returns a vector transformed (multiplied) by this projection.
+ /// </summary>
+ /// <param name="proj">The projection to apply.</param>
+ /// <param name="v">A vector to transform.</param>
+ /// <returns>The transformed vector.</returns>
+ public static Vector4 operator *(Projection proj, Vector4 v)
+ {
+ return new Vector4(
+ proj.x.x * v.x + proj.y.x * v.y + proj.z.x * v.z + proj.w.x * v.w,
+ proj.x.y * v.x + proj.y.y * v.y + proj.z.y * v.z + proj.w.y * v.w,
+ proj.x.z * v.x + proj.y.z * v.y + proj.z.z * v.z + proj.w.z * v.w,
+ proj.x.w * v.x + proj.y.w * v.y + proj.z.w * v.z + proj.w.w * v.w
+ );
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the projections are exactly equal.
+ /// </summary>
+ /// <param name="left">The left projection.</param>
+ /// <param name="right">The right projection.</param>
+ /// <returns>Whether or not the projections are exactly equal.</returns>
+ public static bool operator ==(Projection left, Projection right)
+ {
+ return left.Equals(right);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the projections are not exactly equal.
+ /// </summary>
+ /// <param name="left">The left projection.</param>
+ /// <param name="right">The right projection.</param>
+ /// <returns>Whether or not the projections are not exactly equal.</returns>
+ public static bool operator !=(Projection left, Projection right)
+ {
+ return !left.Equals(right);
+ }
+
+ /// <summary>
+ /// Access whole columns in the form of <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="column">Which column vector.</param>
+ public Vector4 this[int column]
+ {
+ get
+ {
+ switch (column)
+ {
+ case 0:
+ return x;
+ case 1:
+ return y;
+ case 2:
+ return z;
+ case 3:
+ return w;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ set
+ {
+ switch (column)
+ {
+ case 0:
+ x = value;
+ return;
+ case 1:
+ y = value;
+ return;
+ case 2:
+ z = value;
+ return;
+ case 3:
+ w = value;
+ return;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Access single values.
+ /// </summary>
+ /// <param name="column">Which column vector.</param>
+ /// <param name="row">Which row of the column.</param>
+ public real_t this[int column, int row]
+ {
+ get
+ {
+ switch (column)
+ {
+ case 0:
+ return x[row];
+ case 1:
+ return y[row];
+ case 2:
+ return z[row];
+ case 3:
+ return w[row];
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ set
+ {
+ switch (column)
+ {
+ case 0:
+ x[row] = value;
+ return;
+ case 1:
+ y[row] = value;
+ return;
+ case 2:
+ z[row] = value;
+ return;
+ case 3:
+ w[row] = value;
+ return;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Returns a vector transformed (multiplied) by this projection.
+ /// </summary>
+ /// <param name="v">A vector to transform.</param>
+ /// <returns>The transformed vector.</returns>
+ private Vector3 Xform(Vector3 v)
+ {
+ Vector3 ret = new Vector3(
+ x.x * v.x + y.x * v.y + z.x * v.z + w.x,
+ x.y * v.x + y.y * v.y + z.y * v.z + w.y,
+ x.z * v.x + y.z * v.y + z.z * v.z + w.z
+ );
+ return ret / (x.w * v.x + y.w * v.y + z.w * v.z + w.w);
+ }
+
+ // Constants
+ private static readonly Projection _zero = new Projection(
+ new Vector4(0, 0, 0, 0),
+ new Vector4(0, 0, 0, 0),
+ new Vector4(0, 0, 0, 0),
+ new Vector4(0, 0, 0, 0)
+ );
+ private static readonly Projection _identity = new Projection(
+ new Vector4(1, 0, 0, 0),
+ new Vector4(0, 1, 0, 0),
+ new Vector4(0, 0, 1, 0),
+ new Vector4(0, 0, 0, 1)
+ );
+
+ /// <summary>
+ /// Zero projection, a projection with all components set to <c>0</c>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Projection(Vector4.Zero, Vector4.Zero, Vector4.Zero, Vector4.Zero)</c>.</value>
+ public static Projection Zero { get { return _zero; } }
+
+ /// <summary>
+ /// The identity projection, with no distortion applied.
+ /// This is used as a replacement for <c>Projection()</c> in GDScript.
+ /// Do not use <c>new Projection()</c> with no arguments in C#, because it sets all values to zero.
+ /// </summary>
+ /// <value>Equivalent to <c>new Projection(new Vector4(1, 0, 0, 0), new Vector4(0, 1, 0, 0), new Vector4(0, 0, 1, 0), new Vector4(0, 0, 0, 1))</c>.</value>
+ public static Projection Identity { get { return _identity; } }
+
+ /// <summary>
+ /// Serves as the hash function for <see cref="Projection"/>.
+ /// </summary>
+ /// <returns>A hash code for this projection.</returns>
+ public override int GetHashCode()
+ {
+ return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode() ^ w.GetHashCode();
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Projection"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this projection.</returns>
+ public override string ToString()
+ {
+ return $"{x.x}, {x.y}, {x.z}, {x.w}\n{y.x}, {y.y}, {y.z}, {y.w}\n{z.x}, {z.y}, {z.z}, {z.w}\n{w.x}, {w.y}, {w.z}, {w.w}\n";
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Projection"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this projection.</returns>
+ public string ToString(string format)
+ {
+ return $"{x.x.ToString(format)}, {x.y.ToString(format)}, {x.z.ToString(format)}, {x.w.ToString(format)}\n" +
+ $"{y.x.ToString(format)}, {y.y.ToString(format)}, {y.z.ToString(format)}, {y.w.ToString(format)}\n" +
+ $"{z.x.ToString(format)}, {z.y.ToString(format)}, {z.z.ToString(format)}, {z.w.ToString(format)}\n" +
+ $"{w.x.ToString(format)}, {w.y.ToString(format)}, {w.z.ToString(format)}, {w.w.ToString(format)}\n";
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the projection is exactly equal
+ /// to the given object (<see paramref="obj"/>).
+ /// </summary>
+ /// <param name="obj">The object to compare with.</param>
+ /// <returns>Whether or not the vector and the object are equal.</returns>
+ public override bool Equals(object obj)
+ {
+ if (obj is Projection)
+ {
+ return Equals((Projection)obj);
+ }
+ return false;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the projections are exactly equal.
+ /// </summary>
+ /// <param name="other">The other projection.</param>
+ /// <returns>Whether or not the projections are exactly equal.</returns>
+ public bool Equals(Projection other)
+ {
+ return x == other.x && y == other.y && z == other.z && w == other.w;
+ }
+ }
+}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
index 89947899cb..7861ece61b 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
@@ -301,9 +301,9 @@ namespace Godot
/// </summary>
/// <param name="angle">The angle to rotate, in radians.</param>
/// <returns>The rotated transformation matrix.</returns>
- public Transform2D Rotated(real_t phi)
+ public Transform2D Rotated(real_t angle)
{
- return this * new Transform2D(phi, new Vector2());
+ return this * new Transform2D(angle, new Vector2());
}
/// <summary>
@@ -347,7 +347,7 @@ namespace Godot
/// </summary>
/// <param name="offset">The offset to translate by.</param>
/// <returns>The translated matrix.</returns>
- public Transform2D Translated(Vector2 offset)
+ public Transform2D TranslatedLocal(Vector2 offset)
{
Transform2D copy = this;
copy.origin += copy.BasisXform(offset);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
index 7b211b6577..97b4a87713 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
@@ -192,9 +192,9 @@ namespace Godot
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
/// <param name="angle">The angle to rotate, in radians.</param>
/// <returns>The rotated transformation matrix.</returns>
- public Transform3D Rotated(Vector3 axis, real_t phi)
+ public Transform3D Rotated(Vector3 axis, real_t angle)
{
- return new Transform3D(new Basis(axis, phi), new Vector3()) * this;
+ return new Transform3D(new Basis(axis, angle), new Vector3()) * this;
}
/// <summary>
@@ -239,13 +239,13 @@ namespace Godot
/// </summary>
/// <param name="offset">The offset to translate by.</param>
/// <returns>The translated matrix.</returns>
- public Transform3D Translated(Vector3 offset)
+ public Transform3D TranslatedLocal(Vector3 offset)
{
return new Transform3D(basis, new Vector3
(
- origin[0] += basis.Row0.Dot(offset),
- origin[1] += basis.Row1.Dot(offset),
- origin[2] += basis.Row2.Dot(offset)
+ origin[0] + basis.Row0.Dot(offset),
+ origin[1] + basis.Row1.Dot(offset),
+ origin[2] + basis.Row2.Dot(offset)
));
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
index 7bdbe1c28b..9c80dd0217 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
@@ -495,10 +495,10 @@ namespace Godot
/// </summary>
/// <param name="angle">The angle to rotate by, in radians.</param>
/// <returns>The rotated vector.</returns>
- public Vector2 Rotated(real_t phi)
+ public Vector2 Rotated(real_t angle)
{
- real_t sine = Mathf.Sin(phi);
- real_t cosi = Mathf.Cos(phi);
+ real_t sine = Mathf.Sin(angle);
+ real_t cosi = Mathf.Cos(angle);
return new Vector2(
x * cosi - y * sine,
x * sine + y * cosi);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
index 480165d44a..ec2e724b10 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
@@ -515,7 +515,7 @@ namespace Godot
/// <param name="axis">The vector to rotate around. Must be normalized.</param>
/// <param name="angle">The angle to rotate by, in radians.</param>
/// <returns>The rotated vector.</returns>
- public Vector3 Rotated(Vector3 axis, real_t phi)
+ public Vector3 Rotated(Vector3 axis, real_t angle)
{
#if DEBUG
if (!axis.IsNormalized())
@@ -523,7 +523,7 @@ namespace Godot
throw new ArgumentException("Argument is not normalized", nameof(axis));
}
#endif
- return new Basis(axis, phi).Xform(this);
+ return new Basis(axis, angle).Xform(this);
}
/// <summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs
new file mode 100644
index 0000000000..72fe9cb16f
--- /dev/null
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4.cs
@@ -0,0 +1,730 @@
+#if REAL_T_IS_DOUBLE
+using real_t = System.Double;
+#else
+using real_t = System.Single;
+#endif
+using System;
+using System.Runtime.InteropServices;
+
+namespace Godot
+{
+ /// <summary>
+ /// 4-element structure that can be used to represent positions in 4D space or any other pair of numeric values.
+ /// </summary>
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Vector4 : IEquatable<Vector4>
+ {
+ /// <summary>
+ /// Enumerated index values for the axes.
+ /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>.
+ /// </summary>
+ public enum Axis
+ {
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
+ X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
+ Y,
+ /// <summary>
+ /// The vector's Z axis.
+ /// </summary>
+ Z,
+ /// <summary>
+ /// The vector's W axis.
+ /// </summary>
+ W
+ }
+
+ /// <summary>
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
+ /// </summary>
+ public real_t x;
+
+ /// <summary>
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
+ /// </summary>
+ public real_t y;
+
+ /// <summary>
+ /// The vector's Z component. Also accessible by using the index position <c>[2]</c>.
+ /// </summary>
+ public real_t z;
+
+ /// <summary>
+ /// The vector's W component. Also accessible by using the index position <c>[3]</c>.
+ /// </summary>
+ public real_t w;
+
+ /// <summary>
+ /// Access vector components using their index.
+ /// </summary>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0, 1, 2 or 3.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>,
+ /// <c>[2]</c> is equivalent to <see cref="z"/>.
+ /// <c>[3]</c> is equivalent to <see cref="w"/>.
+ /// </value>
+ public real_t this[int index]
+ {
+ get
+ {
+ switch (index)
+ {
+ case 0:
+ return x;
+ case 1:
+ return y;
+ case 2:
+ return z;
+ case 3:
+ return w;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ set
+ {
+ switch (index)
+ {
+ case 0:
+ x = value;
+ return;
+ case 1:
+ y = value;
+ return;
+ case 2:
+ z = value;
+ return;
+ case 3:
+ w = value;
+ return;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Helper method for deconstruction into a tuple.
+ /// </summary>
+ public void Deconstruct(out real_t x, out real_t y, out real_t z, out real_t w)
+ {
+ x = this.x;
+ y = this.y;
+ z = this.z;
+ w = this.w;
+ }
+
+ internal void Normalize()
+ {
+ real_t lengthsq = LengthSquared();
+
+ if (lengthsq == 0)
+ {
+ x = y = z = w = 0f;
+ }
+ else
+ {
+ real_t length = Mathf.Sqrt(lengthsq);
+ x /= length;
+ y /= length;
+ z /= length;
+ w /= length;
+ }
+ }
+
+
+ /// <summary>
+ /// Returns a new vector with all components in absolute values (i.e. positive).
+ /// </summary>
+ /// <returns>A vector with <see cref="Mathf.Abs(real_t)"/> called on each component.</returns>
+ public Vector4 Abs()
+ {
+ return new Vector4(Mathf.Abs(x), Mathf.Abs(y), Mathf.Abs(z), Mathf.Abs(w));
+ }
+
+ /// <summary>
+ /// Returns a new vector with all components rounded up (towards positive infinity).
+ /// </summary>
+ /// <returns>A vector with <see cref="Mathf.Ceil"/> called on each component.</returns>
+ public Vector4 Ceil()
+ {
+ return new Vector4(Mathf.Ceil(x), Mathf.Ceil(y), Mathf.Ceil(z), Mathf.Ceil(w));
+ }
+
+ /// <summary>
+ /// Returns a new vector with all components clamped between the
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
+ /// <see cref="Mathf.Clamp(real_t, real_t, real_t)"/>.
+ /// </summary>
+ /// <param name="min">The vector with minimum allowed values.</param>
+ /// <param name="max">The vector with maximum allowed values.</param>
+ /// <returns>The vector with all components clamped.</returns>
+ public Vector4 Clamp(Vector4 min, Vector4 max)
+ {
+ return new Vector4
+ (
+ Mathf.Clamp(x, min.x, max.x),
+ Mathf.Clamp(y, min.y, max.y),
+ Mathf.Clamp(z, min.z, max.z),
+ Mathf.Clamp(w, min.w, max.w)
+ );
+ }
+
+
+ /// <summary>
+ /// Returns a new vector with all components rounded down (towards negative infinity).
+ /// </summary>
+ /// <returns>A vector with <see cref="Mathf.Floor"/> called on each component.</returns>
+ public Vector4 Floor()
+ {
+ return new Vector4(Mathf.Floor(x), Mathf.Floor(y), Mathf.Floor(z), Mathf.Floor(w));
+ }
+
+
+ /// <summary>
+ /// Returns the dot product of this vector and <paramref name="with"/>.
+ /// </summary>
+ /// <param name="with">The other vector to use.</param>
+ /// <returns>The dot product of the two vectors.</returns>
+ public real_t Dot(Vector4 with)
+ {
+ return (x * with.x) + (y * with.y) + (z * with.z) + (w + with.w);
+ }
+
+ /// <summary>
+ /// Returns the inverse of this vector. This is the same as <c>new Vector4(1 / v.x, 1 / v.y, 1 / v.z, 1 / v.w)</c>.
+ /// </summary>
+ /// <returns>The inverse of this vector.</returns>
+ public Vector4 Inverse()
+ {
+ return new Vector4(1 / x, 1 / y, 1 / z, 1 / w);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vector is normalized, and <see langword="false"/> otherwise.
+ /// </summary>
+ /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
+ public bool IsNormalized()
+ {
+ return Mathf.Abs(LengthSquared() - 1.0f) < Mathf.Epsilon;
+ }
+
+ /// <summary>
+ /// Returns the length (magnitude) of this vector.
+ /// </summary>
+ /// <seealso cref="LengthSquared"/>
+ /// <returns>The length of this vector.</returns>
+ public real_t Length()
+ {
+ real_t x2 = x * x;
+ real_t y2 = y * y;
+ real_t z2 = z * z;
+ real_t w2 = w * w;
+
+ return Mathf.Sqrt(x2 + y2 + z2 + w2);
+ }
+
+ /// <summary>
+ /// Returns the squared length (squared magnitude) of this vector.
+ /// This method runs faster than <see cref="Length"/>, so prefer it if
+ /// you need to compare vectors or need the squared length for some formula.
+ /// </summary>
+ /// <returns>The squared length of this vector.</returns>
+ public real_t LengthSquared()
+ {
+ real_t x2 = x * x;
+ real_t y2 = y * y;
+ real_t z2 = z * z;
+ real_t w2 = w * w;
+
+ return x2 + y2 + z2 + w2;
+ }
+
+ /// <summary>
+ /// Returns the result of the linear interpolation between
+ /// this vector and <paramref name="to"/> by amount <paramref name="weight"/>.
+ /// </summary>
+ /// <param name="to">The destination vector for interpolation.</param>
+ /// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
+ /// <returns>The resulting vector of the interpolation.</returns>
+ public Vector4 Lerp(Vector4 to, real_t weight)
+ {
+ return new Vector4
+ (
+ Mathf.Lerp(x, to.x, weight),
+ Mathf.Lerp(y, to.y, weight),
+ Mathf.Lerp(z, to.z, weight),
+ Mathf.Lerp(w, to.w, weight)
+ );
+ }
+
+ /// <summary>
+ /// Returns the axis of the vector's highest value. See <see cref="Axis"/>.
+ /// If all components are equal, this method returns <see cref="Axis.X"/>.
+ /// </summary>
+ /// <returns>The index of the highest axis.</returns>
+ public Axis MaxAxisIndex()
+ {
+ int max_index = 0;
+ real_t max_value = x;
+ for (int i = 1; i < 4; i++)
+ {
+ if (this[i] > max_value)
+ {
+ max_index = i;
+ max_value = this[i];
+ }
+ }
+ return (Axis)max_index;
+ }
+
+ /// <summary>
+ /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>.
+ /// If all components are equal, this method returns <see cref="Axis.W"/>.
+ /// </summary>
+ /// <returns>The index of the lowest axis.</returns>
+ public Axis MinAxisIndex()
+ {
+ int min_index = 0;
+ real_t min_value = x;
+ for (int i = 1; i < 4; i++)
+ {
+ if (this[i] <= min_value)
+ {
+ min_index = i;
+ min_value = this[i];
+ }
+ }
+ return (Axis)min_index;
+ }
+
+ /// <summary>
+ /// Returns the vector scaled to unit length. Equivalent to <c>v / v.Length()</c>.
+ /// </summary>
+ /// <returns>A normalized version of the vector.</returns>
+ public Vector4 Normalized()
+ {
+ Vector4 v = this;
+ v.Normalize();
+ return v;
+ }
+
+ /// <summary>
+ /// Returns this vector with all components rounded to the nearest integer,
+ /// with halfway cases rounded towards the nearest multiple of two.
+ /// </summary>
+ /// <returns>The rounded vector.</returns>
+ public Vector4 Round()
+ {
+ return new Vector4(Mathf.Round(x), Mathf.Round(y), Mathf.Round(z), Mathf.Round(w));
+ }
+
+ /// <summary>
+ /// Returns a vector with each component set to one or negative one, depending
+ /// on the signs of this vector's components, or zero if the component is zero,
+ /// by calling <see cref="Mathf.Sign(real_t)"/> on each component.
+ /// </summary>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
+ public Vector4 Sign()
+ {
+ Vector4 v;
+ v.x = Mathf.Sign(x);
+ v.y = Mathf.Sign(y);
+ v.z = Mathf.Sign(z);
+ v.w = Mathf.Sign(w);
+ return v;
+ }
+
+ // Constants
+ private static readonly Vector4 _zero = new Vector4(0, 0, 0, 0);
+ private static readonly Vector4 _one = new Vector4(1, 1, 1, 1);
+ private static readonly Vector4 _inf = new Vector4(Mathf.Inf, Mathf.Inf, Mathf.Inf, Mathf.Inf);
+
+ /// <summary>
+ /// Zero vector, a vector with all components set to <c>0</c>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Vector4(0, 0, 0, 0)</c>.</value>
+ public static Vector4 Zero { get { return _zero; } }
+ /// <summary>
+ /// One vector, a vector with all components set to <c>1</c>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Vector4(1, 1, 1, 1)</c>.</value>
+ public static Vector4 One { get { return _one; } }
+ /// <summary>
+ /// Infinity vector, a vector with all components set to <see cref="Mathf.Inf"/>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Vector4(Mathf.Inf, Mathf.Inf, Mathf.Inf, Mathf.Inf)</c>.</value>
+ public static Vector4 Inf { get { return _inf; } }
+
+ /// <summary>
+ /// Constructs a new <see cref="Vector4"/> with the given components.
+ /// </summary>
+ /// <param name="x">The vector's X component.</param>
+ /// <param name="y">The vector's Y component.</param>
+ /// <param name="z">The vector's Z component.</param>
+ /// <param name="w">The vector's W component.</param>
+ public Vector4(real_t x, real_t y, real_t z, real_t w)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Vector4"/> from an existing <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="v">The existing <see cref="Vector4"/>.</param>
+ public Vector4(Vector4 v)
+ {
+ x = v.x;
+ y = v.y;
+ z = v.z;
+ w = v.w;
+ }
+
+ /// <summary>
+ /// Adds each component of the <see cref="Vector4"/>
+ /// with the components of the given <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The added vector.</returns>
+ public static Vector4 operator +(Vector4 left, Vector4 right)
+ {
+ left.x += right.x;
+ left.y += right.y;
+ left.z += right.z;
+ left.w += right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Subtracts each component of the <see cref="Vector4"/>
+ /// by the components of the given <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The subtracted vector.</returns>
+ public static Vector4 operator -(Vector4 left, Vector4 right)
+ {
+ left.x -= right.x;
+ left.y -= right.y;
+ left.z -= right.z;
+ left.w -= right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Returns the negative value of the <see cref="Vector4"/>.
+ /// This is the same as writing <c>new Vector4(-v.x, -v.y, -v.z, -v.w)</c>.
+ /// This operation flips the direction of the vector while
+ /// keeping the same magnitude.
+ /// With floats, the number zero can be either positive or negative.
+ /// </summary>
+ /// <param name="vec">The vector to negate/flip.</param>
+ /// <returns>The negated/flipped vector.</returns>
+ public static Vector4 operator -(Vector4 vec)
+ {
+ vec.x = -vec.x;
+ vec.y = -vec.y;
+ vec.z = -vec.z;
+ vec.w = -vec.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4"/>
+ /// by the given <see cref="real_t"/>.
+ /// </summary>
+ /// <param name="vec">The vector to multiply.</param>
+ /// <param name="scale">The scale to multiply by.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4 operator *(Vector4 vec, real_t scale)
+ {
+ vec.x *= scale;
+ vec.y *= scale;
+ vec.z *= scale;
+ vec.w *= scale;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4"/>
+ /// by the given <see cref="real_t"/>.
+ /// </summary>
+ /// <param name="scale">The scale to multiply by.</param>
+ /// <param name="vec">The vector to multiply.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4 operator *(real_t scale, Vector4 vec)
+ {
+ vec.x *= scale;
+ vec.y *= scale;
+ vec.z *= scale;
+ vec.w *= scale;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4"/>
+ /// by the components of the given <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4 operator *(Vector4 left, Vector4 right)
+ {
+ left.x *= right.x;
+ left.y *= right.y;
+ left.z *= right.z;
+ left.w *= right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Divides each component of the <see cref="Vector4"/>
+ /// by the given <see cref="real_t"/>.
+ /// </summary>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisor">The divisor value.</param>
+ /// <returns>The divided vector.</returns>
+ public static Vector4 operator /(Vector4 vec, real_t divisor)
+ {
+ vec.x /= divisor;
+ vec.y /= divisor;
+ vec.z /= divisor;
+ vec.w /= divisor;
+ return vec;
+ }
+
+ /// <summary>
+ /// Divides each component of the <see cref="Vector4"/>
+ /// by the components of the given <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisorv">The divisor vector.</param>
+ /// <returns>The divided vector.</returns>
+ public static Vector4 operator /(Vector4 vec, Vector4 divisorv)
+ {
+ vec.x /= divisorv.x;
+ vec.y /= divisorv.y;
+ vec.z /= divisorv.z;
+ vec.w /= divisorv.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are exactly equal.
+ /// Note: Due to floating-point precision errors, consider using
+ /// <see cref="IsEqualApprox"/> instead, which is more reliable.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the vectors are exactly equal.</returns>
+ public static bool operator ==(Vector4 left, Vector4 right)
+ {
+ return left.Equals(right);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are not equal.
+ /// Note: Due to floating-point precision errors, consider using
+ /// <see cref="IsEqualApprox"/> instead, which is more reliable.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the vectors are not equal.</returns>
+ public static bool operator !=(Vector4 left, Vector4 right)
+ {
+ return !left.Equals(right);
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is less than
+ /// the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is less than the right.</returns>
+ public static bool operator <(Vector4 left, Vector4 right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w < right.w;
+ }
+ return left.z < right.z;
+ }
+ return left.y < right.y;
+ }
+ return left.x < right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is greater than
+ /// the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is greater than the right.</returns>
+ public static bool operator >(Vector4 left, Vector4 right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w > right.w;
+ }
+ return left.z > right.z;
+ }
+ return left.y > right.y;
+ }
+ return left.x > right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is less than
+ /// or equal to the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is less than or equal to the right.</returns>
+ public static bool operator <=(Vector4 left, Vector4 right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w <= right.w;
+ }
+ return left.z < right.z;
+ }
+ return left.y < right.y;
+ }
+ return left.x < right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is greater than
+ /// or equal to the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is greater than or equal to the right.</returns>
+ public static bool operator >=(Vector4 left, Vector4 right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w >= right.w;
+ }
+ return left.z > right.z;
+ }
+ return left.y > right.y;
+ }
+ return left.x > right.x;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vector is exactly equal
+ /// to the given object (<see paramref="obj"/>).
+ /// Note: Due to floating-point precision errors, consider using
+ /// <see cref="IsEqualApprox"/> instead, which is more reliable.
+ /// </summary>
+ /// <param name="obj">The object to compare with.</param>
+ /// <returns>Whether or not the vector and the object are equal.</returns>
+ public override bool Equals(object obj)
+ {
+ if (obj is Vector4)
+ {
+ return Equals((Vector4)obj);
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are exactly equal.
+ /// Note: Due to floating-point precision errors, consider using
+ /// <see cref="IsEqualApprox"/> instead, which is more reliable.
+ /// </summary>
+ /// <param name="other">The other vector.</param>
+ /// <returns>Whether or not the vectors are exactly equal.</returns>
+ public bool Equals(Vector4 other)
+ {
+ return x == other.x && y == other.y && z == other.z && w == other.w;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
+ /// </summary>
+ /// <param name="other">The other vector to compare.</param>
+ /// <returns>Whether or not the vectors are approximately equal.</returns>
+ public bool IsEqualApprox(Vector4 other)
+ {
+ return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z) && Mathf.IsEqualApprox(w, other.w);
+ }
+
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector4"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
+ public override int GetHashCode()
+ {
+ return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode() ^ w.GetHashCode();
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Vector4"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
+ public override string ToString()
+ {
+ return $"({x}, {y}, {z}, {w})";
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Vector4"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
+ public string ToString(string format)
+ {
+ return $"({x.ToString(format)}, {y.ToString(format)}, {z.ToString(format)}, {w.ToString(format)})";
+ }
+ }
+}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4i.cs
new file mode 100644
index 0000000000..365dcef486
--- /dev/null
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector4i.cs
@@ -0,0 +1,702 @@
+#if REAL_T_IS_DOUBLE
+using real_t = System.Double;
+#else
+using real_t = System.Single;
+#endif
+using System;
+using System.Runtime.InteropServices;
+
+namespace Godot
+{
+ /// <summary>
+ /// 4-element structure that can be used to represent 4D grid coordinates or sets of integers.
+ /// </summary>
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Vector4i : IEquatable<Vector4i>
+ {
+ /// <summary>
+ /// Enumerated index values for the axes.
+ /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>.
+ /// </summary>
+ public enum Axis
+ {
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
+ X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
+ Y,
+ /// <summary>
+ /// The vector's Z axis.
+ /// </summary>
+ Z,
+ /// <summary>
+ /// The vector's W axis.
+ /// </summary>
+ W
+ }
+
+ /// <summary>
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
+ /// </summary>
+ public int x;
+
+ /// <summary>
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
+ /// </summary>
+ public int y;
+
+ /// <summary>
+ /// The vector's Z component. Also accessible by using the index position <c>[2]</c>.
+ /// </summary>
+ public int z;
+
+ /// <summary>
+ /// The vector's W component. Also accessible by using the index position <c>[3]</c>.
+ /// </summary>
+ public int w;
+
+ /// <summary>
+ /// Access vector components using their <paramref name="index"/>.
+ /// </summary>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0, 1, 2 or 3.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>,
+ /// <c>[2]</c> is equivalent to <see cref="z"/>.
+ /// <c>[3]</c> is equivalent to <see cref="w"/>.
+ /// </value>
+ public int this[int index]
+ {
+ get
+ {
+ switch (index)
+ {
+ case 0:
+ return x;
+ case 1:
+ return y;
+ case 2:
+ return z;
+ case 3:
+ return w;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ set
+ {
+ switch (index)
+ {
+ case 0:
+ x = value;
+ return;
+ case 1:
+ y = value;
+ return;
+ case 2:
+ z = value;
+ return;
+ case 3:
+ w = value;
+ return;
+ default:
+ throw new IndexOutOfRangeException();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Helper method for deconstruction into a tuple.
+ /// </summary>
+ public void Deconstruct(out int x, out int y, out int z, out int w)
+ {
+ x = this.x;
+ y = this.y;
+ z = this.z;
+ w = this.w;
+ }
+
+ /// <summary>
+ /// Returns a new vector with all components in absolute values (i.e. positive).
+ /// </summary>
+ /// <returns>A vector with <see cref="Mathf.Abs(int)"/> called on each component.</returns>
+ public Vector4i Abs()
+ {
+ return new Vector4i(Mathf.Abs(x), Mathf.Abs(y), Mathf.Abs(z), Mathf.Abs(w));
+ }
+
+ /// <summary>
+ /// Returns a new vector with all components clamped between the
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
+ /// <see cref="Mathf.Clamp(int, int, int)"/>.
+ /// </summary>
+ /// <param name="min">The vector with minimum allowed values.</param>
+ /// <param name="max">The vector with maximum allowed values.</param>
+ /// <returns>The vector with all components clamped.</returns>
+ public Vector4i Clamp(Vector4i min, Vector4i max)
+ {
+ return new Vector4i
+ (
+ Mathf.Clamp(x, min.x, max.x),
+ Mathf.Clamp(y, min.y, max.y),
+ Mathf.Clamp(z, min.z, max.z),
+ Mathf.Clamp(w, min.w, max.w)
+ );
+ }
+
+ /// <summary>
+ /// Returns the length (magnitude) of this vector.
+ /// </summary>
+ /// <seealso cref="LengthSquared"/>
+ /// <returns>The length of this vector.</returns>
+ public real_t Length()
+ {
+ int x2 = x * x;
+ int y2 = y * y;
+ int z2 = z * z;
+ int w2 = w * w;
+
+ return Mathf.Sqrt(x2 + y2 + z2 + w2);
+ }
+
+ /// <summary>
+ /// Returns the squared length (squared magnitude) of this vector.
+ /// This method runs faster than <see cref="Length"/>, so prefer it if
+ /// you need to compare vectors or need the squared length for some formula.
+ /// </summary>
+ /// <returns>The squared length of this vector.</returns>
+ public int LengthSquared()
+ {
+ int x2 = x * x;
+ int y2 = y * y;
+ int z2 = z * z;
+ int w2 = w * w;
+
+ return x2 + y2 + z2 + w2;
+ }
+
+ /// <summary>
+ /// Returns the axis of the vector's highest value. See <see cref="Axis"/>.
+ /// If all components are equal, this method returns <see cref="Axis.X"/>.
+ /// </summary>
+ /// <returns>The index of the highest axis.</returns>
+ public Axis MaxAxisIndex()
+ {
+ int max_index = 0;
+ int max_value = x;
+ for (int i = 1; i < 4; i++)
+ {
+ if (this[i] > max_value)
+ {
+ max_index = i;
+ max_value = this[i];
+ }
+ }
+ return (Axis)max_index;
+ }
+
+ /// <summary>
+ /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>.
+ /// If all components are equal, this method returns <see cref="Axis.W"/>.
+ /// </summary>
+ /// <returns>The index of the lowest axis.</returns>
+ public Axis MinAxisIndex()
+ {
+ int min_index = 0;
+ int min_value = x;
+ for (int i = 1; i < 4; i++)
+ {
+ if (this[i] <= min_value)
+ {
+ min_index = i;
+ min_value = this[i];
+ }
+ }
+ return (Axis)min_index;
+ }
+
+ /// <summary>
+ /// Returns a vector with each component set to one or negative one, depending
+ /// on the signs of this vector's components, or zero if the component is zero,
+ /// by calling <see cref="Mathf.Sign(int)"/> on each component.
+ /// </summary>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
+ public Vector4i Sign()
+ {
+ return new Vector4i(Mathf.Sign(x), Mathf.Sign(y), Mathf.Sign(z), Mathf.Sign(w));
+ }
+
+ // Constants
+ private static readonly Vector4i _zero = new Vector4i(0, 0, 0, 0);
+ private static readonly Vector4i _one = new Vector4i(1, 1, 1, 1);
+
+ /// <summary>
+ /// Zero vector, a vector with all components set to <c>0</c>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Vector4i(0, 0, 0, 0)</c>.</value>
+ public static Vector4i Zero { get { return _zero; } }
+ /// <summary>
+ /// One vector, a vector with all components set to <c>1</c>.
+ /// </summary>
+ /// <value>Equivalent to <c>new Vector4i(1, 1, 1, 1)</c>.</value>
+ public static Vector4i One { get { return _one; } }
+
+ /// <summary>
+ /// Constructs a new <see cref="Vector4i"/> with the given components.
+ /// </summary>
+ /// <param name="x">The vector's X component.</param>
+ /// <param name="y">The vector's Y component.</param>
+ /// <param name="z">The vector's Z component.</param>
+ /// <param name="w">The vector's W component.</param>
+ public Vector4i(int x, int y, int z, int w)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Vector4i"/> from an existing <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="vi">The existing <see cref="Vector4i"/>.</param>
+ public Vector4i(Vector4i vi)
+ {
+ this.x = vi.x;
+ this.y = vi.y;
+ this.z = vi.z;
+ this.w = vi.w;
+ }
+
+ /// <summary>
+ /// Constructs a new <see cref="Vector4i"/> from an existing <see cref="Vector4"/>
+ /// by rounding the components via <see cref="Mathf.RoundToInt(real_t)"/>.
+ /// </summary>
+ /// <param name="v">The <see cref="Vector4"/> to convert.</param>
+ public Vector4i(Vector4 v)
+ {
+ this.x = Mathf.RoundToInt(v.x);
+ this.y = Mathf.RoundToInt(v.y);
+ this.z = Mathf.RoundToInt(v.z);
+ this.w = Mathf.RoundToInt(v.w);
+ }
+
+ /// <summary>
+ /// Adds each component of the <see cref="Vector4i"/>
+ /// with the components of the given <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The added vector.</returns>
+ public static Vector4i operator +(Vector4i left, Vector4i right)
+ {
+ left.x += right.x;
+ left.y += right.y;
+ left.z += right.z;
+ left.w += right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Subtracts each component of the <see cref="Vector4i"/>
+ /// by the components of the given <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The subtracted vector.</returns>
+ public static Vector4i operator -(Vector4i left, Vector4i right)
+ {
+ left.x -= right.x;
+ left.y -= right.y;
+ left.z -= right.z;
+ left.w -= right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Returns the negative value of the <see cref="Vector4i"/>.
+ /// This is the same as writing <c>new Vector4i(-v.x, -v.y, -v.z, -v.w)</c>.
+ /// This operation flips the direction of the vector while
+ /// keeping the same magnitude.
+ /// </summary>
+ /// <param name="vec">The vector to negate/flip.</param>
+ /// <returns>The negated/flipped vector.</returns>
+ public static Vector4i operator -(Vector4i vec)
+ {
+ vec.x = -vec.x;
+ vec.y = -vec.y;
+ vec.z = -vec.z;
+ vec.w = -vec.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4i"/>
+ /// by the given <see langword="int"/>.
+ /// </summary>
+ /// <param name="vec">The vector to multiply.</param>
+ /// <param name="scale">The scale to multiply by.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4i operator *(Vector4i vec, int scale)
+ {
+ vec.x *= scale;
+ vec.y *= scale;
+ vec.z *= scale;
+ vec.w *= scale;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4i"/>
+ /// by the given <see langword="int"/>.
+ /// </summary>
+ /// <param name="scale">The scale to multiply by.</param>
+ /// <param name="vec">The vector to multiply.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4i operator *(int scale, Vector4i vec)
+ {
+ vec.x *= scale;
+ vec.y *= scale;
+ vec.z *= scale;
+ vec.w *= scale;
+ return vec;
+ }
+
+ /// <summary>
+ /// Multiplies each component of the <see cref="Vector4i"/>
+ /// by the components of the given <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>The multiplied vector.</returns>
+ public static Vector4i operator *(Vector4i left, Vector4i right)
+ {
+ left.x *= right.x;
+ left.y *= right.y;
+ left.z *= right.z;
+ left.w *= right.w;
+ return left;
+ }
+
+ /// <summary>
+ /// Divides each component of the <see cref="Vector4i"/>
+ /// by the given <see langword="int"/>.
+ /// </summary>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisor">The divisor value.</param>
+ /// <returns>The divided vector.</returns>
+ public static Vector4i operator /(Vector4i vec, int divisor)
+ {
+ vec.x /= divisor;
+ vec.y /= divisor;
+ vec.z /= divisor;
+ vec.w /= divisor;
+ return vec;
+ }
+
+ /// <summary>
+ /// Divides each component of the <see cref="Vector4i"/>
+ /// by the components of the given <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisorv">The divisor vector.</param>
+ /// <returns>The divided vector.</returns>
+ public static Vector4i operator /(Vector4i vec, Vector4i divisorv)
+ {
+ vec.x /= divisorv.x;
+ vec.y /= divisorv.y;
+ vec.z /= divisorv.z;
+ vec.w /= divisorv.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Gets the remainder of each component of the <see cref="Vector4i"/>
+ /// with the components of the given <see langword="int"/>.
+ /// This operation uses truncated division, which is often not desired
+ /// as it does not work well with negative numbers.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Print(new Vecto43i(10, -20, 30, -40) % 7); // Prints "(3, -6, 2, -5)"
+ /// </code>
+ /// </example>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisor">The divisor value.</param>
+ /// <returns>The remainder vector.</returns>
+ public static Vector4i operator %(Vector4i vec, int divisor)
+ {
+ vec.x %= divisor;
+ vec.y %= divisor;
+ vec.z %= divisor;
+ vec.w %= divisor;
+ return vec;
+ }
+
+ /// <summary>
+ /// Gets the remainder of each component of the <see cref="Vector4i"/>
+ /// with the components of the given <see cref="Vector4i"/>.
+ /// This operation uses truncated division, which is often not desired
+ /// as it does not work well with negative numbers.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Print(new Vector4i(10, -20, 30, -40) % new Vector4i(6, 7, 8, 9)); // Prints "(4, -6, 6, -4)"
+ /// </code>
+ /// </example>
+ /// <param name="vec">The dividend vector.</param>
+ /// <param name="divisorv">The divisor vector.</param>
+ /// <returns>The remainder vector.</returns>
+ public static Vector4i operator %(Vector4i vec, Vector4i divisorv)
+ {
+ vec.x %= divisorv.x;
+ vec.y %= divisorv.y;
+ vec.z %= divisorv.z;
+ vec.w %= divisorv.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Performs a bitwise AND operation with this <see cref="Vector4i"/>
+ /// and the given <see langword="int"/>.
+ /// </summary>
+ /// <param name="vec">The vector to AND with.</param>
+ /// <param name="and">The integer to AND with.</param>
+ /// <returns>The result of the bitwise AND.</returns>
+ public static Vector4i operator &(Vector4i vec, int and)
+ {
+ vec.x &= and;
+ vec.y &= and;
+ vec.z &= and;
+ vec.w &= and;
+ return vec;
+ }
+
+ /// <summary>
+ /// Performs a bitwise AND operation with this <see cref="Vector4i"/>
+ /// and the given <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="vec">The left vector to AND with.</param>
+ /// <param name="andv">The right vector to AND with.</param>
+ /// <returns>The result of the bitwise AND.</returns>
+ public static Vector4i operator &(Vector4i vec, Vector4i andv)
+ {
+ vec.x &= andv.x;
+ vec.y &= andv.y;
+ vec.z &= andv.z;
+ vec.w &= andv.w;
+ return vec;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are equal.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
+ public static bool operator ==(Vector4i left, Vector4i right)
+ {
+ return left.Equals(right);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are not equal.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the vectors are not equal.</returns>
+ public static bool operator !=(Vector4i left, Vector4i right)
+ {
+ return !left.Equals(right);
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4i"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is less than
+ /// the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is less than the right.</returns>
+ public static bool operator <(Vector4i left, Vector4i right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w < right.w;
+ }
+ return left.z < right.z;
+ }
+ return left.y < right.y;
+ }
+ return left.x < right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4i"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is greater than
+ /// the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is greater than the right.</returns>
+ public static bool operator >(Vector4i left, Vector4i right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w > right.w;
+ }
+ return left.z > right.z;
+ }
+ return left.y > right.y;
+ }
+ return left.x > right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4i"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is less than
+ /// or equal to the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is less than or equal to the right.</returns>
+ public static bool operator <=(Vector4i left, Vector4i right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w <= right.w;
+ }
+ return left.z < right.z;
+ }
+ return left.y < right.y;
+ }
+ return left.x < right.x;
+ }
+
+ /// <summary>
+ /// Compares two <see cref="Vector4i"/> vectors by first checking if
+ /// the X value of the <paramref name="left"/> vector is greater than
+ /// or equal to the X value of the <paramref name="right"/> vector.
+ /// If the X values are exactly equal, then it repeats this check
+ /// with the Y, Z and finally W values of the two vectors.
+ /// This operator is useful for sorting vectors.
+ /// </summary>
+ /// <param name="left">The left vector.</param>
+ /// <param name="right">The right vector.</param>
+ /// <returns>Whether or not the left is greater than or equal to the right.</returns>
+ public static bool operator >=(Vector4i left, Vector4i right)
+ {
+ if (left.x == right.x)
+ {
+ if (left.y == right.y)
+ {
+ if (left.z == right.z)
+ {
+ return left.w >= right.w;
+ }
+ return left.z > right.z;
+ }
+ return left.y > right.y;
+ }
+ return left.x > right.x;
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Vector4i"/> to a <see cref="Vector4"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
+ public static implicit operator Vector4(Vector4i value)
+ {
+ return new Vector4(value.x, value.y, value.z, value.w);
+ }
+
+ /// <summary>
+ /// Converts a <see cref="Vector4"/> to a <see cref="Vector4i"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
+ public static explicit operator Vector4i(Vector4 value)
+ {
+ return new Vector4i(value);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vector is equal
+ /// to the given object (<see paramref="obj"/>).
+ /// </summary>
+ /// <param name="obj">The object to compare with.</param>
+ /// <returns>Whether or not the vector and the object are equal.</returns>
+ public override bool Equals(object obj)
+ {
+ if (obj is Vector4i)
+ {
+ return Equals((Vector4i)obj);
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if the vectors are equal.
+ /// </summary>
+ /// <param name="other">The other vector.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
+ public bool Equals(Vector4i other)
+ {
+ return x == other.x && y == other.y && z == other.z && w == other.w;
+ }
+
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector4i"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
+ public override int GetHashCode()
+ {
+ return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode() ^ w.GetHashCode();
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Vector4i"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
+ public override string ToString()
+ {
+ return $"({x}, {y}, {z}, {w})";
+ }
+
+ /// <summary>
+ /// Converts this <see cref="Vector4i"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
+ public string ToString(string format)
+ {
+ return $"({x.ToString(format)}, {y.ToString(format)}, {z.ToString(format)}), {w.ToString(format)})";
+ }
+ }
+}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj b/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
index e59f45bbf6..4f55ce47e8 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
+++ b/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
@@ -50,6 +50,7 @@
<Compile Include="Core\NodePath.cs" />
<Compile Include="Core\Object.base.cs" />
<Compile Include="Core\Plane.cs" />
+ <Compile Include="Core\Projection.cs" />
<Compile Include="Core\Quaternion.cs" />
<Compile Include="Core\Rect2.cs" />
<Compile Include="Core\Rect2i.cs" />
@@ -65,6 +66,8 @@
<Compile Include="Core\Vector2i.cs" />
<Compile Include="Core\Vector3.cs" />
<Compile Include="Core\Vector3i.cs" />
+ <Compile Include="Core\Vector4.cs" />
+ <Compile Include="Core\Vector4i.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<!--
diff --git a/modules/mono/glue/callable_glue.cpp b/modules/mono/glue/callable_glue.cpp
index e59b34313c..521dc3dff7 100644
--- a/modules/mono/glue/callable_glue.cpp
+++ b/modules/mono/glue/callable_glue.cpp
@@ -49,7 +49,7 @@ MonoObject *godot_icall_Callable_Call(GDMonoMarshal::M_Callable *p_callable, Mon
Variant result;
Callable::CallError error;
- callable.call(args.ptr(), argc, result, error);
+ callable.callp(args.ptr(), argc, result, error);
return GDMonoMarshal::variant_to_mono_object(result);
}
@@ -68,7 +68,7 @@ void godot_icall_Callable_CallDeferred(GDMonoMarshal::M_Callable *p_callable, Mo
args.set(i, &arg_store.get(i));
}
- callable.call_deferred(args.ptr(), argc);
+ callable.call_deferredp(args.ptr(), argc);
}
void godot_register_callable_icalls() {
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 3b6fd25d71..51f11ab18a 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -262,7 +262,7 @@ enum {
offsetof(Vector4, z) == (sizeof(real_t) * 2) &&
offsetof(Vector4, w) == (sizeof(real_t) * 3)),
- MATCHES_Vector4i = (MATCHES_int && (sizeof(Vector4i) == (sizeof(int32_t) * 4i)) &&
+ MATCHES_Vector4i = (MATCHES_int && (sizeof(Vector4i) == (sizeof(int32_t) * 4)) &&
offsetof(Vector4i, x) == (sizeof(int32_t) * 0) &&
offsetof(Vector4i, y) == (sizeof(int32_t) * 1) &&
offsetof(Vector4i, z) == (sizeof(int32_t) * 2) &&
diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp
index 618e1b58e0..437c4ca54a 100644
--- a/modules/mono/signal_awaiter_utils.cpp
+++ b/modules/mono/signal_awaiter_utils.cpp
@@ -44,7 +44,7 @@ Error gd_mono_connect_signal_awaiter(Object *p_source, const StringName &p_signa
SignalAwaiterCallable *awaiter_callable = memnew(SignalAwaiterCallable(p_target, p_awaiter, p_signal));
Callable callable = Callable(awaiter_callable);
- return p_source->connect(p_signal, callable, Vector<Variant>(), Object::CONNECT_ONESHOT);
+ return p_source->connect(p_signal, callable, Object::CONNECT_ONESHOT);
}
bool SignalAwaiterCallable::compare_equal(const CallableCustom *p_a, const CallableCustom *p_b) {
diff --git a/modules/msdfgen/SCsub b/modules/msdfgen/SCsub
index 227369f4bd..0c269bc7f4 100644
--- a/modules/msdfgen/SCsub
+++ b/modules/msdfgen/SCsub
@@ -36,7 +36,7 @@ if env["builtin_msdfgen"]:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env_msdfgen.Append(CPPPATH=["#thirdparty/freetype/include", "#thirdparty/msdfgen", "#thirdparty/nanosvg"])
+ env_msdfgen.Prepend(CPPPATH=["#thirdparty/freetype/include", "#thirdparty/msdfgen", "#thirdparty/nanosvg"])
lib = env_msdfgen.add_library("msdfgen_builtin", thirdparty_sources)
thirdparty_obj += lib
diff --git a/modules/multiplayer/SCsub b/modules/multiplayer/SCsub
new file mode 100644
index 0000000000..ff33655537
--- /dev/null
+++ b/modules/multiplayer/SCsub
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+Import("env")
+Import("env_modules")
+
+env_mp = env_modules.Clone()
+
+module_obj = []
+env_mp.add_source_files(module_obj, "*.cpp")
+
+if env["tools"]:
+ env_mp.add_source_files(module_obj, "editor/*.cpp")
+
+env.modules_sources += module_obj
diff --git a/modules/multiplayer/config.py b/modules/multiplayer/config.py
new file mode 100644
index 0000000000..414bf0afcf
--- /dev/null
+++ b/modules/multiplayer/config.py
@@ -0,0 +1,19 @@
+def can_build(env, platform):
+ return True
+
+
+def configure(env):
+ pass
+
+
+def get_doc_classes():
+ return [
+ "SceneReplicationConfig",
+ "SceneMultiplayer",
+ "MultiplayerSpawner",
+ "MultiplayerSynchronizer",
+ ]
+
+
+def get_doc_path():
+ return "doc_classes"
diff --git a/modules/multiplayer/doc_classes/MultiplayerSpawner.xml b/modules/multiplayer/doc_classes/MultiplayerSpawner.xml
new file mode 100644
index 0000000000..881796ed26
--- /dev/null
+++ b/modules/multiplayer/doc_classes/MultiplayerSpawner.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+ <brief_description>
+ Automatically replicates spawnable nodes from the authority to other multiplayer peers.
+ </brief_description>
+ <description>
+ Spawnable scenes can be configured in the editor or through code (see [method add_spawnable_scene]).
+ Also supports custom node spawns through [method spawn], calling [method _spawn_custom] on all peers.
+
+ Internally, [MultiplayerSpawner] uses [method MultiplayerAPI.object_configuration_add] to notify spawns passing the spawned node as the [code]object[/code] and itself as the [code]configuration[/code], and [method MultiplayerAPI.object_configuration_remove] to notify despawns in a similar way.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_spawn_custom" qualifiers="virtual">
+ <return type="Node" />
+ <argument index="0" name="data" type="Variant" />
+ <description>
+ Method called on all peers when a custom spawn was requested by the authority using [method spawn]. Should return a [Node] that is not in the scene tree.
+
+ [b]Note:[/b] Spawned nodes should [b]not[/b] be added to the scene with `add_child`. This is done automatically.
+ </description>
+ </method>
+ <method name="add_spawnable_scene">
+ <return type="void" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by [member spawn_path].
+ </description>
+ </method>
+ <method name="clear_spawnable_scenes">
+ <return type="void" />
+ <description>
+ Clears all spawnable scenes. Does not despawn existing instances on remote peers.
+ </description>
+ </method>
+ <method name="get_spawnable_scene" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the spawnable scene path by index.
+ </description>
+ </method>
+ <method name="get_spawnable_scene_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the count of spawnable scene paths.
+ </description>
+ </method>
+ <method name="spawn">
+ <return type="Node" />
+ <argument index="0" name="data" type="Variant" default="null" />
+ <description>
+ Requests a custom spawn, with [code]data[/code] passed to [method _spawn_custom] on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by [member spawn_path].
+
+ [b]Note:[/b] Spawnable scenes are spawned automatically. [method spawn] is only needed for custom spawns.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
+ Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns.
+
+ When set to [code]0[/code] (the default), there is no limit.
+ </member>
+ <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
+ Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers.
+ </member>
+ </members>
+ <signals>
+ <signal name="despawned">
+ <argument index="0" name="node" type="Node" />
+ <description>
+ Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets.
+ </description>
+ </signal>
+ <signal name="spawned">
+ <argument index="0" name="node" type="Node" />
+ <description>
+ Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets.
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/modules/multiplayer/doc_classes/MultiplayerSynchronizer.xml b/modules/multiplayer/doc_classes/MultiplayerSynchronizer.xml
new file mode 100644
index 0000000000..a2ea64061c
--- /dev/null
+++ b/modules/multiplayer/doc_classes/MultiplayerSynchronizer.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerSynchronizer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+ <brief_description>
+ Synchronizes properties from the multiplayer authority to the remote peers.
+ </brief_description>
+ <description>
+ By default, [MultiplayerSynchronizer] synchronizes configured properties to all peers.
+ Visiblity can be handled directly with [method set_visibility_for] or as-needed with [method add_visibility_filter] and [method update_visibility].
+
+ [MultiplayerSpawner]s will handle nodes according to visibility of synchronizers as long as the node at [member root_path] was spawned by one.
+
+ Internally, [MultiplayerSynchronizer] uses [method MultiplayerAPI.object_configuration_add] to notify synchronization start passing the [Node] at [member root_path] as the [code]object[/code] and itself as the [code]configuration[/code], and uses [method MultiplayerAPI.object_configuration_remove] to notify synchronization end in a similar way.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_visibility_filter">
+ <return type="void" />
+ <argument index="0" name="filter" type="Callable" />
+ <description>
+ Adds a peer visibility filter for this synchronizer.
+
+ [code]filter[/code] should take a peer id [int] and return a [bool].
+ </description>
+ </method>
+ <method name="get_visibility_for" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="peer" type="int" />
+ <description>
+ Queries the current visibility for peer [code]peer[/code].
+ </description>
+ </method>
+ <method name="remove_visibility_filter">
+ <return type="void" />
+ <argument index="0" name="filter" type="Callable" />
+ <description>
+ Removes a peer visiblity filter from this synchronizer.
+ </description>
+ </method>
+ <method name="set_visibility_for">
+ <return type="void" />
+ <argument index="0" name="peer" type="int" />
+ <argument index="1" name="visible" type="bool" />
+ <description>
+ Sets the visibility of [code]peer[/code] to [code]visible[/code]. If [code]peer[/code] is [code]0[/code], the value of [member public_visibility] will be updated instead.
+ </description>
+ </method>
+ <method name="update_visibility">
+ <return type="void" />
+ <argument index="0" name="for_peer" type="int" default="0" />
+ <description>
+ Updates the visibility of [code]peer[/code] according to visibility filters. If [code]peer[/code] is [code]0[/code] (the default), all peers' visibilties are updated.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="public_visibility" type="bool" setter="set_visibility_public" getter="is_visibility_public" default="true">
+ Whether synchronization should be visible to all peers by default. See [method set_visibility_for] and [method add_visibility_filter] for ways of configuring fine-grained visibility options.
+ </member>
+ <member name="replication_config" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config">
+ Resource containing which properties to synchronize.
+ </member>
+ <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0">
+ Time interval between synchronizes. When set to [code]0.0[/code] (the default), synchronizes happen every network process frame.
+ </member>
+ <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;..&quot;)">
+ Node path that replicated properties are relative to.
+ If [member root_path] was spawned by a [MultiplayerSpawner], the node will be also be spawned and despawned based on this synchronizer visibility options.
+ </member>
+ <member name="visibility_update_mode" type="int" setter="set_visibility_update_mode" getter="get_visibility_update_mode" enum="MultiplayerSynchronizer.VisibilityUpdateMode" default="0">
+ Specifies when visibility filters are updated (see [enum VisibilityUpdateMode] for options).
+ </member>
+ </members>
+ <signals>
+ <signal name="visibility_changed">
+ <argument index="0" name="for_peer" type="int" />
+ <description>
+ Emitted when visibility of [code]for_peer[/code] is updated. See [method update_visibility].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="VISIBILITY_PROCESS_IDLE" value="0" enum="VisibilityUpdateMode">
+ Visibility filters are updated every idle process frame.
+ </constant>
+ <constant name="VISIBILITY_PROCESS_PHYSICS" value="1" enum="VisibilityUpdateMode">
+ Visibility filters are updated every physics process frame.
+ </constant>
+ <constant name="VISIBILITY_PROCESS_NONE" value="2" enum="VisibilityUpdateMode">
+ Visibility filters are not updated automatically, and must be updated manually by calling [method update_visibility].
+ </constant>
+ </constants>
+</class>
diff --git a/modules/multiplayer/doc_classes/SceneMultiplayer.xml b/modules/multiplayer/doc_classes/SceneMultiplayer.xml
new file mode 100644
index 0000000000..0c3ed2d784
--- /dev/null
+++ b/modules/multiplayer/doc_classes/SceneMultiplayer.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SceneMultiplayer" inherits="MultiplayerAPI" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+ <brief_description>
+ High-level multiplayer API implementation.
+ </brief_description>
+ <description>
+ This class is the default implementation of [MultiplayerAPI], used to provide multiplayer functionalities in Godot Engine.
+ This implementation supports RPCs via [method Node.rpc] and [method Node.rpc_id] and requires [method MultiplayerAPI.rpc] to be passed a [Node] (it will fail for other object types).
+ This implementation additionally provide [SceneTree] replication via the [MultiplayerSpawner] and [MultiplayerSynchronizer] nodes, and the [SceneReplicationConfig] resource.
+ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing).
+ </description>
+ </method>
+ <method name="send_bytes">
+ <return type="int" enum="Error" />
+ <argument index="0" name="bytes" type="PackedByteArray" />
+ <argument index="1" name="id" type="int" default="0" />
+ <argument index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
+ <argument index="3" name="channel" type="int" default="0" />
+ <description>
+ Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
+ If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs.
+ [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution.
+ </member>
+ <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
+ If [code]true[/code], the MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] refuses new incoming connections.
+ </member>
+ <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
+ The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
+ This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
+ </member>
+ </members>
+ <signals>
+ <signal name="peer_packet">
+ <argument index="0" name="id" type="int" />
+ <argument index="1" name="packet" type="PackedByteArray" />
+ <description>
+ Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/SceneReplicationConfig.xml b/modules/multiplayer/doc_classes/SceneReplicationConfig.xml
index 62c108a477..fc91592c7a 100644
--- a/doc/classes/SceneReplicationConfig.xml
+++ b/modules/multiplayer/doc_classes/SceneReplicationConfig.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneReplicationConfig" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SceneReplicationConfig" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
+ Configuration for properties to synchronize with a [MultiplayerSynchronizer].
</brief_description>
<description>
</description>
@@ -12,35 +13,41 @@
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="index" type="int" default="-1" />
<description>
+ Adds the property identified by the given [code]path[/code] to the list of the properties being synchronized, optionally passing an [code]index[/code].
</description>
</method>
<method name="get_properties" qualifiers="const">
<return type="NodePath[]" />
<description>
+ Returns a list of synchronized property [NodePath]s.
</description>
</method>
<method name="has_property" qualifiers="const">
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
+ Returns whether the given [code]path[/code] is configured for synchronization.
</description>
</method>
<method name="property_get_index" qualifiers="const">
<return type="int" />
<argument index="0" name="path" type="NodePath" />
<description>
+ Finds the index of the given [code]path[/code].
</description>
</method>
<method name="property_get_spawn">
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
+ Returns whether the property identified by the given [code]path[/code] is configured to be synchronized on spawn.
</description>
</method>
<method name="property_get_sync">
<return type="bool" />
<argument index="0" name="path" type="NodePath" />
<description>
+ Returns whether the property identified by the given [code]path[/code] is configured to be synchronized on process.
</description>
</method>
<method name="property_set_spawn">
@@ -48,6 +55,7 @@
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="enabled" type="bool" />
<description>
+ Sets whether the property identified by the given [code]path[/code] is configured to be synchronized on spawn.
</description>
</method>
<method name="property_set_sync">
@@ -55,12 +63,14 @@
<argument index="0" name="path" type="NodePath" />
<argument index="1" name="enabled" type="bool" />
<description>
+ Sets whether the property identified by the given [code]path[/code] is configured to be synchronized on process.
</description>
</method>
<method name="remove_property">
<return type="void" />
<argument index="0" name="path" type="NodePath" />
<description>
+ Removes the property identified by the given [code]path[/code] from the configuration.
</description>
</method>
</methods>
diff --git a/editor/plugins/replication_editor_plugin.cpp b/modules/multiplayer/editor/replication_editor_plugin.cpp
index 3e06a6739f..c6484264d0 100644
--- a/editor/plugins/replication_editor_plugin.cpp
+++ b/modules/multiplayer/editor/replication_editor_plugin.cpp
@@ -33,9 +33,9 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/inspector_dock.h"
+#include "modules/multiplayer/multiplayer_synchronizer.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
-#include "scene/multiplayer/multiplayer_synchronizer.h"
void ReplicationEditor::_pick_node_filter_text_changed(const String &p_newtext) {
TreeItem *root_item = pick_node->get_scene_tree()->get_scene_tree()->get_root();
@@ -166,8 +166,8 @@ ReplicationEditor::ReplicationEditor() {
set_custom_minimum_size(Size2(0, 200) * EDSCALE);
delete_dialog = memnew(ConfirmationDialog);
- delete_dialog->connect("cancelled", callable_mp(this, &ReplicationEditor::_dialog_closed), varray(false));
- delete_dialog->connect("confirmed", callable_mp(this, &ReplicationEditor::_dialog_closed), varray(true));
+ delete_dialog->connect("cancelled", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(false));
+ delete_dialog->connect("confirmed", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(true));
add_child(delete_dialog);
error_dialog = memnew(AcceptDialog);
diff --git a/editor/plugins/replication_editor_plugin.h b/modules/multiplayer/editor/replication_editor_plugin.h
index df3d97f884..0bb2cb888d 100644
--- a/editor/plugins/replication_editor_plugin.h
+++ b/modules/multiplayer/editor/replication_editor_plugin.h
@@ -32,12 +32,12 @@
#define REPLICATION_EDITOR_PLUGIN_H
#include "editor/editor_plugin.h"
-#include "scene/resources/scene_replication_config.h"
#include "editor/editor_spin_slider.h"
-#include "editor/property_editor.h"
#include "editor/property_selector.h"
+#include "../scene_replication_config.h"
+
class ConfirmationDialog;
class MultiplayerSynchronizer;
class Tree;
@@ -131,5 +131,17 @@ public:
ReplicationEditorPlugin();
~ReplicationEditorPlugin();
};
+#else
+class ReplicationEditorPlugin : public EditorPlugin {
+ GDCLASS(ReplicationEditorPlugin, EditorPlugin);
+
+public:
+ virtual void edit(Object *p_object) override {}
+ virtual bool handles(Object *p_object) const override { return false; }
+ virtual void make_visible(bool p_visible) override {}
+
+ ReplicationEditorPlugin() {}
+ ~ReplicationEditorPlugin() {}
+};
#endif // REPLICATION_EDITOR_PLUGIN_H
diff --git a/scene/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp
index 8363d05e54..e8f3aecc69 100644
--- a/scene/multiplayer/multiplayer_spawner.cpp
+++ b/modules/multiplayer/multiplayer_spawner.cpp
@@ -31,7 +31,7 @@
#include "multiplayer_spawner.h"
#include "core/io/marshalls.h"
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
@@ -126,7 +126,7 @@ void MultiplayerSpawner::_set_spawnable_scenes(const Vector<String> &p_scenes) {
void MultiplayerSpawner::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_spawnable_scene", "path"), &MultiplayerSpawner::add_spawnable_scene);
ClassDB::bind_method(D_METHOD("get_spawnable_scene_count"), &MultiplayerSpawner::get_spawnable_scene_count);
- ClassDB::bind_method(D_METHOD("get_spawnable_scene", "path"), &MultiplayerSpawner::get_spawnable_scene);
+ ClassDB::bind_method(D_METHOD("get_spawnable_scene", "index"), &MultiplayerSpawner::get_spawnable_scene);
ClassDB::bind_method(D_METHOD("clear_spawnable_scenes"), &MultiplayerSpawner::clear_spawnable_scenes);
ClassDB::bind_method(D_METHOD("_get_spawnable_scenes"), &MultiplayerSpawner::_get_spawnable_scenes);
@@ -146,8 +146,8 @@ void MultiplayerSpawner::_bind_methods() {
GDVIRTUAL_BIND(_spawn_custom, "data");
- ADD_SIGNAL(MethodInfo("despawned", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
- ADD_SIGNAL(MethodInfo("spawned", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("despawned", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("spawned", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
}
void MultiplayerSpawner::_update_spawn_node() {
@@ -190,7 +190,7 @@ void MultiplayerSpawner::_notification(int p_what) {
if (node->is_connected(SceneStringNames::get_singleton()->ready, callable_mp(this, &MultiplayerSpawner::_node_ready))) {
node->disconnect(SceneStringNames::get_singleton()->ready, callable_mp(this, &MultiplayerSpawner::_node_ready));
}
- get_multiplayer()->despawn(node, this);
+ get_multiplayer()->object_configuration_remove(node, this);
}
tracked_nodes.clear();
} break;
@@ -230,13 +230,13 @@ void MultiplayerSpawner::_track(Node *p_node, const Variant &p_argument, int p_s
ObjectID oid = p_node->get_instance_id();
if (!tracked_nodes.has(oid)) {
tracked_nodes[oid] = SpawnInfo(p_argument.duplicate(true), p_scene_id);
- p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &MultiplayerSpawner::_node_exit), varray(p_node->get_instance_id()), CONNECT_ONESHOT);
- p_node->connect(SceneStringNames::get_singleton()->ready, callable_mp(this, &MultiplayerSpawner::_node_ready), varray(p_node->get_instance_id()), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &MultiplayerSpawner::_node_exit).bind(p_node->get_instance_id()), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->ready, callable_mp(this, &MultiplayerSpawner::_node_ready).bind(p_node->get_instance_id()), CONNECT_ONESHOT);
}
}
void MultiplayerSpawner::_node_ready(ObjectID p_id) {
- get_multiplayer()->spawn(ObjectDB::get_instance(p_id), this);
+ get_multiplayer()->object_configuration_add(ObjectDB::get_instance(p_id), this);
}
void MultiplayerSpawner::_node_exit(ObjectID p_id) {
@@ -244,7 +244,7 @@ void MultiplayerSpawner::_node_exit(ObjectID p_id) {
ERR_FAIL_COND(!node);
if (tracked_nodes.has(p_id)) {
tracked_nodes.erase(p_id);
- get_multiplayer()->despawn(node, this);
+ get_multiplayer()->object_configuration_remove(node, this);
}
}
@@ -277,12 +277,11 @@ Node *MultiplayerSpawner::instantiate_scene(int p_id) {
Node *MultiplayerSpawner::instantiate_custom(const Variant &p_data) {
ERR_FAIL_COND_V_MSG(spawn_limit && spawn_limit <= tracked_nodes.size(), nullptr, "Spawn limit reached!");
- Object *obj = nullptr;
Node *node = nullptr;
- if (GDVIRTUAL_CALL(_spawn_custom, p_data, obj)) {
- node = Object::cast_to<Node>(obj);
+ if (GDVIRTUAL_CALL(_spawn_custom, p_data, node)) {
+ return node;
}
- return node;
+ ERR_FAIL_V_MSG(nullptr, "Method '_spawn_custom' is not implemented on this peer.");
}
Node *MultiplayerSpawner::spawn(const Variant &p_data) {
diff --git a/scene/multiplayer/multiplayer_spawner.h b/modules/multiplayer/multiplayer_spawner.h
index 2c0eb9a2f0..fc3befc2d4 100644
--- a/scene/multiplayer/multiplayer_spawner.h
+++ b/modules/multiplayer/multiplayer_spawner.h
@@ -36,7 +36,8 @@
#include "core/templates/local_vector.h"
#include "core/variant/typed_array.h"
#include "scene/resources/packed_scene.h"
-#include "scene/resources/scene_replication_config.h"
+
+#include "scene_replication_config.h"
class MultiplayerSpawner : public Node {
GDCLASS(MultiplayerSpawner, Node);
@@ -90,7 +91,9 @@ protected:
void _get_property_list(List<PropertyInfo> *p_list) const;
#endif
public:
- Node *get_spawn_node() const { return spawn_node.is_valid() ? Object::cast_to<Node>(ObjectDB::get_instance(spawn_node)) : nullptr; }
+ Node *get_spawn_node() const {
+ return spawn_node.is_valid() ? Object::cast_to<Node>(ObjectDB::get_instance(spawn_node)) : nullptr;
+ }
void add_spawnable_scene(const String &p_path);
int get_spawnable_scene_count() const;
@@ -109,7 +112,7 @@ public:
Node *instantiate_custom(const Variant &p_data);
Node *instantiate_scene(int p_idx);
- GDVIRTUAL1R(Object *, _spawn_custom, const Variant &);
+ GDVIRTUAL1R(Node *, _spawn_custom, const Variant &);
MultiplayerSpawner() {}
};
diff --git a/scene/multiplayer/multiplayer_synchronizer.cpp b/modules/multiplayer/multiplayer_synchronizer.cpp
index e1b7433968..eee1495c14 100644
--- a/scene/multiplayer/multiplayer_synchronizer.cpp
+++ b/modules/multiplayer/multiplayer_synchronizer.cpp
@@ -31,7 +31,7 @@
#include "multiplayer_synchronizer.h"
#include "core/config/engine.h"
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
Object *MultiplayerSynchronizer::_get_prop_target(Object *p_obj, const NodePath &p_path) {
if (p_path.get_name_count() == 0) {
@@ -50,7 +50,7 @@ void MultiplayerSynchronizer::_stop() {
#endif
Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr;
if (node) {
- get_multiplayer()->replication_stop(node, this);
+ get_multiplayer()->object_configuration_remove(node, this);
}
}
@@ -62,7 +62,7 @@ void MultiplayerSynchronizer::_start() {
#endif
Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr;
if (node) {
- get_multiplayer()->replication_start(node, this);
+ get_multiplayer()->object_configuration_add(node, this);
_update_process();
}
}
@@ -138,7 +138,7 @@ bool MultiplayerSynchronizer::is_visible_to(int p_peer) {
for (Callable filter : visibility_filters) {
Variant ret;
Callable::CallError err;
- filter.call(argv, 1, ret, err);
+ filter.callp(argv, 1, ret, err);
ERR_FAIL_COND_V(err.error != Callable::CallError::CALL_OK || ret.get_type() != Variant::BOOL, false);
if (!ret.operator bool()) {
return false;
@@ -293,9 +293,9 @@ void MultiplayerSynchronizer::set_multiplayer_authority(int p_peer_id, bool p_re
Node::set_multiplayer_authority(p_peer_id, p_recursive);
return;
}
- get_multiplayer()->replication_stop(node, this);
+ get_multiplayer()->object_configuration_remove(node, this);
Node::set_multiplayer_authority(p_peer_id, p_recursive);
- get_multiplayer()->replication_start(node, this);
+ get_multiplayer()->object_configuration_add(node, this);
}
MultiplayerSynchronizer::MultiplayerSynchronizer() {
diff --git a/scene/multiplayer/multiplayer_synchronizer.h b/modules/multiplayer/multiplayer_synchronizer.h
index 77c23b336d..e84d41db86 100644
--- a/scene/multiplayer/multiplayer_synchronizer.h
+++ b/modules/multiplayer/multiplayer_synchronizer.h
@@ -33,7 +33,7 @@
#include "scene/main/node.h"
-#include "scene/resources/scene_replication_config.h"
+#include "scene_replication_config.h"
class MultiplayerSynchronizer : public Node {
GDCLASS(MultiplayerSynchronizer, Node);
diff --git a/modules/multiplayer/register_types.cpp b/modules/multiplayer/register_types.cpp
new file mode 100644
index 0000000000..a2c524da80
--- /dev/null
+++ b/modules/multiplayer/register_types.cpp
@@ -0,0 +1,60 @@
+/*************************************************************************/
+/* register_types.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 "register_types.h"
+
+#include "multiplayer_spawner.h"
+#include "multiplayer_synchronizer.h"
+#include "scene_multiplayer.h"
+#include "scene_replication_interface.h"
+#include "scene_rpc_interface.h"
+
+#ifdef TOOLS_ENABLED
+#include "editor/editor_plugin.h"
+#include "editor/replication_editor_plugin.h"
+#endif
+
+void initialize_multiplayer_module(ModuleInitializationLevel p_level) {
+ if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
+ GDREGISTER_CLASS(SceneReplicationConfig);
+ GDREGISTER_CLASS(MultiplayerSpawner);
+ GDREGISTER_CLASS(MultiplayerSynchronizer);
+ GDREGISTER_CLASS(SceneMultiplayer);
+ MultiplayerAPI::set_default_interface("SceneMultiplayer");
+ }
+#ifdef TOOLS_ENABLED
+ if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
+ EditorPlugins::add_by_type<ReplicationEditorPlugin>();
+ }
+#endif
+}
+
+void uninitialize_multiplayer_module(ModuleInitializationLevel p_level) {
+}
diff --git a/modules/multiplayer/register_types.h b/modules/multiplayer/register_types.h
new file mode 100644
index 0000000000..aca6cf46ed
--- /dev/null
+++ b/modules/multiplayer/register_types.h
@@ -0,0 +1,39 @@
+/*************************************************************************/
+/* register_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. */
+/*************************************************************************/
+
+#ifndef MULTIPLAYER_REGISTER_TYPES_H
+#define MULTIPLAYER_REGISTER_TYPES_H
+
+#include "modules/register_module_types.h"
+
+void initialize_multiplayer_module(ModuleInitializationLevel p_level);
+void uninitialize_multiplayer_module(ModuleInitializationLevel p_level);
+
+#endif // MULTIPLAYER_REGISTER_TYPES_H
diff --git a/scene/multiplayer/scene_cache_interface.cpp b/modules/multiplayer/scene_cache_interface.cpp
index 79a7dc2d5a..b3b642f815 100644
--- a/scene/multiplayer/scene_cache_interface.cpp
+++ b/modules/multiplayer/scene_cache_interface.cpp
@@ -34,13 +34,7 @@
#include "scene/main/node.h"
#include "scene/main/window.h"
-MultiplayerCacheInterface *SceneCacheInterface::_create(MultiplayerAPI *p_multiplayer) {
- return memnew(SceneCacheInterface(p_multiplayer));
-}
-
-void SceneCacheInterface::make_default() {
- MultiplayerAPI::create_default_cache_interface = _create;
-}
+#include "scene_multiplayer.h"
void SceneCacheInterface::on_peer_change(int p_id, bool p_connected) {
if (p_connected) {
@@ -98,7 +92,7 @@ void SceneCacheInterface::process_simplify_path(int p_from, const uint8_t *p_pac
Vector<uint8_t> packet;
packet.resize(1 + 1 + len);
- packet.write[0] = MultiplayerAPI::NETWORK_COMMAND_CONFIRM_PATH;
+ packet.write[0] = SceneMultiplayer::NETWORK_COMMAND_CONFIRM_PATH;
packet.write[1] = valid_rpc_checksum;
encode_cstring(pname.get_data(), &packet.write[2]);
@@ -110,7 +104,7 @@ void SceneCacheInterface::process_simplify_path(int p_from, const uint8_t *p_pac
#endif
multiplayer_peer->set_transfer_channel(0);
- multiplayer_peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ multiplayer_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
multiplayer_peer->set_target_peer(p_from);
multiplayer_peer->put_packet(packet.ptr(), packet.size());
}
@@ -150,7 +144,7 @@ Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, Pat
packet.resize(1 + 4 + path_len + methods_md5_len);
int ofs = 0;
- packet.write[ofs] = MultiplayerAPI::NETWORK_COMMAND_SIMPLIFY_PATH;
+ packet.write[ofs] = SceneMultiplayer::NETWORK_COMMAND_SIMPLIFY_PATH;
ofs += 1;
ofs += encode_cstring(methods_md5.utf8().get_data(), &packet.write[ofs]);
@@ -170,7 +164,7 @@ Error SceneCacheInterface::_send_confirm_path(Node *p_node, NodePath p_path, Pat
for (int peer_id : p_peers) {
multiplayer_peer->set_target_peer(peer_id);
multiplayer_peer->set_transfer_channel(0);
- multiplayer_peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ multiplayer_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
err = multiplayer_peer->put_packet(packet.ptr(), packet.size());
ERR_FAIL_COND_V(err != OK, err);
// Insert into confirmed, but as false since it was not confirmed.
@@ -229,9 +223,6 @@ bool SceneCacheInterface::send_object_cache(Object *p_obj, int p_peer_id, int &r
if (p_peer_id < 0 && E == -p_peer_id) {
continue; // Continue, excluded.
}
- if (p_peer_id > 0 && E != p_peer_id) {
- continue; // Continue, not for this peer.
- }
HashMap<int, bool>::Iterator F = psc->confirmed_peers.find(E);
if (!F) {
diff --git a/scene/multiplayer/scene_cache_interface.h b/modules/multiplayer/scene_cache_interface.h
index 6bfd683cf4..1e80792fe7 100644
--- a/scene/multiplayer/scene_cache_interface.h
+++ b/modules/multiplayer/scene_cache_interface.h
@@ -31,13 +31,15 @@
#ifndef SCENE_CACHE_INTERFACE_H
#define SCENE_CACHE_INTERFACE_H
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
-class SceneCacheInterface : public MultiplayerCacheInterface {
- GDCLASS(SceneCacheInterface, MultiplayerCacheInterface);
+class SceneMultiplayer;
+
+class SceneCacheInterface : public RefCounted {
+ GDCLASS(SceneCacheInterface, RefCounted);
private:
- MultiplayerAPI *multiplayer = nullptr;
+ SceneMultiplayer *multiplayer = nullptr;
//path sent caches
struct PathSentCache {
@@ -61,23 +63,20 @@ private:
protected:
Error _send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, const List<int> &p_peers);
- static MultiplayerCacheInterface *_create(MultiplayerAPI *p_multiplayer);
public:
- static void make_default();
-
- virtual void clear() override;
- virtual void on_peer_change(int p_id, bool p_connected) override;
- virtual void process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len) override;
- virtual void process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len) override;
+ void clear();
+ void on_peer_change(int p_id, bool p_connected);
+ void process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len);
+ void process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len);
// Returns true if all peers have cached path.
- virtual bool send_object_cache(Object *p_obj, int p_target, int &p_id) override;
- virtual int make_object_cache(Object *p_obj) override;
- virtual Object *get_cached_object(int p_from, uint32_t p_cache_id) override;
- virtual bool is_cache_confirmed(NodePath p_path, int p_peer) override;
+ bool send_object_cache(Object *p_obj, int p_target, int &p_id);
+ int make_object_cache(Object *p_obj);
+ Object *get_cached_object(int p_from, uint32_t p_cache_id);
+ bool is_cache_confirmed(NodePath p_path, int p_peer);
- SceneCacheInterface(MultiplayerAPI *p_multiplayer) { multiplayer = p_multiplayer; }
+ SceneCacheInterface(SceneMultiplayer *p_multiplayer) { multiplayer = p_multiplayer; }
};
#endif // SCENE_CACHE_INTERFACE_H
diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp
new file mode 100644
index 0000000000..3fc1eef366
--- /dev/null
+++ b/modules/multiplayer/scene_multiplayer.cpp
@@ -0,0 +1,332 @@
+/*************************************************************************/
+/* scene_multiplayer.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 "scene_multiplayer.h"
+
+#include "core/debugger/engine_debugger.h"
+#include "core/io/marshalls.h"
+
+#include <stdint.h>
+
+#ifdef DEBUG_ENABLED
+#include "core/os/os.h"
+#endif
+
+#ifdef DEBUG_ENABLED
+void SceneMultiplayer::profile_bandwidth(const String &p_inout, int p_size) {
+ if (EngineDebugger::is_profiling("multiplayer")) {
+ Array values;
+ values.push_back(p_inout);
+ values.push_back(OS::get_singleton()->get_ticks_msec());
+ values.push_back(p_size);
+ EngineDebugger::profiler_add_frame_data("multiplayer", values);
+ }
+}
+#endif
+
+Error SceneMultiplayer::poll() {
+ if (!multiplayer_peer.is_valid() || multiplayer_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED) {
+ return ERR_UNCONFIGURED;
+ }
+
+ multiplayer_peer->poll();
+
+ if (!multiplayer_peer.is_valid()) { // It's possible that polling might have resulted in a disconnection, so check here.
+ return OK;
+ }
+
+ while (multiplayer_peer->get_available_packet_count()) {
+ int sender = multiplayer_peer->get_packet_peer();
+ const uint8_t *packet;
+ int len;
+
+ Error err = multiplayer_peer->get_packet(&packet, len);
+ ERR_FAIL_COND_V_MSG(err != OK, err, vformat("Error getting packet! %d", err));
+
+ remote_sender_id = sender;
+ _process_packet(sender, packet, len);
+ remote_sender_id = 0;
+
+ if (!multiplayer_peer.is_valid()) {
+ return OK; // It's also possible that a packet or RPC caused a disconnection, so also check here.
+ }
+ }
+ replicator->on_network_process();
+ return OK;
+}
+
+void SceneMultiplayer::clear() {
+ connected_peers.clear();
+ packet_cache.clear();
+ cache->clear();
+}
+
+void SceneMultiplayer::set_root_path(const NodePath &p_path) {
+ ERR_FAIL_COND_MSG(!p_path.is_absolute() && !p_path.is_empty(), "SceneMultiplayer root path must be absolute.");
+ root_path = p_path;
+}
+
+NodePath SceneMultiplayer::get_root_path() const {
+ return root_path;
+}
+
+void SceneMultiplayer::set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) {
+ if (p_peer == multiplayer_peer) {
+ return; // Nothing to do
+ }
+
+ ERR_FAIL_COND_MSG(p_peer.is_valid() && p_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED,
+ "Supplied MultiplayerPeer must be connecting or connected.");
+
+ if (multiplayer_peer.is_valid()) {
+ multiplayer_peer->disconnect("peer_connected", callable_mp(this, &SceneMultiplayer::_add_peer));
+ multiplayer_peer->disconnect("peer_disconnected", callable_mp(this, &SceneMultiplayer::_del_peer));
+ multiplayer_peer->disconnect("connection_succeeded", callable_mp(this, &SceneMultiplayer::_connected_to_server));
+ multiplayer_peer->disconnect("connection_failed", callable_mp(this, &SceneMultiplayer::_connection_failed));
+ multiplayer_peer->disconnect("server_disconnected", callable_mp(this, &SceneMultiplayer::_server_disconnected));
+ clear();
+ }
+
+ multiplayer_peer = p_peer;
+
+ if (multiplayer_peer.is_valid()) {
+ multiplayer_peer->connect("peer_connected", callable_mp(this, &SceneMultiplayer::_add_peer));
+ multiplayer_peer->connect("peer_disconnected", callable_mp(this, &SceneMultiplayer::_del_peer));
+ multiplayer_peer->connect("connection_succeeded", callable_mp(this, &SceneMultiplayer::_connected_to_server));
+ multiplayer_peer->connect("connection_failed", callable_mp(this, &SceneMultiplayer::_connection_failed));
+ multiplayer_peer->connect("server_disconnected", callable_mp(this, &SceneMultiplayer::_server_disconnected));
+ }
+ replicator->on_reset();
+}
+
+Ref<MultiplayerPeer> SceneMultiplayer::get_multiplayer_peer() {
+ return multiplayer_peer;
+}
+
+void SceneMultiplayer::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(root_path.is_empty(), "Multiplayer root was not initialized. If you are using custom multiplayer, remember to set the root path via SceneMultiplayer.set_root_path before using it.");
+ ERR_FAIL_COND_MSG(p_packet_len < 1, "Invalid packet received. Size too small.");
+
+#ifdef DEBUG_ENABLED
+ profile_bandwidth("in", p_packet_len);
+#endif
+
+ // Extract the `packet_type` from the LSB three bits:
+ uint8_t packet_type = p_packet[0] & CMD_MASK;
+
+ switch (packet_type) {
+ case NETWORK_COMMAND_SIMPLIFY_PATH: {
+ cache->process_simplify_path(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_CONFIRM_PATH: {
+ cache->process_confirm_path(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_REMOTE_CALL: {
+ rpc->process_rpc(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_RAW: {
+ _process_raw(p_from, p_packet, p_packet_len);
+ } break;
+ case NETWORK_COMMAND_SPAWN: {
+ replicator->on_spawn_receive(p_from, p_packet, p_packet_len);
+ } break;
+ case NETWORK_COMMAND_DESPAWN: {
+ replicator->on_despawn_receive(p_from, p_packet, p_packet_len);
+ } break;
+ case NETWORK_COMMAND_SYNC: {
+ replicator->on_sync_receive(p_from, p_packet, p_packet_len);
+ } break;
+ }
+}
+
+void SceneMultiplayer::_add_peer(int p_id) {
+ connected_peers.insert(p_id);
+ cache->on_peer_change(p_id, true);
+ replicator->on_peer_change(p_id, true);
+ emit_signal(SNAME("peer_connected"), p_id);
+}
+
+void SceneMultiplayer::_del_peer(int p_id) {
+ replicator->on_peer_change(p_id, false);
+ cache->on_peer_change(p_id, false);
+ connected_peers.erase(p_id);
+ emit_signal(SNAME("peer_disconnected"), p_id);
+}
+
+void SceneMultiplayer::_connected_to_server() {
+ emit_signal(SNAME("connected_to_server"));
+}
+
+void SceneMultiplayer::_connection_failed() {
+ emit_signal(SNAME("connection_failed"));
+}
+
+void SceneMultiplayer::_server_disconnected() {
+ replicator->on_reset();
+ emit_signal(SNAME("server_disconnected"));
+}
+
+Error SceneMultiplayer::send_bytes(Vector<uint8_t> p_data, int p_to, MultiplayerPeer::TransferMode p_mode, int p_channel) {
+ ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet.");
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no multiplayer peer is active.");
+ ERR_FAIL_COND_V_MSG(multiplayer_peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a multiplayer peer which is not connected.");
+
+ if (packet_cache.size() < p_data.size() + 1) {
+ packet_cache.resize(p_data.size() + 1);
+ }
+
+ const uint8_t *r = p_data.ptr();
+ packet_cache.write[0] = NETWORK_COMMAND_RAW;
+ memcpy(&packet_cache.write[1], &r[0], p_data.size());
+
+ multiplayer_peer->set_target_peer(p_to);
+ multiplayer_peer->set_transfer_channel(p_channel);
+ multiplayer_peer->set_transfer_mode(p_mode);
+
+ return multiplayer_peer->put_packet(packet_cache.ptr(), p_data.size() + 1);
+}
+
+void SceneMultiplayer::_process_raw(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small.");
+
+ Vector<uint8_t> out;
+ int len = p_packet_len - 1;
+ out.resize(len);
+ {
+ uint8_t *w = out.ptrw();
+ memcpy(&w[0], &p_packet[1], len);
+ }
+ emit_signal(SNAME("peer_packet"), p_from, out);
+}
+
+int SceneMultiplayer::get_unique_id() {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), 0, "No multiplayer peer is assigned. Unable to get unique ID.");
+ return multiplayer_peer->get_unique_id();
+}
+
+void SceneMultiplayer::set_refuse_new_connections(bool p_refuse) {
+ ERR_FAIL_COND_MSG(!multiplayer_peer.is_valid(), "No multiplayer peer is assigned. Unable to set 'refuse_new_connections'.");
+ multiplayer_peer->set_refuse_new_connections(p_refuse);
+}
+
+bool SceneMultiplayer::is_refusing_new_connections() const {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), false, "No multiplayer peer is assigned. Unable to get 'refuse_new_connections'.");
+ return multiplayer_peer->is_refusing_new_connections();
+}
+
+Vector<int> SceneMultiplayer::get_peer_ids() {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected.");
+
+ Vector<int> ret;
+ for (const int &E : connected_peers) {
+ ret.push_back(E);
+ }
+
+ return ret;
+}
+
+void SceneMultiplayer::set_allow_object_decoding(bool p_enable) {
+ allow_object_decoding = p_enable;
+}
+
+bool SceneMultiplayer::is_object_decoding_allowed() const {
+ return allow_object_decoding;
+}
+
+String SceneMultiplayer::get_rpc_md5(const Object *p_obj) {
+ return rpc->get_rpc_md5(p_obj);
+}
+
+Error SceneMultiplayer::rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+ return rpc->rpcp(p_obj, p_peer_id, p_method, p_arg, p_argcount);
+}
+
+Error SceneMultiplayer::object_configuration_add(Object *p_obj, Variant p_config) {
+ if (p_obj == nullptr && p_config.get_type() == Variant::NODE_PATH) {
+ set_root_path(p_config);
+ return OK;
+ }
+ MultiplayerSpawner *spawner = Object::cast_to<MultiplayerSpawner>(p_config.get_validated_object());
+ MultiplayerSynchronizer *sync = Object::cast_to<MultiplayerSynchronizer>(p_config.get_validated_object());
+ if (spawner) {
+ return replicator->on_spawn(p_obj, p_config);
+ } else if (sync) {
+ return replicator->on_replication_start(p_obj, p_config);
+ }
+ return ERR_INVALID_PARAMETER;
+}
+
+Error SceneMultiplayer::object_configuration_remove(Object *p_obj, Variant p_config) {
+ if (p_obj == nullptr && p_config.get_type() == Variant::NODE_PATH) {
+ ERR_FAIL_COND_V(root_path != p_config.operator NodePath(), ERR_INVALID_PARAMETER);
+ set_root_path(NodePath());
+ return OK;
+ }
+ MultiplayerSpawner *spawner = Object::cast_to<MultiplayerSpawner>(p_config.get_validated_object());
+ MultiplayerSynchronizer *sync = Object::cast_to<MultiplayerSynchronizer>(p_config.get_validated_object());
+ if (spawner) {
+ return replicator->on_despawn(p_obj, p_config);
+ }
+ if (sync) {
+ return replicator->on_replication_stop(p_obj, p_config);
+ }
+ return ERR_INVALID_PARAMETER;
+}
+
+void SceneMultiplayer::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_root_path", "path"), &SceneMultiplayer::set_root_path);
+ ClassDB::bind_method(D_METHOD("get_root_path"), &SceneMultiplayer::get_root_path);
+ ClassDB::bind_method(D_METHOD("clear"), &SceneMultiplayer::clear);
+ ClassDB::bind_method(D_METHOD("set_refuse_new_connections", "refuse"), &SceneMultiplayer::set_refuse_new_connections);
+ ClassDB::bind_method(D_METHOD("is_refusing_new_connections"), &SceneMultiplayer::is_refusing_new_connections);
+ ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &SceneMultiplayer::set_allow_object_decoding);
+ ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &SceneMultiplayer::is_object_decoding_allowed);
+ ClassDB::bind_method(D_METHOD("send_bytes", "bytes", "id", "mode", "channel"), &SceneMultiplayer::send_bytes, DEFVAL(MultiplayerPeer::TARGET_PEER_BROADCAST), DEFVAL(MultiplayerPeer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
+
+ ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_path"), "set_root_path", "get_root_path");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_connections"), "set_refuse_new_connections", "is_refusing_new_connections");
+ ADD_PROPERTY_DEFAULT("refuse_new_connections", false);
+
+ ADD_SIGNAL(MethodInfo("peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "packet")));
+}
+
+SceneMultiplayer::SceneMultiplayer() {
+ replicator = Ref<SceneReplicationInterface>(memnew(SceneReplicationInterface(this)));
+ rpc = Ref<SceneRPCInterface>(memnew(SceneRPCInterface(this)));
+ cache = Ref<SceneCacheInterface>(memnew(SceneCacheInterface(this)));
+}
+
+SceneMultiplayer::~SceneMultiplayer() {
+ clear();
+}
diff --git a/modules/multiplayer/scene_multiplayer.h b/modules/multiplayer/scene_multiplayer.h
new file mode 100644
index 0000000000..a99cca7b21
--- /dev/null
+++ b/modules/multiplayer/scene_multiplayer.h
@@ -0,0 +1,136 @@
+/*************************************************************************/
+/* scene_multiplayer.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 SCENE_MULTIPLAYER_H
+#define SCENE_MULTIPLAYER_H
+
+#include "scene/main/multiplayer_api.h"
+
+#include "scene_cache_interface.h"
+#include "scene_replication_interface.h"
+#include "scene_rpc_interface.h"
+
+class SceneMultiplayer : public MultiplayerAPI {
+ GDCLASS(SceneMultiplayer, MultiplayerAPI);
+
+public:
+ enum NetworkCommands {
+ NETWORK_COMMAND_REMOTE_CALL = 0,
+ NETWORK_COMMAND_SIMPLIFY_PATH,
+ NETWORK_COMMAND_CONFIRM_PATH,
+ NETWORK_COMMAND_RAW,
+ NETWORK_COMMAND_SPAWN,
+ NETWORK_COMMAND_DESPAWN,
+ NETWORK_COMMAND_SYNC,
+ };
+
+ // For each command, the 4 MSB can contain custom flags, as defined by subsystems.
+ enum {
+ CMD_FLAG_0_SHIFT = 4,
+ CMD_FLAG_1_SHIFT = 5,
+ CMD_FLAG_2_SHIFT = 6,
+ CMD_FLAG_3_SHIFT = 7,
+ };
+
+ // This is the mask that will be used to extract the command.
+ enum {
+ CMD_MASK = 7, // 0x7 -> 0b00001111
+ };
+
+private:
+ Ref<MultiplayerPeer> multiplayer_peer;
+ HashSet<int> connected_peers;
+ int remote_sender_id = 0;
+ int remote_sender_override = 0;
+
+ Vector<uint8_t> packet_cache;
+
+ NodePath root_path;
+ bool allow_object_decoding = false;
+
+ Ref<SceneCacheInterface> cache;
+ Ref<SceneReplicationInterface> replicator;
+ Ref<SceneRPCInterface> rpc;
+
+protected:
+ static void _bind_methods();
+
+ void _process_packet(int p_from, const uint8_t *p_packet, int p_packet_len);
+ void _process_raw(int p_from, const uint8_t *p_packet, int p_packet_len);
+
+ void _add_peer(int p_id);
+ void _del_peer(int p_id);
+ void _connected_to_server();
+ void _connection_failed();
+ void _server_disconnected();
+
+public:
+ virtual void set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) override;
+ virtual Ref<MultiplayerPeer> get_multiplayer_peer() override;
+
+ virtual Error poll() override;
+ virtual int get_unique_id() override;
+ virtual Vector<int> get_peer_ids() override;
+ virtual int get_remote_sender_id() override { return remote_sender_override ? remote_sender_override : remote_sender_id; }
+
+ virtual Error rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) override;
+
+ virtual Error object_configuration_add(Object *p_obj, Variant p_config) override;
+ virtual Error object_configuration_remove(Object *p_obj, Variant p_config) override;
+
+ void clear();
+
+ // Usually from object_configuration_add/remove
+ void set_root_path(const NodePath &p_path);
+ NodePath get_root_path() const;
+
+ Error send_bytes(Vector<uint8_t> p_data, int p_to = MultiplayerPeer::TARGET_PEER_BROADCAST, MultiplayerPeer::TransferMode p_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE, int p_channel = 0);
+ String get_rpc_md5(const Object *p_obj);
+
+ const HashSet<int> get_connected_peers() const { return connected_peers; }
+
+ void set_remote_sender_override(int p_id) { remote_sender_override = p_id; }
+ void set_refuse_new_connections(bool p_refuse);
+ bool is_refusing_new_connections() const;
+
+ void set_allow_object_decoding(bool p_enable);
+ bool is_object_decoding_allowed() const;
+
+ Ref<SceneCacheInterface> get_path_cache() { return cache; }
+
+#ifdef DEBUG_ENABLED
+ void profile_bandwidth(const String &p_inout, int p_size);
+#endif
+
+ SceneMultiplayer();
+ ~SceneMultiplayer();
+};
+
+#endif // SCENE_MULTIPLAYER_H
diff --git a/scene/resources/scene_replication_config.cpp b/modules/multiplayer/scene_replication_config.cpp
index 6789f9f7d5..ae06516b7b 100644
--- a/scene/resources/scene_replication_config.cpp
+++ b/modules/multiplayer/scene_replication_config.cpp
@@ -30,7 +30,7 @@
#include "scene_replication_config.h"
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/main/node.h"
bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_value) {
diff --git a/scene/resources/scene_replication_config.h b/modules/multiplayer/scene_replication_config.h
index ab3658d2a7..ab3658d2a7 100644
--- a/scene/resources/scene_replication_config.h
+++ b/modules/multiplayer/scene_replication_config.h
diff --git a/scene/multiplayer/scene_replication_interface.cpp b/modules/multiplayer/scene_replication_interface.cpp
index c616c5bb85..6e3dbfab47 100644
--- a/scene/multiplayer/scene_replication_interface.cpp
+++ b/modules/multiplayer/scene_replication_interface.cpp
@@ -32,21 +32,15 @@
#include "core/io/marshalls.h"
#include "scene/main/node.h"
-#include "scene/multiplayer/multiplayer_spawner.h"
-#include "scene/multiplayer/multiplayer_synchronizer.h"
+
+#include "multiplayer_spawner.h"
+#include "multiplayer_synchronizer.h"
+#include "scene_multiplayer.h"
#define MAKE_ROOM(m_amount) \
if (packet_cache.size() < m_amount) \
packet_cache.resize(m_amount);
-MultiplayerReplicationInterface *SceneReplicationInterface::_create(MultiplayerAPI *p_multiplayer) {
- return memnew(SceneReplicationInterface(p_multiplayer));
-}
-
-void SceneReplicationInterface::make_default() {
- MultiplayerAPI::create_default_replication_interface = _create;
-}
-
void SceneReplicationInterface::_free_remotes(int p_id) {
const HashMap<uint32_t, ObjectID> remotes = rep_state->peer_get_remotes(p_id);
for (const KeyValue<uint32_t, ObjectID> &E : remotes) {
@@ -134,7 +128,7 @@ Error SceneReplicationInterface::on_replication_start(Object *p_obj, Variant p_c
// Add to synchronizer list and setup visibility.
rep_state->config_add_sync(node, sync);
const ObjectID oid = node->get_instance_id();
- sync->connect("visibility_changed", callable_mp(this, &SceneReplicationInterface::_visibility_changed), varray(oid));
+ sync->connect("visibility_changed", callable_mp(this, &SceneReplicationInterface::_visibility_changed).bind(oid));
if (multiplayer->has_multiplayer_peer() && sync->is_multiplayer_authority()) {
_update_sync_visibility(0, oid);
}
@@ -239,7 +233,7 @@ Error SceneReplicationInterface::_update_spawn_visibility(int p_peer, const Obje
_make_spawn_packet(node, len);
for (int pid : to_spawn) {
int path_id;
- multiplayer->send_object_cache(spawner, pid, path_id);
+ multiplayer->get_path_cache()->send_object_cache(spawner, pid, path_id);
_send_raw(packet_cache.ptr(), len, pid, true);
rep_state->peer_add_spawn(pid, p_oid);
}
@@ -267,7 +261,7 @@ Error SceneReplicationInterface::_send_raw(const uint8_t *p_buffer, int p_size,
Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
peer->set_target_peer(p_peer);
peer->set_transfer_channel(0);
- peer->set_transfer_mode(p_reliable ? Multiplayer::TRANSFER_MODE_RELIABLE : Multiplayer::TRANSFER_MODE_UNRELIABLE);
+ peer->set_transfer_mode(p_reliable ? MultiplayerPeer::TRANSFER_MODE_RELIABLE : MultiplayerPeer::TRANSFER_MODE_UNRELIABLE);
return peer->put_packet(p_buffer, p_size);
}
@@ -306,12 +300,12 @@ Error SceneReplicationInterface::_make_spawn_packet(Node *p_node, int &r_len) {
}
// Encode scene ID, path ID, net ID, node name.
- int path_id = multiplayer->make_object_cache(spawner);
+ int path_id = multiplayer->get_path_cache()->make_object_cache(spawner);
CharString cname = p_node->get_name().operator String().utf8();
int nlen = encode_cstring(cname.get_data(), nullptr);
MAKE_ROOM(1 + 1 + 4 + 4 + 4 + nlen + (is_custom ? 4 + spawn_arg_size : 0) + state_size);
uint8_t *ptr = packet_cache.ptrw();
- ptr[0] = (uint8_t)MultiplayerAPI::NETWORK_COMMAND_SPAWN;
+ ptr[0] = (uint8_t)SceneMultiplayer::NETWORK_COMMAND_SPAWN;
ptr[1] = scene_id;
int ofs = 2;
ofs += encode_uint32(path_id, &ptr[ofs]);
@@ -339,7 +333,7 @@ Error SceneReplicationInterface::_make_despawn_packet(Node *p_node, int &r_len)
const ObjectID oid = p_node->get_instance_id();
MAKE_ROOM(5);
uint8_t *ptr = packet_cache.ptrw();
- ptr[0] = (uint8_t)MultiplayerAPI::NETWORK_COMMAND_DESPAWN;
+ ptr[0] = (uint8_t)SceneMultiplayer::NETWORK_COMMAND_DESPAWN;
int ofs = 1;
uint32_t nid = rep_state->get_net_id(oid);
ofs += encode_uint32(nid, &ptr[ofs]);
@@ -354,7 +348,7 @@ Error SceneReplicationInterface::on_spawn_receive(int p_from, const uint8_t *p_b
ofs += 1;
uint32_t node_target = decode_uint32(&p_buffer[ofs]);
ofs += 4;
- MultiplayerSpawner *spawner = Object::cast_to<MultiplayerSpawner>(multiplayer->get_cached_object(p_from, node_target));
+ MultiplayerSpawner *spawner = Object::cast_to<MultiplayerSpawner>(multiplayer->get_path_cache()->get_cached_object(p_from, node_target));
ERR_FAIL_COND_V(!spawner, ERR_DOES_NOT_EXIST);
ERR_FAIL_COND_V(p_from != spawner->get_multiplayer_authority(), ERR_UNAUTHORIZED);
@@ -402,6 +396,8 @@ Error SceneReplicationInterface::on_spawn_receive(int p_from, const uint8_t *p_b
pending_buffer_size = state_len;
}
parent->add_child(node);
+ spawner->emit_signal(SNAME("spawned"), node);
+
pending_spawn = ObjectID();
pending_buffer = nullptr;
pending_buffer_size = 0;
@@ -417,10 +413,17 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p
Error err = rep_state->peer_del_remote(p_from, net_id, &node);
ERR_FAIL_COND_V(err != OK, err);
ERR_FAIL_COND_V(!node, ERR_BUG);
+
+ MultiplayerSpawner *spawner = rep_state->get_spawner(node->get_instance_id());
+ ERR_FAIL_COND_V(!spawner, ERR_DOES_NOT_EXIST);
+ ERR_FAIL_COND_V(p_from != spawner->get_multiplayer_authority(), ERR_UNAUTHORIZED);
+
if (node->get_parent() != nullptr) {
node->get_parent()->remove_child(node);
}
node->queue_delete();
+ spawner->emit_signal(SNAME("despawned"), node);
+
return OK;
}
@@ -431,7 +434,7 @@ void SceneReplicationInterface::_send_sync(int p_peer, uint64_t p_msec) {
}
MAKE_ROOM(sync_mtu);
uint8_t *ptr = packet_cache.ptrw();
- ptr[0] = MultiplayerAPI::NETWORK_COMMAND_SYNC;
+ ptr[0] = SceneMultiplayer::NETWORK_COMMAND_SYNC;
int ofs = 1;
ofs += encode_uint16(rep_state->peer_sync_next(p_peer), &ptr[1]);
// Can only send updates for already notified nodes.
@@ -447,7 +450,7 @@ void SceneReplicationInterface::_send_sync(int p_peer, uint64_t p_msec) {
uint32_t net_id = rep_state->get_net_id(oid);
if (net_id == 0 || (net_id & 0x80000000)) {
int path_id = 0;
- bool verified = multiplayer->send_object_cache(sync, p_peer, path_id);
+ bool verified = multiplayer->get_path_cache()->send_object_cache(sync, p_peer, path_id);
ERR_CONTINUE_MSG(path_id < 0, "This should never happen!");
if (net_id == 0) {
// First time path based ID.
@@ -499,7 +502,7 @@ Error SceneReplicationInterface::on_sync_receive(int p_from, const uint8_t *p_bu
ofs += 4;
Node *node = nullptr;
if (net_id & 0x80000000) {
- MultiplayerSynchronizer *sync = Object::cast_to<MultiplayerSynchronizer>(multiplayer->get_cached_object(p_from, net_id & 0x7FFFFFFF));
+ MultiplayerSynchronizer *sync = Object::cast_to<MultiplayerSynchronizer>(multiplayer->get_path_cache()->get_cached_object(p_from, net_id & 0x7FFFFFFF));
ERR_FAIL_COND_V(!sync || sync->get_multiplayer_authority() != p_from, ERR_UNAUTHORIZED);
node = sync->get_node(sync->get_root_path());
} else {
diff --git a/scene/multiplayer/scene_replication_interface.h b/modules/multiplayer/scene_replication_interface.h
index 9ddab2d383..8981647429 100644
--- a/scene/multiplayer/scene_replication_interface.h
+++ b/modules/multiplayer/scene_replication_interface.h
@@ -31,12 +31,14 @@
#ifndef SCENE_REPLICATION_INTERFACE_H
#define SCENE_REPLICATION_INTERFACE_H
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
-#include "scene/multiplayer/scene_replication_state.h"
+#include "scene_replication_state.h"
-class SceneReplicationInterface : public MultiplayerReplicationInterface {
- GDCLASS(SceneReplicationInterface, MultiplayerReplicationInterface);
+class SceneMultiplayer;
+
+class SceneReplicationInterface : public RefCounted {
+ GDCLASS(SceneReplicationInterface, RefCounted);
private:
void _send_sync(int p_peer, uint64_t p_msec);
@@ -50,7 +52,7 @@ private:
void _free_remotes(int p_peer);
Ref<SceneReplicationState> rep_state;
- MultiplayerAPI *multiplayer = nullptr;
+ SceneMultiplayer *multiplayer = nullptr;
PackedByteArray packet_cache;
int sync_mtu = 1350; // Highly dependent on underlying protocol.
@@ -59,26 +61,23 @@ private:
const uint8_t *pending_buffer = nullptr;
int pending_buffer_size = 0;
-protected:
- static MultiplayerReplicationInterface *_create(MultiplayerAPI *p_multiplayer);
-
public:
static void make_default();
- virtual void on_reset() override;
- virtual void on_peer_change(int p_id, bool p_connected) override;
+ void on_reset();
+ void on_peer_change(int p_id, bool p_connected);
- virtual Error on_spawn(Object *p_obj, Variant p_config) override;
- virtual Error on_despawn(Object *p_obj, Variant p_config) override;
- virtual Error on_replication_start(Object *p_obj, Variant p_config) override;
- virtual Error on_replication_stop(Object *p_obj, Variant p_config) override;
- virtual void on_network_process() override;
+ Error on_spawn(Object *p_obj, Variant p_config);
+ Error on_despawn(Object *p_obj, Variant p_config);
+ Error on_replication_start(Object *p_obj, Variant p_config);
+ Error on_replication_stop(Object *p_obj, Variant p_config);
+ void on_network_process();
- virtual Error on_spawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) override;
- virtual Error on_despawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) override;
- virtual Error on_sync_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len) override;
+ Error on_spawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len);
+ Error on_despawn_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len);
+ Error on_sync_receive(int p_from, const uint8_t *p_buffer, int p_buffer_len);
- SceneReplicationInterface(MultiplayerAPI *p_multiplayer) {
+ SceneReplicationInterface(SceneMultiplayer *p_multiplayer) {
rep_state.instantiate();
multiplayer = p_multiplayer;
}
diff --git a/scene/multiplayer/scene_replication_state.cpp b/modules/multiplayer/scene_replication_state.cpp
index f6a51ff9c7..25442bb7fa 100644
--- a/scene/multiplayer/scene_replication_state.cpp
+++ b/modules/multiplayer/scene_replication_state.cpp
@@ -28,18 +28,18 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scene/multiplayer/scene_replication_state.h"
+#include "scene_replication_state.h"
-#include "core/multiplayer/multiplayer_api.h"
-#include "scene/multiplayer/multiplayer_spawner.h"
-#include "scene/multiplayer/multiplayer_synchronizer.h"
#include "scene/scene_string_names.h"
+#include "multiplayer_spawner.h"
+#include "multiplayer_synchronizer.h"
+
SceneReplicationState::TrackedNode &SceneReplicationState::_track(const ObjectID &p_id) {
if (!tracked_nodes.has(p_id)) {
tracked_nodes[p_id] = TrackedNode(p_id);
Node *node = Object::cast_to<Node>(ObjectDB::get_instance(p_id));
- node->connect(SceneStringNames::get_singleton()->tree_exited, callable_mp(this, &SceneReplicationState::_untrack), varray(p_id), Node::CONNECT_ONESHOT);
+ node->connect(SceneStringNames::get_singleton()->tree_exited, callable_mp(this, &SceneReplicationState::_untrack).bind(p_id), Node::CONNECT_ONESHOT);
}
return tracked_nodes[p_id];
}
diff --git a/scene/multiplayer/scene_replication_state.h b/modules/multiplayer/scene_replication_state.h
index 01b70b11b8..bdff6ae3b7 100644
--- a/scene/multiplayer/scene_replication_state.h
+++ b/modules/multiplayer/scene_replication_state.h
@@ -33,6 +33,9 @@
#include "core/object/ref_counted.h"
+#include "multiplayer_spawner.h"
+#include "multiplayer_synchronizer.h"
+
class MultiplayerSpawner;
class MultiplayerSynchronizer;
class Node;
diff --git a/scene/multiplayer/scene_rpc_interface.cpp b/modules/multiplayer/scene_rpc_interface.cpp
index 144a10c665..65090b9316 100644
--- a/scene/multiplayer/scene_rpc_interface.cpp
+++ b/modules/multiplayer/scene_rpc_interface.cpp
@@ -28,21 +28,28 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scene/multiplayer/scene_rpc_interface.h"
+#include "scene_rpc_interface.h"
#include "core/debugger/engine_debugger.h"
#include "core/io/marshalls.h"
-#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
-MultiplayerRPCInterface *SceneRPCInterface::_create(MultiplayerAPI *p_multiplayer) {
- return memnew(SceneRPCInterface(p_multiplayer));
-}
+#include "scene_multiplayer.h"
-void SceneRPCInterface::make_default() {
- MultiplayerAPI::create_default_rpc_interface = _create;
-}
+// The RPC meta is composed by a single byte that contains (starting from the least significant bit):
+// - `NetworkCommands` in the first four bits.
+// - `NetworkNodeIdCompression` in the next 2 bits.
+// - `NetworkNameIdCompression` in the next 1 bit.
+// - `byte_only_or_no_args` in the next 1 bit.
+#define NODE_ID_COMPRESSION_SHIFT SceneMultiplayer::CMD_FLAG_0_SHIFT
+#define NAME_ID_COMPRESSION_SHIFT SceneMultiplayer::CMD_FLAG_2_SHIFT
+#define BYTE_ONLY_OR_NO_ARGS_SHIFT SceneMultiplayer::CMD_FLAG_3_SHIFT
+
+#define NODE_ID_COMPRESSION_FLAG ((1 << NODE_ID_COMPRESSION_SHIFT) | (1 << (NODE_ID_COMPRESSION_SHIFT + 1)))
+#define NAME_ID_COMPRESSION_FLAG (1 << NAME_ID_COMPRESSION_SHIFT)
+#define BYTE_ONLY_OR_NO_ARGS_FLAG (1 << BYTE_ONLY_OR_NO_ARGS_SHIFT)
#ifdef DEBUG_ENABLED
_FORCE_INLINE_ void SceneRPCInterface::_profile_node_data(const String &p_what, ObjectID p_id) {
@@ -67,50 +74,58 @@ int get_packet_len(uint32_t p_node_target, int p_packet_len) {
}
}
-const Multiplayer::RPCConfig _get_rpc_config(const Node *p_node, const StringName &p_method, uint16_t &r_id) {
- const Vector<Multiplayer::RPCConfig> node_config = p_node->get_node_rpc_methods();
- for (int i = 0; i < node_config.size(); i++) {
- if (node_config[i].name == p_method) {
- r_id = ((uint16_t)i) | (1 << 15);
- return node_config[i];
- }
+void SceneRPCInterface::_parse_rpc_config(const Variant &p_config, bool p_for_node, RPCConfigCache &r_cache) {
+ if (p_config.get_type() == Variant::NIL) {
+ return;
}
- if (p_node->get_script_instance()) {
- const Vector<Multiplayer::RPCConfig> script_config = p_node->get_script_instance()->get_rpc_methods();
- for (int i = 0; i < script_config.size(); i++) {
- if (script_config[i].name == p_method) {
- r_id = (uint16_t)i;
- return script_config[i];
- }
+ ERR_FAIL_COND(p_config.get_type() != Variant::DICTIONARY);
+ const Dictionary config = p_config;
+ Array names = config.keys();
+ names.sort(); // Ensure ID order
+ for (int i = 0; i < names.size(); i++) {
+ ERR_CONTINUE(names[i].get_type() != Variant::STRING);
+ String name = names[i].operator String();
+ ERR_CONTINUE(config[name].get_type() != Variant::DICTIONARY);
+ ERR_CONTINUE(!config[name].operator Dictionary().has("rpc_mode"));
+ Dictionary dict = config[name];
+ RPCConfig cfg;
+ cfg.name = name;
+ cfg.rpc_mode = ((MultiplayerAPI::RPCMode)dict.get("rpc_mode", MultiplayerAPI::RPC_MODE_AUTHORITY).operator int());
+ cfg.transfer_mode = ((MultiplayerPeer::TransferMode)dict.get("transfer_mode", MultiplayerPeer::TRANSFER_MODE_RELIABLE).operator int());
+ cfg.call_local = dict.get("call_local", false).operator bool();
+ cfg.channel = dict.get("channel", 0).operator int();
+ uint16_t id = ((uint16_t)i);
+ if (p_for_node) {
+ id |= (1 << 15);
}
+ r_cache.configs[id] = cfg;
+ r_cache.ids[name] = id;
}
- return Multiplayer::RPCConfig();
}
-const Multiplayer::RPCConfig _get_rpc_config_by_id(Node *p_node, uint16_t p_id) {
- Vector<Multiplayer::RPCConfig> config;
- uint16_t id = p_id;
- if (id & (1 << 15)) {
- id = id & ~(1 << 15);
- config = p_node->get_node_rpc_methods();
- } else if (p_node->get_script_instance()) {
- config = p_node->get_script_instance()->get_rpc_methods();
+const SceneRPCInterface::RPCConfigCache &SceneRPCInterface::_get_node_config(const Node *p_node) {
+ const ObjectID oid = p_node->get_instance_id();
+ if (rpc_cache.has(oid)) {
+ return rpc_cache[oid];
}
- if (id < config.size()) {
- return config[id];
+ RPCConfigCache cache;
+ _parse_rpc_config(p_node->get_node_rpc_config(), true, cache);
+ if (p_node->get_script_instance()) {
+ _parse_rpc_config(p_node->get_script_instance()->get_rpc_config(), false, cache);
}
- return Multiplayer::RPCConfig();
+ rpc_cache[oid] = cache;
+ return rpc_cache[oid];
}
-_FORCE_INLINE_ bool _can_call_mode(Node *p_node, Multiplayer::RPCMode mode, int p_remote_id) {
+_FORCE_INLINE_ bool _can_call_mode(Node *p_node, MultiplayerAPI::RPCMode mode, int p_remote_id) {
switch (mode) {
- case Multiplayer::RPC_MODE_DISABLED: {
+ case MultiplayerAPI::RPC_MODE_DISABLED: {
return false;
} break;
- case Multiplayer::RPC_MODE_ANY_PEER: {
+ case MultiplayerAPI::RPC_MODE_ANY_PEER: {
return true;
} break;
- case Multiplayer::RPC_MODE_AUTHORITY: {
+ case MultiplayerAPI::RPC_MODE_AUTHORITY: {
return !p_node->is_multiplayer_authority() && p_remote_id == p_node->get_multiplayer_authority();
} break;
}
@@ -118,19 +133,13 @@ _FORCE_INLINE_ bool _can_call_mode(Node *p_node, Multiplayer::RPCMode mode, int
return false;
}
-String SceneRPCInterface::get_rpc_md5(const Object *p_obj) const {
+String SceneRPCInterface::get_rpc_md5(const Object *p_obj) {
const Node *node = Object::cast_to<Node>(p_obj);
ERR_FAIL_COND_V(!node, "");
+ const RPCConfigCache cache = _get_node_config(node);
String rpc_list;
- const Vector<Multiplayer::RPCConfig> node_config = node->get_node_rpc_methods();
- for (int i = 0; i < node_config.size(); i++) {
- rpc_list += String(node_config[i].name);
- }
- if (node->get_script_instance()) {
- const Vector<Multiplayer::RPCConfig> script_config = node->get_script_instance()->get_rpc_methods();
- for (int i = 0; i < script_config.size(); i++) {
- rpc_list += String(script_config[i].name);
- }
+ for (const KeyValue<uint16_t, RPCConfig> &config : cache.configs) {
+ rpc_list += String(config.value.name);
}
return rpc_list.md5_text();
}
@@ -159,7 +168,7 @@ Node *SceneRPCInterface::_process_get_node(int p_from, const uint8_t *p_packet,
return node;
} else {
// Use cached path.
- return Object::cast_to<Node>(multiplayer->get_cached_object(p_from, p_node_target));
+ return Object::cast_to<Node>(multiplayer->get_path_cache()->get_cached_object(p_from, p_node_target));
}
}
@@ -240,8 +249,9 @@ void SceneRPCInterface::_process_rpc(Node *p_node, const uint16_t p_rpc_method_i
ERR_FAIL_COND_MSG(p_offset > p_packet_len, "Invalid packet received. Size too small.");
// Check that remote can call the RPC on this node.
- const Multiplayer::RPCConfig config = _get_rpc_config_by_id(p_node, p_rpc_method_id);
- ERR_FAIL_COND(config.name == StringName());
+ const RPCConfigCache &cache_config = _get_node_config(p_node);
+ ERR_FAIL_COND(!cache_config.configs.has(p_rpc_method_id));
+ const RPCConfig &config = cache_config.configs[p_rpc_method_id];
bool can_call = _can_call_mode(p_node, config.rpc_mode, p_from);
ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(config.name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)config.rpc_mode) + ", authority is " + itos(p_node->get_multiplayer_authority()) + ".");
@@ -286,7 +296,7 @@ void SceneRPCInterface::_process_rpc(Node *p_node, const uint16_t p_rpc_method_i
}
}
-void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const Multiplayer::RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount) {
+void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount) {
Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
ERR_FAIL_COND_MSG(peer.is_null(), "Attempt to call RPC without active multiplayer peer.");
@@ -297,14 +307,14 @@ void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, con
ERR_FAIL_COND_MSG(p_argcount > 255, "Too many arguments (>255).");
if (p_to != 0 && !multiplayer->get_connected_peers().has(ABS(p_to))) {
- ERR_FAIL_COND_MSG(p_to == peer->get_unique_id(), "Attempt to call RPC on yourself! Peer unique ID: " + itos(peer->get_unique_id()) + ".");
+ ERR_FAIL_COND_MSG(p_to == multiplayer->get_unique_id(), "Attempt to call RPC on yourself! Peer unique ID: " + itos(multiplayer->get_unique_id()) + ".");
ERR_FAIL_MSG("Attempt to call RPC with unknown peer ID: " + itos(p_to) + ".");
}
// See if all peers have cached path (if so, call can be fast).
int psc_id;
- const bool has_all_peers = multiplayer->send_object_cache(p_from, p_to, psc_id);
+ const bool has_all_peers = multiplayer->get_path_cache()->send_object_cache(p_from, p_to, psc_id);
// Create base packet, lots of hardcode because it must be tight.
@@ -315,7 +325,7 @@ void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, con
packet_cache.resize(m_amount);
// Encode meta.
- uint8_t command_type = MultiplayerAPI::NETWORK_COMMAND_REMOTE_CALL;
+ uint8_t command_type = SceneMultiplayer::NETWORK_COMMAND_REMOTE_CALL;
uint8_t node_id_compression = UINT8_MAX;
uint8_t name_id_compression = UINT8_MAX;
bool byte_only_or_no_args = false;
@@ -426,7 +436,7 @@ void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, con
continue; // Continue, not for this peer.
}
- bool confirmed = multiplayer->is_cache_confirmed(from_path, P);
+ bool confirmed = multiplayer->get_path_cache()->is_cache_confirmed(from_path, P);
peer->set_target_peer(P); // To this one specifically.
@@ -443,22 +453,25 @@ void SceneRPCInterface::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, con
}
}
-void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+Error SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
- ERR_FAIL_COND_MSG(!peer.is_valid(), "Trying to call an RPC while no multiplayer peer is active.");
+ ERR_FAIL_COND_V_MSG(!peer.is_valid(), ERR_UNCONFIGURED, "Trying to call an RPC while no multiplayer peer is active.");
Node *node = Object::cast_to<Node>(p_obj);
- ERR_FAIL_COND(!node);
- ERR_FAIL_COND_MSG(!node->is_inside_tree(), "Trying to call an RPC on a node which is not inside SceneTree.");
- ERR_FAIL_COND_MSG(peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, "Trying to call an RPC via a multiplayer peer which is not connected.");
+ ERR_FAIL_COND_V_MSG(!node || !node->is_inside_tree(), ERR_INVALID_PARAMETER, "The object must be a valid Node inside the SceneTree");
+ ERR_FAIL_COND_V_MSG(peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, ERR_CONNECTION_ERROR, "Trying to call an RPC via a multiplayer peer which is not connected.");
- int node_id = peer->get_unique_id();
+ int caller_id = multiplayer->get_unique_id();
bool call_local_native = false;
bool call_local_script = false;
- uint16_t rpc_id = UINT16_MAX;
- const Multiplayer::RPCConfig config = _get_rpc_config(node, p_method, rpc_id);
- ERR_FAIL_COND_MSG(config.name == StringName(),
+ const RPCConfigCache &config_cache = _get_node_config(node);
+ uint16_t rpc_id = config_cache.ids.has(p_method) ? config_cache.ids[p_method] : UINT16_MAX;
+ ERR_FAIL_COND_V_MSG(rpc_id == UINT16_MAX, ERR_INVALID_PARAMETER,
vformat("Unable to get the RPC configuration for the function \"%s\" at path: \"%s\". This happens when the method is missing or not marked for RPCs in the local script.", p_method, node->get_path()));
- if (p_peer_id == 0 || p_peer_id == node_id || (p_peer_id < 0 && p_peer_id != -node_id)) {
+ const RPCConfig &config = config_cache.configs[rpc_id];
+
+ ERR_FAIL_COND_V_MSG(p_peer_id == caller_id && !config.call_local, ERR_INVALID_PARAMETER, "RPC '" + p_method + "' on yourself is not allowed by selected mode.");
+
+ if (p_peer_id == 0 || p_peer_id == caller_id || (p_peer_id < 0 && p_peer_id != -caller_id)) {
if (rpc_id & (1 << 15)) {
call_local_native = config.call_local;
} else {
@@ -466,7 +479,7 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
}
}
- if (p_peer_id != node_id) {
+ if (p_peer_id != caller_id) {
#ifdef DEBUG_ENABLED
_profile_node_data("rpc_out", node->get_instance_id());
#endif
@@ -477,7 +490,7 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
if (call_local_native) {
Callable::CallError ce;
- multiplayer->set_remote_sender_override(peer->get_unique_id());
+ multiplayer->set_remote_sender_override(multiplayer->get_unique_id());
node->callp(p_method, p_arg, p_argcount, ce);
multiplayer->set_remote_sender_override(0);
@@ -485,7 +498,7 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
String error = Variant::get_call_error_text(node, p_method, p_arg, p_argcount, ce);
error = "rpc() aborted in local call: - " + error + ".";
ERR_PRINT(error);
- return;
+ return FAILED;
}
}
@@ -493,7 +506,7 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
Callable::CallError ce;
ce.error = Callable::CallError::CALL_OK;
- multiplayer->set_remote_sender_override(peer->get_unique_id());
+ multiplayer->set_remote_sender_override(multiplayer->get_unique_id());
node->get_script_instance()->callp(p_method, p_arg, p_argcount, ce);
multiplayer->set_remote_sender_override(0);
@@ -501,9 +514,8 @@ void SceneRPCInterface::rpcp(Object *p_obj, int p_peer_id, const StringName &p_m
String error = Variant::get_call_error_text(node, p_method, p_arg, p_argcount, ce);
error = "rpc() aborted in script local call: - " + error + ".";
ERR_PRINT(error);
- return;
+ return FAILED;
}
}
-
- ERR_FAIL_COND_MSG(p_peer_id == node_id && !config.call_local, "RPC '" + p_method + "' on yourself is not allowed by selected mode.");
+ return OK;
}
diff --git a/scene/multiplayer/scene_rpc_interface.h b/modules/multiplayer/scene_rpc_interface.h
index 86e1d0d280..aa9be525a2 100644
--- a/scene/multiplayer/scene_rpc_interface.h
+++ b/modules/multiplayer/scene_rpc_interface.h
@@ -31,13 +31,40 @@
#ifndef SCENE_RPC_INTERFACE_H
#define SCENE_RPC_INTERFACE_H
-#include "core/multiplayer/multiplayer.h"
-#include "core/multiplayer/multiplayer_api.h"
+#include "core/object/ref_counted.h"
+#include "scene/main/multiplayer_api.h"
-class SceneRPCInterface : public MultiplayerRPCInterface {
- GDCLASS(SceneRPCInterface, MultiplayerRPCInterface);
+class SceneMultiplayer;
+class Node;
+
+class SceneRPCInterface : public RefCounted {
+ GDCLASS(SceneRPCInterface, RefCounted);
private:
+ struct RPCConfig {
+ StringName name;
+ MultiplayerAPI::RPCMode rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
+ bool call_local = false;
+ MultiplayerPeer::TransferMode transfer_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
+ int channel = 0;
+
+ bool operator==(RPCConfig const &p_other) const {
+ return name == p_other.name;
+ }
+ };
+
+ struct RPCConfigCache {
+ HashMap<uint16_t, RPCConfig> configs;
+ HashMap<StringName, uint16_t> ids;
+ };
+
+ struct SortRPCConfig {
+ StringName::AlphCompare compare;
+ bool operator()(const RPCConfig &p_a, const RPCConfig &p_b) const {
+ return compare(p_a.name, p_b.name);
+ }
+ };
+
enum NetworkNodeIdCompression {
NETWORK_NODE_ID_COMPRESSION_8 = 0,
NETWORK_NODE_ID_COMPRESSION_16,
@@ -49,43 +76,27 @@ private:
NETWORK_NAME_ID_COMPRESSION_16,
};
- // The RPC meta is composed by a single byte that contains (starting from the least significant bit):
- // - `NetworkCommands` in the first four bits.
- // - `NetworkNodeIdCompression` in the next 2 bits.
- // - `NetworkNameIdCompression` in the next 1 bit.
- // - `byte_only_or_no_args` in the next 1 bit.
- enum {
- NODE_ID_COMPRESSION_SHIFT = MultiplayerAPI::CMD_FLAG_0_SHIFT, // 2 bits for this.
- NAME_ID_COMPRESSION_SHIFT = MultiplayerAPI::CMD_FLAG_2_SHIFT,
- BYTE_ONLY_OR_NO_ARGS_SHIFT = MultiplayerAPI::CMD_FLAG_3_SHIFT,
- };
-
- enum {
- NODE_ID_COMPRESSION_FLAG = (1 << NODE_ID_COMPRESSION_SHIFT) | (1 << (NODE_ID_COMPRESSION_SHIFT + 1)), // 2 bits for this.
- NAME_ID_COMPRESSION_FLAG = (1 << NAME_ID_COMPRESSION_SHIFT),
- BYTE_ONLY_OR_NO_ARGS_FLAG = (1 << BYTE_ONLY_OR_NO_ARGS_SHIFT),
- };
-
- MultiplayerAPI *multiplayer = nullptr;
+ SceneMultiplayer *multiplayer = nullptr;
Vector<uint8_t> packet_cache;
-protected:
- static MultiplayerRPCInterface *_create(MultiplayerAPI *p_multiplayer);
+ HashMap<ObjectID, RPCConfigCache> rpc_cache;
+protected:
_FORCE_INLINE_ void _profile_node_data(const String &p_what, ObjectID p_id);
void _process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset);
- void _send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const Multiplayer::RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount);
+ void _send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount);
Node *_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len);
-public:
- static void make_default();
+ void _parse_rpc_config(const Variant &p_config, bool p_for_node, RPCConfigCache &r_cache);
+ const RPCConfigCache &_get_node_config(const Node *p_node);
- virtual void rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) override;
- virtual void process_rpc(int p_from, const uint8_t *p_packet, int p_packet_len) override;
- virtual String get_rpc_md5(const Object *p_obj) const override;
+public:
+ Error rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
+ void process_rpc(int p_from, const uint8_t *p_packet, int p_packet_len);
+ String get_rpc_md5(const Object *p_obj);
- SceneRPCInterface(MultiplayerAPI *p_multiplayer) { multiplayer = p_multiplayer; }
+ SceneRPCInterface(SceneMultiplayer *p_multiplayer) { multiplayer = p_multiplayer; }
};
#endif // SCENE_RPC_INTERFACE_H
diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp
index bcbc721dbb..2cdb5b7cb4 100644
--- a/modules/navigation/godot_navigation_server.cpp
+++ b/modules/navigation/godot_navigation_server.cpp
@@ -249,8 +249,10 @@ Array GodotNavigationServer::map_get_regions(RID p_map) const {
Array regions_rids;
const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, regions_rids);
- for (NavRegion *region : map->get_regions()) {
- regions_rids.push_back(region->get_self());
+ const LocalVector<NavRegion *> regions = map->get_regions();
+ regions_rids.resize(regions.size());
+ for (uint32_t i = 0; i < regions.size(); i++) {
+ regions_rids[i] = regions[i]->get_self();
}
return regions_rids;
}
@@ -259,8 +261,10 @@ Array GodotNavigationServer::map_get_agents(RID p_map) const {
Array agents_rids;
const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, agents_rids);
- for (RvoAgent *agent : map->get_agents()) {
- agents_rids.push_back(agent->get_self());
+ const LocalVector<RvoAgent *> agents = map->get_agents();
+ agents_rids.resize(agents.size());
+ for (uint32_t i = 0; i < agents.size(); i++) {
+ agents_rids[i] = agents[i]->get_self();
}
return agents_rids;
}
@@ -539,15 +543,15 @@ COMMAND_1(free, RID, p_object) {
NavMap *map = map_owner.get_or_null(p_object);
// Removes any assigned region
- std::vector<NavRegion *> regions = map->get_regions();
- for (size_t i(0); i < regions.size(); i++) {
+ LocalVector<NavRegion *> regions = map->get_regions();
+ for (uint32_t i = 0; i < regions.size(); i++) {
map->remove_region(regions[i]);
regions[i]->set_map(nullptr);
}
// Remove any assigned agent
- std::vector<RvoAgent *> agents = map->get_agents();
- for (size_t i(0); i < agents.size(); i++) {
+ LocalVector<RvoAgent *> agents = map->get_agents();
+ for (uint32_t i = 0; i < agents.size(); i++) {
map->remove_agent(agents[i]);
agents[i]->set_map(nullptr);
}
diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h
index 8e7e99888c..da1f8cba0b 100644
--- a/modules/navigation/godot_navigation_server.h
+++ b/modules/navigation/godot_navigation_server.h
@@ -69,7 +69,7 @@ class GodotNavigationServer : public NavigationServer3D {
/// Mutex used to make any operation threadsafe.
Mutex operations_mutex;
- std::vector<SetCommand *> commands;
+ LocalVector<SetCommand *> commands;
mutable RID_Owner<NavMap> map_owner;
mutable RID_Owner<NavRegion> region_owner;
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index 46daa54239..49029b5513 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -117,7 +117,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
}
// List of all reachable navigation polys.
- std::vector<gd::NavigationPoly> navigation_polys;
+ LocalVector<gd::NavigationPoly> navigation_polys;
navigation_polys.reserve(polygons.size() * 0.75);
// Add the start polygon to the reachable navigation polygons.
@@ -170,20 +170,18 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
const Vector3 new_entry = Geometry3D::get_closest_point_to_segment(least_cost_poly->entry, pathway);
const float new_distance = (least_cost_poly->entry.distance_to(new_entry) * region_travel_cost) + region_enter_cost + least_cost_poly->traveled_distance;
- const std::vector<gd::NavigationPoly>::iterator it = std::find(
- navigation_polys.begin(),
- navigation_polys.end(),
- gd::NavigationPoly(connection.polygon));
+ int64_t already_visited_polygon_index = navigation_polys.find(gd::NavigationPoly(connection.polygon));
- if (it != navigation_polys.end()) {
+ if (already_visited_polygon_index != -1) {
// Polygon already visited, check if we can reduce the travel cost.
- if (new_distance < it->traveled_distance) {
- it->back_navigation_poly_id = least_cost_id;
- it->back_navigation_edge = connection.edge;
- it->back_navigation_edge_pathway_start = connection.pathway_start;
- it->back_navigation_edge_pathway_end = connection.pathway_end;
- it->traveled_distance = new_distance;
- it->entry = new_entry;
+ gd::NavigationPoly &avp = navigation_polys[already_visited_polygon_index];
+ if (new_distance < avp.traveled_distance) {
+ avp.back_navigation_poly_id = least_cost_id;
+ avp.back_navigation_edge = connection.edge;
+ avp.back_navigation_edge_pathway_start = connection.pathway_start;
+ avp.back_navigation_edge_pathway_end = connection.pathway_end;
+ avp.traveled_distance = new_distance;
+ avp.entry = new_entry;
}
} else {
// Add the neighbour polygon to the reachable ones.
@@ -470,15 +468,15 @@ void NavMap::add_region(NavRegion *p_region) {
}
void NavMap::remove_region(NavRegion *p_region) {
- const std::vector<NavRegion *>::iterator it = std::find(regions.begin(), regions.end(), p_region);
- if (it != regions.end()) {
- regions.erase(it);
+ int64_t region_index = regions.find(p_region);
+ if (region_index != -1) {
+ regions.remove_at_unordered(region_index);
regenerate_links = true;
}
}
bool NavMap::has_agent(RvoAgent *agent) const {
- return std::find(agents.begin(), agents.end(), agent) != agents.end();
+ return (agents.find(agent) != -1);
}
void NavMap::add_agent(RvoAgent *agent) {
@@ -490,15 +488,15 @@ void NavMap::add_agent(RvoAgent *agent) {
void NavMap::remove_agent(RvoAgent *agent) {
remove_agent_as_controlled(agent);
- const std::vector<RvoAgent *>::iterator it = std::find(agents.begin(), agents.end(), agent);
- if (it != agents.end()) {
- agents.erase(it);
+ int64_t agent_index = agents.find(agent);
+ if (agent_index != -1) {
+ agents.remove_at_unordered(agent_index);
agents_dirty = true;
}
}
void NavMap::set_agent_as_controlled(RvoAgent *agent) {
- const bool exist = std::find(controlled_agents.begin(), controlled_agents.end(), agent) != controlled_agents.end();
+ const bool exist = (controlled_agents.find(agent) != -1);
if (!exist) {
ERR_FAIL_COND(!has_agent(agent));
controlled_agents.push_back(agent);
@@ -506,22 +504,23 @@ void NavMap::set_agent_as_controlled(RvoAgent *agent) {
}
void NavMap::remove_agent_as_controlled(RvoAgent *agent) {
- const std::vector<RvoAgent *>::iterator it = std::find(controlled_agents.begin(), controlled_agents.end(), agent);
- if (it != controlled_agents.end()) {
- controlled_agents.erase(it);
+ int64_t active_avoidance_agent_index = controlled_agents.find(agent);
+ if (active_avoidance_agent_index != -1) {
+ controlled_agents.remove_at_unordered(active_avoidance_agent_index);
+ agents_dirty = true;
}
}
void NavMap::sync() {
// Check if we need to update the links.
if (regenerate_polygons) {
- for (size_t r(0); r < regions.size(); r++) {
+ for (uint32_t r = 0; r < regions.size(); r++) {
regions[r]->scratch_polygons();
}
regenerate_links = true;
}
- for (size_t r(0); r < regions.size(); r++) {
+ for (uint32_t r = 0; r < regions.size(); r++) {
if (regions[r]->sync()) {
regenerate_links = true;
}
@@ -529,33 +528,33 @@ void NavMap::sync() {
if (regenerate_links) {
// Remove regions connections.
- for (size_t r(0); r < regions.size(); r++) {
+ for (uint32_t r = 0; r < regions.size(); r++) {
regions[r]->get_connections().clear();
}
// Resize the polygon count.
int count = 0;
- for (size_t r(0); r < regions.size(); r++) {
+ for (uint32_t r = 0; r < regions.size(); r++) {
count += regions[r]->get_polygons().size();
}
polygons.resize(count);
// Copy all region polygons in the map.
count = 0;
- for (size_t r(0); r < regions.size(); r++) {
- std::copy(
- regions[r]->get_polygons().data(),
- regions[r]->get_polygons().data() + regions[r]->get_polygons().size(),
- polygons.begin() + count);
+ for (uint32_t r = 0; r < regions.size(); r++) {
+ const LocalVector<gd::Polygon> &polygons_source = regions[r]->get_polygons();
+ for (uint32_t n = 0; n < polygons_source.size(); n++) {
+ polygons[count + n] = polygons_source[n];
+ }
count += regions[r]->get_polygons().size();
}
// Group all edges per key.
HashMap<gd::EdgeKey, Vector<gd::Edge::Connection>, gd::EdgeKey> connections;
- for (size_t poly_id(0); poly_id < polygons.size(); poly_id++) {
+ for (uint32_t poly_id = 0; poly_id < polygons.size(); poly_id++) {
gd::Polygon &poly(polygons[poly_id]);
- for (size_t p(0); p < poly.points.size(); p++) {
+ for (uint32_t p = 0; p < poly.points.size(); p++) {
int next_point = (p + 1) % poly.points.size();
gd::EdgeKey ek(poly.points[p].key, poly.points[next_point].key);
@@ -662,6 +661,7 @@ void NavMap::sync() {
// Update agents tree.
if (agents_dirty) {
+ // cannot use LocalVector here as RVO library expects std::vector to build KdTree
std::vector<RVO::Agent *> raw_agents;
raw_agents.reserve(agents.size());
for (size_t i(0); i < agents.size(); i++) {
@@ -683,7 +683,7 @@ void NavMap::compute_single_step(uint32_t index, RvoAgent **agent) {
void NavMap::step(real_t p_deltatime) {
deltatime = p_deltatime;
if (controlled_agents.size() > 0) {
- WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &NavMap::compute_single_step, controlled_agents.data(), controlled_agents.size(), -1, true, SNAME("NavigationMapAgents"));
+ WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &NavMap::compute_single_step, controlled_agents.ptr(), controlled_agents.size(), -1, true, SNAME("NavigationMapAgents"));
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
}
}
@@ -694,7 +694,7 @@ void NavMap::dispatch_callbacks() {
}
}
-void NavMap::clip_path(const std::vector<gd::NavigationPoly> &p_navigation_polys, Vector<Vector3> &path, const gd::NavigationPoly *from_poly, const Vector3 &p_to_point, const gd::NavigationPoly *p_to_poly) const {
+void NavMap::clip_path(const LocalVector<gd::NavigationPoly> &p_navigation_polys, Vector<Vector3> &path, const gd::NavigationPoly *from_poly, const Vector3 &p_to_point, const gd::NavigationPoly *p_to_poly) const {
Vector3 from = path[path.size() - 1];
if (from.is_equal_approx(p_to_point)) {
diff --git a/modules/navigation/nav_map.h b/modules/navigation/nav_map.h
index 98a5c24b3e..e50a1afbe9 100644
--- a/modules/navigation/nav_map.h
+++ b/modules/navigation/nav_map.h
@@ -58,10 +58,10 @@ class NavMap : public NavRid {
bool regenerate_polygons = true;
bool regenerate_links = true;
- std::vector<NavRegion *> regions;
+ LocalVector<NavRegion *> regions;
/// Map polygons
- std::vector<gd::Polygon> polygons;
+ LocalVector<gd::Polygon> polygons;
/// Rvo world
RVO::KdTree rvo;
@@ -70,10 +70,10 @@ class NavMap : public NavRid {
bool agents_dirty = false;
/// All the Agents (even the controlled one)
- std::vector<RvoAgent *> agents;
+ LocalVector<RvoAgent *> agents;
/// Controlled agents
- std::vector<RvoAgent *> controlled_agents;
+ LocalVector<RvoAgent *> controlled_agents;
/// Physics delta time
real_t deltatime = 0.0;
@@ -111,14 +111,14 @@ public:
void add_region(NavRegion *p_region);
void remove_region(NavRegion *p_region);
- const std::vector<NavRegion *> &get_regions() const {
+ const LocalVector<NavRegion *> &get_regions() const {
return regions;
}
bool has_agent(RvoAgent *agent) const;
void add_agent(RvoAgent *agent);
void remove_agent(RvoAgent *agent);
- const std::vector<RvoAgent *> &get_agents() const {
+ const LocalVector<RvoAgent *> &get_agents() const {
return agents;
}
@@ -135,7 +135,7 @@ public:
private:
void compute_single_step(uint32_t index, RvoAgent **agent);
- void clip_path(const std::vector<gd::NavigationPoly> &p_navigation_polys, Vector<Vector3> &path, const gd::NavigationPoly *from_poly, const Vector3 &p_to_point, const gd::NavigationPoly *p_to_poly) const;
+ void clip_path(const LocalVector<gd::NavigationPoly> &p_navigation_polys, Vector<Vector3> &path, const gd::NavigationPoly *from_poly, const Vector3 &p_to_point, const gd::NavigationPoly *p_to_poly) const;
};
#endif // NAV_MAP_H
diff --git a/modules/navigation/nav_region.h b/modules/navigation/nav_region.h
index 484856ae36..c9d2d80f6c 100644
--- a/modules/navigation/nav_region.h
+++ b/modules/navigation/nav_region.h
@@ -53,7 +53,7 @@ class NavRegion : public NavRid {
bool polygons_dirty = true;
/// Cache
- std::vector<gd::Polygon> polygons;
+ LocalVector<gd::Polygon> polygons;
public:
NavRegion() {}
@@ -93,7 +93,7 @@ public:
Vector3 get_connection_pathway_start(int p_connection_id) const;
Vector3 get_connection_pathway_end(int p_connection_id) const;
- std::vector<gd::Polygon> const &get_polygons() const {
+ LocalVector<gd::Polygon> const &get_polygons() const {
return polygons;
}
diff --git a/modules/navigation/nav_utils.h b/modules/navigation/nav_utils.h
index a9f4e0e2fc..47f04b6a75 100644
--- a/modules/navigation/nav_utils.h
+++ b/modules/navigation/nav_utils.h
@@ -34,7 +34,7 @@
#include "core/math/vector3.h"
#include "core/templates/hash_map.h"
#include "core/templates/hashfuncs.h"
-#include "core/templates/vector.h"
+#include "core/templates/local_vector.h"
#include <vector>
class NavRegion;
@@ -96,13 +96,13 @@ struct Polygon {
NavRegion *owner = nullptr;
/// The points of this `Polygon`
- std::vector<Point> points;
+ LocalVector<Point> points;
/// Are the points clockwise ?
bool clockwise;
/// The edges of this `Polygon`
- std::vector<Edge> edges;
+ LocalVector<Edge> edges;
/// The center of this `Polygon`
Vector3 center;
@@ -124,6 +124,8 @@ struct NavigationPoly {
/// The distance to the destination.
float traveled_distance = 0.0;
+ NavigationPoly() { poly = nullptr; }
+
NavigationPoly(const Polygon *p_poly) :
poly(p_poly) {}
diff --git a/modules/ogg/config.py b/modules/ogg/config.py
index 5a417ba8dd..f7ec4de6be 100644
--- a/modules/ogg/config.py
+++ b/modules/ogg/config.py
@@ -8,8 +8,8 @@ def configure(env):
def get_doc_classes():
return [
- "OGGPacketSequence",
- "OGGPacketSequencePlayback",
+ "OggPacketSequence",
+ "OggPacketSequencePlayback",
]
diff --git a/modules/ogg/doc_classes/OGGPacketSequence.xml b/modules/ogg/doc_classes/OggPacketSequence.xml
index bff3691ce0..d3bd4455d8 100644
--- a/modules/ogg/doc_classes/OGGPacketSequence.xml
+++ b/modules/ogg/doc_classes/OggPacketSequence.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OGGPacketSequence" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="OggPacketSequence" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
- A sequence of OGG packets.
+ A sequence of Ogg packets.
</brief_description>
<description>
- A sequence of OGG packets.
+ A sequence of Ogg packets.
</description>
<tutorials>
</tutorials>
@@ -21,7 +21,7 @@
Contains the granule positions for each page in this packet sequence.
</member>
<member name="packet_data" type="Array" setter="set_packet_data" getter="get_packet_data" default="[]">
- Contains the raw packets that make up this OGGPacketSequence.
+ Contains the raw packets that make up this OggPacketSequence.
</member>
<member name="sampling_rate" type="float" setter="set_sampling_rate" getter="get_sampling_rate" default="0.0">
Holds sample rate information about this sequence. Must be set by another class that actually understands the codec.
diff --git a/modules/ogg/doc_classes/OGGPacketSequencePlayback.xml b/modules/ogg/doc_classes/OggPacketSequencePlayback.xml
index 11fc1f4cb6..5c0d75278b 100644
--- a/modules/ogg/doc_classes/OGGPacketSequencePlayback.xml
+++ b/modules/ogg/doc_classes/OggPacketSequencePlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OGGPacketSequencePlayback" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="OggPacketSequencePlayback" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/modules/ogg/ogg_packet_sequence.cpp b/modules/ogg/ogg_packet_sequence.cpp
index e18fa9e590..de8bf4a087 100644
--- a/modules/ogg/ogg_packet_sequence.cpp
+++ b/modules/ogg/ogg_packet_sequence.cpp
@@ -31,7 +31,7 @@
#include "ogg_packet_sequence.h"
#include "core/variant/typed_array.h"
-void OGGPacketSequence::push_page(int64_t p_granule_pos, const Vector<PackedByteArray> &p_data) {
+void OggPacketSequence::push_page(int64_t p_granule_pos, const Vector<PackedByteArray> &p_data) {
Vector<PackedByteArray> data_stored;
for (int i = 0; i < p_data.size(); i++) {
data_stored.push_back(p_data[i]);
@@ -41,7 +41,7 @@ void OGGPacketSequence::push_page(int64_t p_granule_pos, const Vector<PackedByte
data_version++;
}
-void OGGPacketSequence::set_packet_data(const Array &p_data) {
+void OggPacketSequence::set_packet_data(const Array &p_data) {
data_version++; // Update the data version so old playbacks know that they can't rely on us anymore.
page_data.clear();
for (int page_idx = 0; page_idx < p_data.size(); page_idx++) {
@@ -54,7 +54,7 @@ void OGGPacketSequence::set_packet_data(const Array &p_data) {
}
}
-Array OGGPacketSequence::get_packet_data() const {
+Array OggPacketSequence::get_packet_data() const {
Array ret;
for (const Vector<PackedByteArray> &page : page_data) {
Array page_variant;
@@ -66,7 +66,7 @@ Array OGGPacketSequence::get_packet_data() const {
return ret;
}
-void OGGPacketSequence::set_packet_granule_positions(const Array &p_granule_positions) {
+void OggPacketSequence::set_packet_granule_positions(const Array &p_granule_positions) {
data_version++; // Update the data version so old playbacks know that they can't rely on us anymore.
page_granule_positions.clear();
for (int page_idx = 0; page_idx < p_granule_positions.size(); page_idx++) {
@@ -75,7 +75,7 @@ void OGGPacketSequence::set_packet_granule_positions(const Array &p_granule_posi
}
}
-Array OGGPacketSequence::get_packet_granule_positions() const {
+Array OggPacketSequence::get_packet_granule_positions() const {
Array ret;
for (int64_t granule_pos : page_granule_positions) {
ret.push_back(granule_pos);
@@ -83,22 +83,22 @@ Array OGGPacketSequence::get_packet_granule_positions() const {
return ret;
}
-void OGGPacketSequence::set_sampling_rate(float p_sampling_rate) {
+void OggPacketSequence::set_sampling_rate(float p_sampling_rate) {
sampling_rate = p_sampling_rate;
}
-float OGGPacketSequence::get_sampling_rate() const {
+float OggPacketSequence::get_sampling_rate() const {
return sampling_rate;
}
-int64_t OGGPacketSequence::get_final_granule_pos() const {
+int64_t OggPacketSequence::get_final_granule_pos() const {
if (!page_granule_positions.is_empty()) {
return page_granule_positions[page_granule_positions.size() - 1];
}
return -1;
}
-float OGGPacketSequence::get_length() const {
+float OggPacketSequence::get_length() const {
int64_t granule_pos = get_final_granule_pos();
if (granule_pos < 0) {
return 0;
@@ -106,33 +106,33 @@ float OGGPacketSequence::get_length() const {
return granule_pos / sampling_rate;
}
-Ref<OGGPacketSequencePlayback> OGGPacketSequence::instantiate_playback() {
- Ref<OGGPacketSequencePlayback> playback;
+Ref<OggPacketSequencePlayback> OggPacketSequence::instantiate_playback() {
+ Ref<OggPacketSequencePlayback> playback;
playback.instantiate();
- playback->ogg_packet_sequence = Ref<OGGPacketSequence>(this);
+ playback->ogg_packet_sequence = Ref<OggPacketSequence>(this);
playback->data_version = data_version;
return playback;
}
-void OGGPacketSequence::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_packet_data", "packet_data"), &OGGPacketSequence::set_packet_data);
- ClassDB::bind_method(D_METHOD("get_packet_data"), &OGGPacketSequence::get_packet_data);
+void OggPacketSequence::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_packet_data", "packet_data"), &OggPacketSequence::set_packet_data);
+ ClassDB::bind_method(D_METHOD("get_packet_data"), &OggPacketSequence::get_packet_data);
- ClassDB::bind_method(D_METHOD("set_packet_granule_positions", "granule_positions"), &OGGPacketSequence::set_packet_granule_positions);
- ClassDB::bind_method(D_METHOD("get_packet_granule_positions"), &OGGPacketSequence::get_packet_granule_positions);
+ ClassDB::bind_method(D_METHOD("set_packet_granule_positions", "granule_positions"), &OggPacketSequence::set_packet_granule_positions);
+ ClassDB::bind_method(D_METHOD("get_packet_granule_positions"), &OggPacketSequence::get_packet_granule_positions);
- ClassDB::bind_method(D_METHOD("set_sampling_rate", "sampling_rate"), &OGGPacketSequence::set_sampling_rate);
- ClassDB::bind_method(D_METHOD("get_sampling_rate"), &OGGPacketSequence::get_sampling_rate);
+ ClassDB::bind_method(D_METHOD("set_sampling_rate", "sampling_rate"), &OggPacketSequence::set_sampling_rate);
+ ClassDB::bind_method(D_METHOD("get_sampling_rate"), &OggPacketSequence::get_sampling_rate);
- ClassDB::bind_method(D_METHOD("get_length"), &OGGPacketSequence::get_length);
+ ClassDB::bind_method(D_METHOD("get_length"), &OggPacketSequence::get_length);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "packet_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_packet_data", "get_packet_data");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "granule_positions", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_packet_granule_positions", "get_packet_granule_positions");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sampling_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_sampling_rate", "get_sampling_rate");
}
-bool OGGPacketSequencePlayback::next_ogg_packet(ogg_packet **p_packet) const {
+bool OggPacketSequencePlayback::next_ogg_packet(ogg_packet **p_packet) const {
ERR_FAIL_COND_V(data_version != ogg_packet_sequence->data_version, false);
ERR_FAIL_COND_V(ogg_packet_sequence->page_data.is_empty(), false);
ERR_FAIL_COND_V(ogg_packet_sequence->page_granule_positions.is_empty(), false);
@@ -161,7 +161,7 @@ bool OGGPacketSequencePlayback::next_ogg_packet(ogg_packet **p_packet) const {
return true;
}
-uint32_t OGGPacketSequencePlayback::seek_page_internal(int64_t granule, uint32_t after_page_inclusive, uint32_t before_page_inclusive) {
+uint32_t OggPacketSequencePlayback::seek_page_internal(int64_t granule, uint32_t after_page_inclusive, uint32_t before_page_inclusive) {
// FIXME: This function needs better corner case handling.
if (before_page_inclusive == after_page_inclusive) {
return before_page_inclusive;
@@ -198,7 +198,7 @@ uint32_t OGGPacketSequencePlayback::seek_page_internal(int64_t granule, uint32_t
}
}
-bool OGGPacketSequencePlayback::seek_page(int64_t p_granule_pos) {
+bool OggPacketSequencePlayback::seek_page(int64_t p_granule_pos) {
int correct_page = seek_page_internal(p_granule_pos, 0, ogg_packet_sequence->page_data.size() - 1);
if (correct_page == -1) {
return false;
@@ -213,10 +213,10 @@ bool OGGPacketSequencePlayback::seek_page(int64_t p_granule_pos) {
return true;
}
-OGGPacketSequencePlayback::OGGPacketSequencePlayback() {
+OggPacketSequencePlayback::OggPacketSequencePlayback() {
packet = new ogg_packet();
}
-OGGPacketSequencePlayback::~OGGPacketSequencePlayback() {
+OggPacketSequencePlayback::~OggPacketSequencePlayback() {
delete packet;
}
diff --git a/modules/ogg/ogg_packet_sequence.h b/modules/ogg/ogg_packet_sequence.h
index 76b673c6ac..efd3b64a39 100644
--- a/modules/ogg/ogg_packet_sequence.h
+++ b/modules/ogg/ogg_packet_sequence.h
@@ -38,12 +38,12 @@
#include "core/variant/variant.h"
#include "thirdparty/libogg/ogg/ogg.h"
-class OGGPacketSequencePlayback;
+class OggPacketSequencePlayback;
-class OGGPacketSequence : public Resource {
- GDCLASS(OGGPacketSequence, Resource);
+class OggPacketSequence : public Resource {
+ GDCLASS(OggPacketSequence, Resource);
- friend class OGGPacketSequencePlayback;
+ friend class OggPacketSequencePlayback;
// List of pages, each of which is a list of packets on that page. The innermost PackedByteArrays contain complete ogg packets.
Vector<Vector<PackedByteArray>> page_data;
@@ -73,7 +73,7 @@ public:
void set_packet_granule_positions(const Array &p_granule_positions);
Array get_packet_granule_positions() const;
- // Sets a sampling rate associated with this object. OGGPacketSequence doesn't understand codecs,
+ // Sets a sampling rate associated with this object. OggPacketSequence doesn't understand codecs,
// so this value is naively stored as a convenience.
void set_sampling_rate(float p_sampling_rate);
@@ -86,18 +86,18 @@ public:
// Returns the granule position of the last page in this sequence.
int64_t get_final_granule_pos() const;
- Ref<OGGPacketSequencePlayback> instantiate_playback();
+ Ref<OggPacketSequencePlayback> instantiate_playback();
- OGGPacketSequence() {}
- virtual ~OGGPacketSequence() {}
+ OggPacketSequence() {}
+ virtual ~OggPacketSequence() {}
};
-class OGGPacketSequencePlayback : public RefCounted {
- GDCLASS(OGGPacketSequencePlayback, RefCounted);
+class OggPacketSequencePlayback : public RefCounted {
+ GDCLASS(OggPacketSequencePlayback, RefCounted);
- friend class OGGPacketSequence;
+ friend class OggPacketSequence;
- Ref<OGGPacketSequence> ogg_packet_sequence;
+ Ref<OggPacketSequence> ogg_packet_sequence;
mutable int64_t page_cursor = 0;
mutable int32_t packet_cursor = 0;
@@ -121,8 +121,8 @@ public:
// Returns true on success, false on failure.
bool seek_page(int64_t p_granule_pos);
- OGGPacketSequencePlayback();
- virtual ~OGGPacketSequencePlayback();
+ OggPacketSequencePlayback();
+ virtual ~OggPacketSequencePlayback();
};
#endif // OGG_PACKET_SEQUENCE_H
diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp
index 01f04aa3d5..aca6d1e1f8 100644
--- a/modules/ogg/register_types.cpp
+++ b/modules/ogg/register_types.cpp
@@ -37,8 +37,8 @@ void initialize_ogg_module(ModuleInitializationLevel p_level) {
return;
}
- GDREGISTER_CLASS(OGGPacketSequence);
- GDREGISTER_CLASS(OGGPacketSequencePlayback);
+ GDREGISTER_CLASS(OggPacketSequence);
+ GDREGISTER_CLASS(OggPacketSequencePlayback);
}
void uninitialize_ogg_module(ModuleInitializationLevel p_level) {
diff --git a/modules/openxr/action_map/openxr_interaction_profile.cpp b/modules/openxr/action_map/openxr_interaction_profile.cpp
index 342c36cdff..99d7a17acf 100644
--- a/modules/openxr/action_map/openxr_interaction_profile.cpp
+++ b/modules/openxr/action_map/openxr_interaction_profile.cpp
@@ -40,7 +40,7 @@ void OpenXRIPBinding::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_paths"), &OpenXRIPBinding::get_paths);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "paths", PROPERTY_HINT_ARRAY_TYPE, "STRING"), "set_paths", "get_paths");
- ClassDB::bind_method(D_METHOD("has_path"), &OpenXRIPBinding::has_path);
+ ClassDB::bind_method(D_METHOD("has_path", "path"), &OpenXRIPBinding::has_path);
ClassDB::bind_method(D_METHOD("add_path", "path"), &OpenXRIPBinding::add_path);
ClassDB::bind_method(D_METHOD("remove_path", "path"), &OpenXRIPBinding::remove_path);
}
diff --git a/modules/openxr/doc_classes/OpenXRIPBinding.xml b/modules/openxr/doc_classes/OpenXRIPBinding.xml
index 9e1176874a..f96637f2f5 100644
--- a/modules/openxr/doc_classes/OpenXRIPBinding.xml
+++ b/modules/openxr/doc_classes/OpenXRIPBinding.xml
@@ -24,7 +24,7 @@
</method>
<method name="has_path" qualifiers="const">
<return type="bool" />
- <argument index="0" name="arg0" type="String" />
+ <argument index="0" name="path" type="String" />
<description>
Returns [code]true[/code] if this input/output path is part of this binding.
</description>
diff --git a/modules/openxr/editor/openxr_action_map_editor.cpp b/modules/openxr/editor/openxr_action_map_editor.cpp
index 87b7f50224..0a2d0a3110 100644
--- a/modules/openxr/editor/openxr_action_map_editor.cpp
+++ b/modules/openxr/editor/openxr_action_map_editor.cpp
@@ -258,7 +258,7 @@ void OpenXRActionMapEditor::_load_action_map(const String p_path, bool p_create_
}
void OpenXRActionMapEditor::_on_save_action_map() {
- Error err = ResourceSaver::save(edited_path, action_map);
+ Error err = ResourceSaver::save(action_map, edited_path);
if (err != OK) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file: %s"), edited_path));
return;
diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.cpp b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
index 24ac5494dd..e2dc2d1b74 100644
--- a/modules/openxr/editor/openxr_interaction_profile_editor.cpp
+++ b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
@@ -169,9 +169,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
Button *path_add = memnew(Button);
path_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
path_add->set_flat(true);
- Vector<Variant> add_binds;
- add_binds.push_back(String(p_io_path->openxr_path));
- path_add->connect("pressed", callable_mp(this, &OpenXRInteractionProfileEditor::select_action_for), add_binds);
+ path_add->connect("pressed", callable_mp(this, &OpenXRInteractionProfileEditor::select_action_for).bind(String(p_io_path->openxr_path)));
path_hb->add_child(path_add);
if (interaction_profile.is_valid()) {
@@ -198,10 +196,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
Button *action_rem = memnew(Button);
action_rem->set_flat(true);
action_rem->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- Vector<Variant> remove_binds;
- remove_binds.push_back(action->get_name_with_set());
- remove_binds.push_back(String(p_io_path->openxr_path));
- action_rem->connect("pressed", callable_mp((OpenXRInteractionProfileEditorBase *)this, &OpenXRInteractionProfileEditorBase::_remove_binding), remove_binds);
+ action_rem->connect("pressed", callable_mp((OpenXRInteractionProfileEditorBase *)this, &OpenXRInteractionProfileEditorBase::_remove_binding).bind(action->get_name_with_set(), String(p_io_path->openxr_path)));
action_hb->add_child(action_rem);
}
}
diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp
index c2a2965200..80e58044d5 100644
--- a/modules/openxr/editor/openxr_select_action_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_action_dialog.cpp
@@ -96,11 +96,9 @@ void OpenXRSelectActionDialog::open() {
Button *action_button = memnew(Button);
String action_name = action->get_name_with_set();
- Vector<Variant> binds;
- binds.push_back(action_name);
action_button->set_flat(true);
action_button->set_text(action->get_name() + ": " + action->get_localized_name());
- action_button->connect("pressed", callable_mp(this, &OpenXRSelectActionDialog::_on_select_action), binds);
+ action_button->connect("pressed", callable_mp(this, &OpenXRSelectActionDialog::_on_select_action).bind(action_name));
action_hb->add_child(action_button);
action_buttons[action_name] = action_button->get_path();
diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
index 12b110f146..23b025db08 100644
--- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
@@ -80,11 +80,9 @@ void OpenXRSelectInteractionProfileDialog::open(PackedStringArray p_do_not_inclu
String path = interaction_profiles[i];
if (!p_do_not_include.has(path)) {
Button *ip_button = memnew(Button);
- Vector<Variant> binds;
- binds.push_back(path);
ip_button->set_flat(true);
ip_button->set_text(OpenXRDefs::get_profile(path)->display_name);
- ip_button->connect("pressed", callable_mp(this, &OpenXRSelectInteractionProfileDialog::_on_select_interaction_profile), binds);
+ ip_button->connect("pressed", callable_mp(this, &OpenXRSelectInteractionProfileDialog::_on_select_interaction_profile).bind(path));
main_vb->add_child(ip_button);
ip_buttons[path] = ip_button->get_path();
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index 938b017e3a..92d074cb75 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -58,19 +58,14 @@ bool OpenXRAPI::openxr_is_enabled(bool p_check_run_in_editor) {
// @TODO we need an overrule switch so we can force enable openxr, i.e run "godot --openxr_enabled"
if (Engine::get_singleton()->is_editor_hint() && p_check_run_in_editor) {
-#ifdef TOOLS_ENABLED
// Disabled for now, using XR inside of the editor we'll be working on during the coming months.
return false;
-
- // bool enabled = GLOBAL_GET("xr/openxr/in_editor"); // EDITOR_GET("xr/openxr/in_editor");
- // return enabled;
-#else
- // we should never get here, editor hint won't be true if the editor isn't compiled in.
- return false;
-#endif
} else {
- bool enabled = GLOBAL_GET("xr/openxr/enabled");
- return enabled;
+ if (XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT) {
+ return GLOBAL_GET("xr/openxr/enabled");
+ } else {
+ return XRServer::get_xr_mode() == XRServer::XRMODE_ON;
+ }
}
}
diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp
index 1447be5c77..6c2f08e21d 100644
--- a/modules/openxr/openxr_interface.cpp
+++ b/modules/openxr/openxr_interface.cpp
@@ -123,7 +123,7 @@ void OpenXRInterface::_load_action_map() {
#ifdef TOOLS_ENABLED
// Save our action sets so our user can
action_map->set_path(default_tres_name, true);
- ResourceSaver::save(default_tres_name, action_map);
+ ResourceSaver::save(action_map, default_tres_name);
#endif
}
}
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index bbe92139e0..67ce37219b 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -194,6 +194,7 @@ Error RegEx::compile(const String &p_pattern) {
Ref<RegExMatch> RegEx::search(const String &p_subject, int p_offset, int p_end) const {
ERR_FAIL_COND_V(!is_valid(), nullptr);
+ ERR_FAIL_COND_V_MSG(p_offset < 0, nullptr, "RegEx search offset must be >= 0");
Ref<RegExMatch> result = memnew(RegExMatch);
@@ -258,6 +259,8 @@ Ref<RegExMatch> RegEx::search(const String &p_subject, int p_offset, int p_end)
}
Array RegEx::search_all(const String &p_subject, int p_offset, int p_end) const {
+ ERR_FAIL_COND_V_MSG(p_offset < 0, Array(), "RegEx search offset must be >= 0");
+
int last_end = -1;
Array result;
Ref<RegExMatch> match = search(p_subject, p_offset, p_end);
@@ -274,6 +277,7 @@ Array RegEx::search_all(const String &p_subject, int p_offset, int p_end) const
String RegEx::sub(const String &p_subject, const String &p_replacement, bool p_all, int p_offset, int p_end) const {
ERR_FAIL_COND_V(!is_valid(), String());
+ ERR_FAIL_COND_V_MSG(p_offset < 0, String(), "RegEx sub offset must be >= 0");
// safety_zone is the number of chars we allocate in addition to the number of chars expected in order to
// guard against the PCRE API writing one additional \0 at the end. PCRE's API docs are unclear on whether
diff --git a/modules/regex/tests/test_regex.h b/modules/regex/tests/test_regex.h
index 3f500e7b2f..91af393db1 100644
--- a/modules/regex/tests/test_regex.h
+++ b/modules/regex/tests/test_regex.h
@@ -130,16 +130,6 @@ TEST_CASE("[RegEx] Empty Pattern") {
CHECK(re.is_valid());
}
-TEST_CASE("[RegEx] Invalid offset") {
- const String s = "Godot";
-
- RegEx re("o");
- REQUIRE(re.is_valid());
- CHECK(re.search(s, -1) == nullptr);
- CHECK(re.search_all(s, -1).size() == 0);
- CHECK(re.sub(s, "", true, -1) == "");
-}
-
TEST_CASE("[RegEx] Invalid end position") {
const String s = "Godot";
diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub
index 2d764a4006..d212fe62b4 100644
--- a/modules/text_server_adv/SCsub
+++ b/modules/text_server_adv/SCsub
@@ -117,11 +117,11 @@ if env["builtin_harfbuzz"]:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env_harfbuzz.Append(CPPPATH=["#thirdparty/harfbuzz/src"])
+ env_harfbuzz.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
env_harfbuzz.Append(CCFLAGS=["-DHAVE_ICU"])
if env["builtin_icu"]:
- env_harfbuzz.Append(CPPPATH=["#thirdparty/icu4c/common/"])
+ env_harfbuzz.Prepend(CPPPATH=["#thirdparty/icu4c/common/"])
env_harfbuzz.Append(CCFLAGS=["-DU_HAVE_LIB_SUFFIX=1", "-DU_LIB_SUFFIX_C_NAME=_godot", "-DHAVE_ICU_BUILTIN"])
if freetype_enabled:
@@ -132,9 +132,9 @@ if env["builtin_harfbuzz"]:
]
)
if env["builtin_freetype"]:
- env_harfbuzz.Append(CPPPATH=["#thirdparty/freetype/include"])
+ env_harfbuzz.Prepend(CPPPATH=["#thirdparty/freetype/include"])
if env["builtin_graphite"]:
- env_harfbuzz.Append(CPPPATH=["#thirdparty/graphite/include"])
+ env_harfbuzz.Prepend(CPPPATH=["#thirdparty/graphite/include"])
env_harfbuzz.Append(CCFLAGS=["-DGRAPHITE2_STATIC"])
if env["platform"] == "android" or env["platform"] == "linuxbsd":
@@ -146,7 +146,7 @@ if env["builtin_harfbuzz"]:
else:
env_harfbuzz.Append(CCFLAGS=["-DHB_NO_MT"])
- env_text_server_adv.Append(CPPPATH=["#thirdparty/harfbuzz/src"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
lib = env_harfbuzz.add_library("harfbuzz_builtin", thirdparty_sources)
thirdparty_obj += lib
@@ -209,7 +209,7 @@ if env["builtin_graphite"] and freetype_enabled:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- env_graphite.Append(CPPPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
+ env_graphite.Prepend(CPPPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
env_graphite.Append(
CCFLAGS=[
"-DGRAPHITE2_STATIC",
@@ -447,11 +447,11 @@ if env["builtin_icu"]:
if env_icu["tools"]:
env_icu.Depends("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name)
env_icu.Command("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name, make_icu_data)
- env_text_server_adv.Append(CPPPATH=["#thirdparty/icu4c/"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"])
else:
thirdparty_sources += ["icu_data/icudata_stub.cpp"]
- env_icu.Append(CPPPATH=["#thirdparty/icu4c/common/"])
+ env_icu.Prepend(CPPPATH=["#thirdparty/icu4c/common/"])
env_icu.Append(
CXXFLAGS=[
"-DU_STATIC_IMPLEMENTATION",
@@ -480,7 +480,7 @@ if env["builtin_icu"]:
if env_text_server_adv["tools"]:
env_text_server_adv.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
- env_text_server_adv.Append(CPPPATH=["#thirdparty/icu4c/common/"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/common/"])
lib = env_icu.add_library("icu_builtin", thirdparty_sources)
thirdparty_obj += lib
@@ -504,13 +504,13 @@ if env["builtin_icu"]:
module_obj = []
if env["builtin_msdfgen"] and msdfgen_enabled:
- env_text_server_adv.Append(CPPPATH=["#thirdparty/msdfgen"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"])
if env["builtin_freetype"] and freetype_enabled:
- env_text_server_adv.Append(CPPPATH=["#thirdparty/freetype/include"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/freetype/include"])
if env["builtin_graphite"] and freetype_enabled:
- env_text_server_adv.Append(CPPPATH=["#thirdparty/graphite/include"])
+ env_text_server_adv.Prepend(CPPPATH=["#thirdparty/graphite/include"])
env_text_server_adv.add_source_files(module_obj, "*.cpp")
env.modules_sources += module_obj
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index fa234081f0..64788bfeff 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -1359,7 +1359,13 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
fd->underline_position = (-FT_MulFix(fd->face->underline_position, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
fd->underline_thickness = (FT_MulFix(fd->face->underline_thickness, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
+#if HB_VERSION_ATLEAST(3, 3, 0)
hb_font_set_synthetic_slant(fd->hb_handle, p_font_data->transform[0][1]);
+#else
+#ifndef _MSC_VER
+#warning Building with HarfBuzz < 3.3.0, synthetic slant offset correction disabled.
+#endif
+#endif
if (!p_font_data->face_init) {
// Get style flags and name.
@@ -1626,6 +1632,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
for (unsigned int i = 0; i < count; i++) {
Dictionary ftr;
+#if HB_VERSION_ATLEAST(2, 1, 0)
hb_ot_name_id_t lbl_id;
if (hb_ot_layout_feature_get_name_ids(hb_face, HB_OT_TAG_GSUB, i, &lbl_id, nullptr, nullptr, nullptr, nullptr)) {
PackedInt32Array lbl;
@@ -1635,6 +1642,11 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
hb_ot_name_get_utf32(hb_face, lbl_id, hb_language_from_string(TranslationServer::get_singleton()->get_tool_locale().ascii().get_data(), -1), &text_size, (uint32_t *)lbl.ptrw());
ftr["label"] = String((const char32_t *)lbl.ptr());
}
+#else
+#ifndef _MSC_VER
+#warning Building with HarfBuzz < 2.1.0, readable OpenType feature names disabled.
+#endif
+#endif
ftr["type"] = _get_tag_type(feature_tags[i]);
ftr["hidden"] = _get_tag_hidden(feature_tags[i]);
@@ -1649,6 +1661,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
for (unsigned int i = 0; i < count; i++) {
Dictionary ftr;
+#if HB_VERSION_ATLEAST(2, 1, 0)
hb_ot_name_id_t lbl_id;
if (hb_ot_layout_feature_get_name_ids(hb_face, HB_OT_TAG_GPOS, i, &lbl_id, nullptr, nullptr, nullptr, nullptr)) {
PackedInt32Array lbl;
@@ -1658,6 +1671,11 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
hb_ot_name_get_utf32(hb_face, lbl_id, hb_language_from_string(TranslationServer::get_singleton()->get_tool_locale().ascii().get_data(), -1), &text_size, (uint32_t *)lbl.ptrw());
ftr["label"] = String((const char32_t *)lbl.ptr());
}
+#else
+#ifndef _MSC_VER
+#warning Building with HarfBuzz < 2.1.0, readable OpenType feature names disabled.
+#endif
+#endif
ftr["type"] = _get_tag_type(feature_tags[i]);
ftr["hidden"] = _get_tag_hidden(feature_tags[i]);
diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub
index 121f38fcd5..ca9322e450 100644
--- a/modules/text_server_fb/SCsub
+++ b/modules/text_server_fb/SCsub
@@ -9,9 +9,9 @@ msdfgen_enabled = env.module_check_dependencies("text_server_fb", ["msdfgen"], T
env_text_server_fb = env_modules.Clone()
if env["builtin_msdfgen"] and msdfgen_enabled:
- env_text_server_fb.Append(CPPPATH=["#thirdparty/msdfgen"])
+ env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"])
if env["builtin_freetype"] and freetype_enabled:
- env_text_server_fb.Append(CPPPATH=["#thirdparty/freetype/include"])
+ env_text_server_fb.Prepend(CPPPATH=["#thirdparty/freetype/include"])
env_text_server_fb.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp
index 74a61bc4b7..1e9755f45f 100644
--- a/modules/visual_script/editor/visual_script_editor.cpp
+++ b/modules/visual_script/editor/visual_script_editor.cpp
@@ -687,8 +687,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_meta("__vnode", node);
gnode->set_name(itos(E));
- gnode->connect("dragged", callable_mp(this, &VisualScriptEditor::_node_moved), varray(E));
- gnode->connect("close_request", callable_mp(this, &VisualScriptEditor::_remove_node), varray(E), CONNECT_DEFERRED);
+ gnode->connect("dragged", callable_mp(this, &VisualScriptEditor::_node_moved).bind(E));
+ gnode->connect("close_request", callable_mp(this, &VisualScriptEditor::_remove_node).bind(E), CONNECT_DEFERRED);
{
Ref<VisualScriptFunction> v = node;
@@ -708,7 +708,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *btn = memnew(Button);
btn->set_text(TTR("Add Input Port"));
hbnc->add_child(btn);
- btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_input_port), varray(E), CONNECT_DEFERRED);
+ btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_input_port).bind(E), CONNECT_DEFERRED);
}
if (nd_list->is_output_port_editable()) {
if (nd_list->is_input_port_editable()) {
@@ -718,7 +718,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *btn = memnew(Button);
btn->set_text(TTR("Add Output Port"));
hbnc->add_child(btn);
- btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_output_port), varray(E), CONNECT_DEFERRED);
+ btn->connect("pressed", callable_mp(this, &VisualScriptEditor::_add_output_port).bind(E), CONNECT_DEFERRED);
}
gnode->add_child(hbnc);
} else if (Object::cast_to<VisualScriptExpression>(node.ptr())) {
@@ -728,7 +728,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
line_edit->set_expand_to_text_length_enabled(true);
line_edit->add_theme_font_override("font", get_theme_font(SNAME("source"), SNAME("EditorFonts")));
gnode->add_child(line_edit);
- line_edit->connect("text_changed", callable_mp(this, &VisualScriptEditor::_expression_text_changed), varray(E));
+ line_edit->connect("text_changed", callable_mp(this, &VisualScriptEditor::_expression_text_changed).bind(E));
} else {
String text = node->get_text();
if (!text.is_empty()) {
@@ -744,7 +744,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_comment(true);
gnode->set_resizable(true);
gnode->set_custom_minimum_size(vsc->get_size() * EDSCALE);
- gnode->connect("resize_request", callable_mp(this, &VisualScriptEditor::_comment_node_resized), varray(E));
+ gnode->connect("resize_request", callable_mp(this, &VisualScriptEditor::_comment_node_resized).bind(E));
}
if (node_styles.has(node->get_category())) {
@@ -847,8 +847,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
name_box->set_custom_minimum_size(Size2(60 * EDSCALE, 0));
name_box->set_text(left_name);
name_box->set_expand_to_text_length_enabled(true);
- name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size), varray(E));
- name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out), varray(name_box, E, i, true));
+ name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size).bind(E));
+ name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out).bind(name_box, E, i, true));
} else {
hbc->add_child(memnew(Label(left_name)));
}
@@ -861,13 +861,13 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
opbtn->select(left_type);
opbtn->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
hbc->add_child(opbtn);
- opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type), varray(E, i, true), CONNECT_DEFERRED);
+ opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type).bind(E, i, true), CONNECT_DEFERRED);
}
Button *rmbtn = memnew(Button);
rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
hbc->add_child(rmbtn);
- rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_input_port), varray(E, i), CONNECT_DEFERRED);
+ rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_input_port).bind(E, i), CONNECT_DEFERRED);
} else {
hbc->add_child(memnew(Label(left_name)));
}
@@ -886,7 +886,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
if (left_type == Variant::COLOR) {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- button->connect("draw", callable_mp(this, &VisualScriptEditor::_draw_color_over_button), varray(button, value));
+ button->connect("draw", callable_mp(this, &VisualScriptEditor::_draw_color_over_button).bind(button, value));
} else if (left_type == Variant::OBJECT && Ref<Resource>(value).is_valid()) {
Ref<Resource> res = value;
Array arr;
@@ -941,7 +941,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
} else {
button->set_text(value);
}
- button->connect("pressed", callable_mp(this, &VisualScriptEditor::_default_value_edited), varray(button, E, i));
+ button->connect("pressed", callable_mp(this, &VisualScriptEditor::_default_value_edited).bind(button, E, i));
hbc2->add_child(button);
}
} else {
@@ -965,7 +965,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Button *rmbtn = memnew(Button);
rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
hbc->add_child(rmbtn);
- rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_output_port), varray(E, i), CONNECT_DEFERRED);
+ rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_output_port).bind(E, i), CONNECT_DEFERRED);
if (nd_list->is_output_port_type_editable()) {
OptionButton *opbtn = memnew(OptionButton);
@@ -975,7 +975,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
opbtn->select(right_type);
opbtn->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
hbc->add_child(opbtn);
- opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type), varray(E, i, false), CONNECT_DEFERRED);
+ opbtn->connect("item_selected", callable_mp(this, &VisualScriptEditor::_change_port_type).bind(E, i, false), CONNECT_DEFERRED);
}
if (nd_list->is_output_port_name_editable()) {
@@ -984,8 +984,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
name_box->set_custom_minimum_size(Size2(60 * EDSCALE, 0));
name_box->set_text(right_name);
name_box->set_expand_to_text_length_enabled(true);
- name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size), varray(E));
- name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out), varray(name_box, E, i, false));
+ name_box->connect("resized", callable_mp(this, &VisualScriptEditor::_update_node_size).bind(E));
+ name_box->connect("focus_exited", callable_mp(this, &VisualScriptEditor::_port_name_focus_out).bind(name_box, E, i, false));
} else {
hbc->add_child(memnew(Label(right_name)));
}
@@ -1470,7 +1470,7 @@ void VisualScriptEditor::_add_func_input() {
func_input_vbox->add_child(hbox);
hbox->set_meta("id", hbox->get_index());
- delete_button->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_func_input), varray(hbox));
+ delete_button->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_func_input).bind(hbox));
name_box->select_all();
name_box->grab_focus();
@@ -3988,9 +3988,9 @@ void VisualScriptEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_members));
- variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_graph), varray(-1), CONNECT_DEFERRED);
+ variable_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_graph).bind(-1), CONNECT_DEFERRED);
signal_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_members));
- signal_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_graph), varray(-1), CONNECT_DEFERRED);
+ signal_editor->connect("changed", callable_mp(this, &VisualScriptEditor::_update_graph).bind(-1), CONNECT_DEFERRED);
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
@@ -4608,7 +4608,7 @@ VisualScriptEditor::VisualScriptEditor() {
members->set_hide_root(true);
members->connect("button_clicked", callable_mp(this, &VisualScriptEditor::_member_button));
members->connect("item_edited", callable_mp(this, &VisualScriptEditor::_member_edited));
- members->connect("cell_selected", callable_mp(this, &VisualScriptEditor::_member_selected), varray(), CONNECT_DEFERRED);
+ members->connect("cell_selected", callable_mp(this, &VisualScriptEditor::_member_selected), CONNECT_DEFERRED);
members->connect("gui_input", callable_mp(this, &VisualScriptEditor::_members_gui_input));
members->connect("item_mouse_selected", callable_mp(this, &VisualScriptEditor::_member_rmb_selected));
members->set_allow_rmb_select(true);
diff --git a/modules/visual_script/editor/visual_script_property_selector.cpp b/modules/visual_script/editor/visual_script_property_selector.cpp
index f98ce5bb26..712c89368b 100644
--- a/modules/visual_script/editor/visual_script_property_selector.cpp
+++ b/modules/visual_script/editor/visual_script_property_selector.cpp
@@ -39,6 +39,7 @@
#include "editor/doc_tools.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
diff --git a/modules/visual_script/editor/visual_script_property_selector.h b/modules/visual_script/editor/visual_script_property_selector.h
index 41f8eea735..4de626467e 100644
--- a/modules/visual_script/editor/visual_script_property_selector.h
+++ b/modules/visual_script/editor/visual_script_property_selector.h
@@ -33,8 +33,8 @@
#include "../visual_script.h"
#include "editor/editor_help.h"
-#include "editor/property_editor.h"
#include "scene/gui/rich_text_label.h"
+#include "scene/gui/tree.h"
class VisualScriptPropertySelector : public ConfirmationDialog {
GDCLASS(VisualScriptPropertySelector, ConfirmationDialog);
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 742fa75bb7..4215a979e0 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -279,7 +279,7 @@ void VisualScript::add_node(int p_id, const Ref<VisualScriptNode> &p_node, const
nd.pos = p_pos;
Ref<VisualScriptNode> vsn = p_node;
- vsn->connect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed), varray(p_id));
+ vsn->connect("ports_changed", callable_mp(this, &VisualScript::_node_ports_changed).bind(p_id));
vsn->script_used = Ref<VisualScript>(this);
vsn->validate_input_default_values(); // Validate when fully loaded.
@@ -948,7 +948,7 @@ bool VisualScript::are_subnodes_edited() const {
}
#endif
-const Vector<Multiplayer::RPCConfig> VisualScript::get_rpc_methods() const {
+const Variant VisualScript::get_rpc_config() const {
return rpc_functions;
}
@@ -1012,22 +1012,16 @@ void VisualScript::_set_data(const Dictionary &p_data) {
for (const KeyValue<StringName, Function> &E : functions) {
if (E.value.func_id >= 0 && nodes.has(E.value.func_id)) {
Ref<VisualScriptFunction> vsf = nodes[E.value.func_id].node;
- if (vsf.is_valid()) {
- if (vsf->get_rpc_mode() != Multiplayer::RPC_MODE_DISABLED) {
- Multiplayer::RPCConfig nd;
- nd.name = E.key;
- nd.rpc_mode = vsf->get_rpc_mode();
- nd.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE; // TODO
- if (rpc_functions.find(nd) == -1) {
- rpc_functions.push_back(nd);
- }
- }
+ if (!vsf.is_valid() || vsf->get_rpc_mode() == MultiplayerAPI::RPC_MODE_DISABLED) {
+ continue;
}
+ Dictionary nd;
+ nd["rpc_mode"] = vsf->get_rpc_mode();
+ nd["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE; // TODO
+ nd["call_local"] = false; // TODO
+ rpc_functions[E.key] = nd;
}
}
-
- // Sort so we are 100% that they are always the same.
- rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
}
Dictionary VisualScript::_get_data() const {
@@ -1811,8 +1805,8 @@ Ref<Script> VisualScriptInstance::get_script() const {
return script;
}
-const Vector<Multiplayer::RPCConfig> VisualScriptInstance::get_rpc_methods() const {
- return script->get_rpc_methods();
+const Variant VisualScriptInstance::get_rpc_config() const {
+ return script->get_rpc_config();
}
void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_owner) {
@@ -2128,7 +2122,14 @@ void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p
binds.push_back(p_binds[i]);
}
binds.push_back(Ref<VisualScriptFunctionState>(this)); //add myself on the back to avoid dying from unreferencing
- p_obj->connect(p_signal, Callable(this, "_signal_callback"), binds, CONNECT_ONESHOT);
+
+ Vector<const Variant *> bind_ptrs;
+ bind_ptrs.resize(p_binds.size());
+ for (int i = 0; i < bind_ptrs.size(); i++) {
+ bind_ptrs.write[i] = &binds.write[i];
+ }
+
+ p_obj->connect(p_signal, Callable(this, "_signal_callback").bindp((const Variant **)bind_ptrs.ptr(), bind_ptrs.size()), CONNECT_ONESHOT);
}
bool VisualScriptFunctionState::is_valid() const {
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 716310f59b..14cb14e8d9 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -235,7 +235,7 @@ private:
HashMap<StringName, Function> functions;
HashMap<StringName, Variable> variables;
HashMap<StringName, Vector<Argument>> custom_signals;
- Vector<Multiplayer::RPCConfig> rpc_functions;
+ Dictionary rpc_functions;
HashMap<Object *, VisualScriptInstance *> instances;
@@ -363,7 +363,7 @@ public:
virtual int get_member_line(const StringName &p_member) const override;
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
+ virtual const Variant get_rpc_config() const override;
#ifdef TOOLS_ENABLED
virtual bool are_subnodes_edited() const;
@@ -444,7 +444,7 @@ public:
virtual ScriptLanguage *get_language();
- virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
+ virtual const Variant get_rpc_config() const;
VisualScriptInstance();
~VisualScriptInstance();
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 41f5b28677..5907e6a489 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -90,7 +90,7 @@ bool VisualScriptFunction::_set(const StringName &p_name, const Variant &p_value
}
if (p_name == "rpc/mode") {
- rpc_mode = Multiplayer::RPCMode(int(p_value));
+ rpc_mode = MultiplayerAPI::RPCMode(int(p_value));
return true;
}
@@ -261,11 +261,11 @@ int VisualScriptFunction::get_argument_count() const {
return arguments.size();
}
-void VisualScriptFunction::set_rpc_mode(Multiplayer::RPCMode p_mode) {
+void VisualScriptFunction::set_rpc_mode(MultiplayerAPI::RPCMode p_mode) {
rpc_mode = p_mode;
}
-Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const {
+MultiplayerAPI::RPCMode VisualScriptFunction::get_rpc_mode() const {
return rpc_mode;
}
@@ -311,14 +311,14 @@ void VisualScriptFunction::reset_state() {
stack_size = 256;
stack_less = false;
sequenced = true;
- rpc_mode = Multiplayer::RPC_MODE_DISABLED;
+ rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
}
VisualScriptFunction::VisualScriptFunction() {
stack_size = 256;
stack_less = false;
sequenced = true;
- rpc_mode = Multiplayer::RPC_MODE_DISABLED;
+ rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
}
void VisualScriptFunction::set_stack_less(bool p_enable) {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index 18573f8682..35e3c490cd 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -33,6 +33,7 @@
#include "core/object/gdvirtual.gen.inc"
#include "core/object/script_language.h"
+#include "scene/main/multiplayer_api.h"
#include "visual_script.h"
class VisualScriptFunction : public VisualScriptNode {
@@ -49,7 +50,7 @@ class VisualScriptFunction : public VisualScriptNode {
bool stack_less;
int stack_size;
- Multiplayer::RPCMode rpc_mode;
+ MultiplayerAPI::RPCMode rpc_mode;
bool sequenced;
protected:
@@ -90,8 +91,8 @@ public:
void set_stack_size(int p_size);
int get_stack_size() const;
- void set_rpc_mode(Multiplayer::RPCMode p_mode);
- Multiplayer::RPCMode get_rpc_mode() const;
+ void set_rpc_mode(MultiplayerAPI::RPCMode p_mode);
+ MultiplayerAPI::RPCMode get_rpc_mode() const;
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 76f7317daa..8315eea614 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -34,7 +34,7 @@
#include "core/variant/typed_array.h"
#include "thirdparty/libogg/ogg/ogg.h"
-int AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
+int AudioStreamPlaybackOggVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
ERR_FAIL_COND_V(!ready, 0);
if (!active) {
@@ -141,7 +141,7 @@ int AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fram
return p_frames - todo;
}
-int AudioStreamPlaybackOGGVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p_frames) {
+int AudioStreamPlaybackOggVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p_frames) {
ERR_FAIL_COND_V(!ready, 0);
if (!have_samples_left) {
ogg_packet *packet = nullptr;
@@ -184,11 +184,11 @@ int AudioStreamPlaybackOGGVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p
return frames;
}
-float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
+float AudioStreamPlaybackOggVorbis::get_stream_sampling_rate() {
return vorbis_data->get_sampling_rate();
}
-bool AudioStreamPlaybackOGGVorbis::_alloc_vorbis() {
+bool AudioStreamPlaybackOggVorbis::_alloc_vorbis() {
vorbis_info_init(&info);
info_is_allocated = true;
vorbis_comment_init(&comment);
@@ -223,7 +223,7 @@ bool AudioStreamPlaybackOGGVorbis::_alloc_vorbis() {
return true;
}
-void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
+void AudioStreamPlaybackOggVorbis::start(float p_from_pos) {
ERR_FAIL_COND(!ready);
loop_fade_remaining = FADE_SIZE;
active = true;
@@ -232,27 +232,27 @@ void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
begin_resample();
}
-void AudioStreamPlaybackOGGVorbis::stop() {
+void AudioStreamPlaybackOggVorbis::stop() {
active = false;
}
-bool AudioStreamPlaybackOGGVorbis::is_playing() const {
+bool AudioStreamPlaybackOggVorbis::is_playing() const {
return active;
}
-int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
+int AudioStreamPlaybackOggVorbis::get_loop_count() const {
return loops;
}
-float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
+float AudioStreamPlaybackOggVorbis::get_playback_position() const {
return float(frames_mixed) / vorbis_data->get_sampling_rate();
}
-void AudioStreamPlaybackOGGVorbis::tag_used_streams() {
+void AudioStreamPlaybackOggVorbis::tag_used_streams() {
vorbis_stream->tag_used(get_playback_position());
}
-void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
+void AudioStreamPlaybackOggVorbis::seek(float p_time) {
ERR_FAIL_COND(!ready);
ERR_FAIL_COND(vorbis_stream.is_null());
if (!active) {
@@ -370,7 +370,7 @@ void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
}
}
-AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
+AudioStreamPlaybackOggVorbis::~AudioStreamPlaybackOggVorbis() {
if (block_is_allocated) {
vorbis_block_clear(&block);
}
@@ -385,13 +385,13 @@ AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
}
}
-Ref<AudioStreamPlayback> AudioStreamOGGVorbis::instantiate_playback() {
- Ref<AudioStreamPlaybackOGGVorbis> ovs;
+Ref<AudioStreamPlayback> AudioStreamOggVorbis::instantiate_playback() {
+ Ref<AudioStreamPlaybackOggVorbis> ovs;
ERR_FAIL_COND_V(packet_sequence.is_null(), nullptr);
ovs.instantiate();
- ovs->vorbis_stream = Ref<AudioStreamOGGVorbis>(this);
+ ovs->vorbis_stream = Ref<AudioStreamOggVorbis>(this);
ovs->vorbis_data = packet_sequence;
ovs->frames_mixed = 0;
ovs->active = false;
@@ -403,11 +403,11 @@ Ref<AudioStreamPlayback> AudioStreamOGGVorbis::instantiate_playback() {
return nullptr;
}
-String AudioStreamOGGVorbis::get_stream_name() const {
+String AudioStreamOggVorbis::get_stream_name() const {
return ""; //return stream_name;
}
-void AudioStreamOGGVorbis::maybe_update_info() {
+void AudioStreamOggVorbis::maybe_update_info() {
ERR_FAIL_COND(packet_sequence.is_null());
vorbis_info info;
@@ -417,7 +417,7 @@ void AudioStreamOGGVorbis::maybe_update_info() {
vorbis_info_init(&info);
vorbis_comment_init(&comment);
- Ref<OGGPacketSequencePlayback> packet_sequence_playback = packet_sequence->instantiate_playback();
+ Ref<OggPacketSequencePlayback> packet_sequence_playback = packet_sequence->instantiate_playback();
for (int i = 0; i < 3; i++) {
ogg_packet *packet;
@@ -443,90 +443,90 @@ void AudioStreamOGGVorbis::maybe_update_info() {
vorbis_info_clear(&info);
}
-void AudioStreamOGGVorbis::set_packet_sequence(Ref<OGGPacketSequence> p_packet_sequence) {
+void AudioStreamOggVorbis::set_packet_sequence(Ref<OggPacketSequence> p_packet_sequence) {
packet_sequence = p_packet_sequence;
if (packet_sequence.is_valid()) {
maybe_update_info();
}
}
-Ref<OGGPacketSequence> AudioStreamOGGVorbis::get_packet_sequence() const {
+Ref<OggPacketSequence> AudioStreamOggVorbis::get_packet_sequence() const {
return packet_sequence;
}
-void AudioStreamOGGVorbis::set_loop(bool p_enable) {
+void AudioStreamOggVorbis::set_loop(bool p_enable) {
loop = p_enable;
}
-bool AudioStreamOGGVorbis::has_loop() const {
+bool AudioStreamOggVorbis::has_loop() const {
return loop;
}
-void AudioStreamOGGVorbis::set_loop_offset(float p_seconds) {
+void AudioStreamOggVorbis::set_loop_offset(float p_seconds) {
loop_offset = p_seconds;
}
-float AudioStreamOGGVorbis::get_loop_offset() const {
+float AudioStreamOggVorbis::get_loop_offset() const {
return loop_offset;
}
-float AudioStreamOGGVorbis::get_length() const {
+float AudioStreamOggVorbis::get_length() const {
ERR_FAIL_COND_V(packet_sequence.is_null(), 0);
return packet_sequence->get_length();
}
-void AudioStreamOGGVorbis::set_bpm(double p_bpm) {
+void AudioStreamOggVorbis::set_bpm(double p_bpm) {
ERR_FAIL_COND(p_bpm < 0);
bpm = p_bpm;
emit_changed();
}
-double AudioStreamOGGVorbis::get_bpm() const {
+double AudioStreamOggVorbis::get_bpm() const {
return bpm;
}
-void AudioStreamOGGVorbis::set_beat_count(int p_beat_count) {
+void AudioStreamOggVorbis::set_beat_count(int p_beat_count) {
ERR_FAIL_COND(p_beat_count < 0);
beat_count = p_beat_count;
emit_changed();
}
-int AudioStreamOGGVorbis::get_beat_count() const {
+int AudioStreamOggVorbis::get_beat_count() const {
return beat_count;
}
-void AudioStreamOGGVorbis::set_bar_beats(int p_bar_beats) {
+void AudioStreamOggVorbis::set_bar_beats(int p_bar_beats) {
ERR_FAIL_COND(p_bar_beats < 2);
bar_beats = p_bar_beats;
emit_changed();
}
-int AudioStreamOGGVorbis::get_bar_beats() const {
+int AudioStreamOggVorbis::get_bar_beats() const {
return bar_beats;
}
-bool AudioStreamOGGVorbis::is_monophonic() const {
+bool AudioStreamOggVorbis::is_monophonic() const {
return false;
}
-void AudioStreamOGGVorbis::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_packet_sequence", "packet_sequence"), &AudioStreamOGGVorbis::set_packet_sequence);
- ClassDB::bind_method(D_METHOD("get_packet_sequence"), &AudioStreamOGGVorbis::get_packet_sequence);
+void AudioStreamOggVorbis::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_packet_sequence", "packet_sequence"), &AudioStreamOggVorbis::set_packet_sequence);
+ ClassDB::bind_method(D_METHOD("get_packet_sequence"), &AudioStreamOggVorbis::get_packet_sequence);
- ClassDB::bind_method(D_METHOD("set_loop", "enable"), &AudioStreamOGGVorbis::set_loop);
- ClassDB::bind_method(D_METHOD("has_loop"), &AudioStreamOGGVorbis::has_loop);
+ ClassDB::bind_method(D_METHOD("set_loop", "enable"), &AudioStreamOggVorbis::set_loop);
+ ClassDB::bind_method(D_METHOD("has_loop"), &AudioStreamOggVorbis::has_loop);
- ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOGGVorbis::set_loop_offset);
- ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOGGVorbis::get_loop_offset);
+ ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOggVorbis::set_loop_offset);
+ ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOggVorbis::get_loop_offset);
- ClassDB::bind_method(D_METHOD("set_bpm", "bpm"), &AudioStreamOGGVorbis::set_bpm);
- ClassDB::bind_method(D_METHOD("get_bpm"), &AudioStreamOGGVorbis::get_bpm);
+ ClassDB::bind_method(D_METHOD("set_bpm", "bpm"), &AudioStreamOggVorbis::set_bpm);
+ ClassDB::bind_method(D_METHOD("get_bpm"), &AudioStreamOggVorbis::get_bpm);
- ClassDB::bind_method(D_METHOD("set_beat_count", "count"), &AudioStreamOGGVorbis::set_beat_count);
- ClassDB::bind_method(D_METHOD("get_beat_count"), &AudioStreamOGGVorbis::get_beat_count);
+ ClassDB::bind_method(D_METHOD("set_beat_count", "count"), &AudioStreamOggVorbis::set_beat_count);
+ ClassDB::bind_method(D_METHOD("get_beat_count"), &AudioStreamOggVorbis::get_beat_count);
- ClassDB::bind_method(D_METHOD("set_bar_beats", "count"), &AudioStreamOGGVorbis::set_bar_beats);
- ClassDB::bind_method(D_METHOD("get_bar_beats"), &AudioStreamOGGVorbis::get_bar_beats);
+ ClassDB::bind_method(D_METHOD("set_bar_beats", "count"), &AudioStreamOggVorbis::set_bar_beats);
+ ClassDB::bind_method(D_METHOD("get_bar_beats"), &AudioStreamOggVorbis::get_bar_beats);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "packet_sequence", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_packet_sequence", "get_packet_sequence");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bpm", PROPERTY_HINT_RANGE, "0,400,0.01,or_greater"), "set_bpm", "get_bpm");
@@ -536,6 +536,6 @@ void AudioStreamOGGVorbis::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
}
-AudioStreamOGGVorbis::AudioStreamOGGVorbis() {}
+AudioStreamOggVorbis::AudioStreamOggVorbis() {}
-AudioStreamOGGVorbis::~AudioStreamOGGVorbis() {}
+AudioStreamOggVorbis::~AudioStreamOggVorbis() {}
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 9b6d928d87..0350e1f761 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -36,10 +36,10 @@
#include "servers/audio/audio_stream.h"
#include "thirdparty/libvorbis/vorbis/codec.h"
-class AudioStreamOGGVorbis;
+class AudioStreamOggVorbis;
-class AudioStreamPlaybackOGGVorbis : public AudioStreamPlaybackResampled {
- GDCLASS(AudioStreamPlaybackOGGVorbis, AudioStreamPlaybackResampled);
+class AudioStreamPlaybackOggVorbis : public AudioStreamPlaybackResampled {
+ GDCLASS(AudioStreamPlaybackOggVorbis, AudioStreamPlaybackResampled);
uint32_t frames_mixed = 0;
bool active = false;
@@ -66,11 +66,11 @@ class AudioStreamPlaybackOGGVorbis : public AudioStreamPlaybackResampled {
bool have_samples_left = false;
bool have_packets_left = false;
- friend class AudioStreamOGGVorbis;
+ friend class AudioStreamOggVorbis;
- Ref<OGGPacketSequence> vorbis_data;
- Ref<OGGPacketSequencePlayback> vorbis_data_playback;
- Ref<AudioStreamOGGVorbis> vorbis_stream;
+ Ref<OggPacketSequence> vorbis_data;
+ Ref<OggPacketSequencePlayback> vorbis_data_playback;
+ Ref<AudioStreamOggVorbis> vorbis_stream;
int _mix_frames(AudioFrame *p_buffer, int p_frames);
int _mix_frames_vorbis(AudioFrame *p_buffer, int p_frames);
@@ -94,16 +94,16 @@ public:
virtual void tag_used_streams() override;
- AudioStreamPlaybackOGGVorbis() {}
- ~AudioStreamPlaybackOGGVorbis();
+ AudioStreamPlaybackOggVorbis() {}
+ ~AudioStreamPlaybackOggVorbis();
};
-class AudioStreamOGGVorbis : public AudioStream {
- GDCLASS(AudioStreamOGGVorbis, AudioStream);
+class AudioStreamOggVorbis : public AudioStream {
+ GDCLASS(AudioStreamOggVorbis, AudioStream);
OBJ_SAVE_TYPE(AudioStream); // Saves derived classes with common type so they can be interchanged.
RES_BASE_EXTENSION("oggvorbisstr");
- friend class AudioStreamPlaybackOGGVorbis;
+ friend class AudioStreamPlaybackOggVorbis;
int channels = 1;
float length = 0.0;
@@ -114,7 +114,7 @@ class AudioStreamOGGVorbis : public AudioStream {
// Also causes allocation and deallocation.
void maybe_update_info();
- Ref<OGGPacketSequence> packet_sequence;
+ Ref<OggPacketSequence> packet_sequence;
double bpm = 0;
int beat_count = 0;
@@ -142,15 +142,15 @@ public:
virtual Ref<AudioStreamPlayback> instantiate_playback() override;
virtual String get_stream_name() const override;
- void set_packet_sequence(Ref<OGGPacketSequence> p_packet_sequence);
- Ref<OGGPacketSequence> get_packet_sequence() const;
+ void set_packet_sequence(Ref<OggPacketSequence> p_packet_sequence);
+ Ref<OggPacketSequence> get_packet_sequence() const;
virtual float get_length() const override; //if supported, otherwise return 0
virtual bool is_monophonic() const override;
- AudioStreamOGGVorbis();
- virtual ~AudioStreamOGGVorbis();
+ AudioStreamOggVorbis();
+ virtual ~AudioStreamOggVorbis();
};
#endif // AUDIO_STREAM_OGG_VORBIS_H
diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py
index 978eccb29f..7ce885a37a 100644
--- a/modules/vorbis/config.py
+++ b/modules/vorbis/config.py
@@ -8,8 +8,8 @@ def configure(env):
def get_doc_classes():
return [
- "AudioStreamOGGVorbis",
- "AudioStreamPlaybackOGGVorbis",
+ "AudioStreamOggVorbis",
+ "AudioStreamPlaybackOggVorbis",
]
diff --git a/modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml
index f87296dcd8..225ea4e6ae 100644
--- a/modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="AudioStreamOggVorbis" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
</brief_description>
<description>
@@ -19,8 +19,8 @@
<member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset" default="0.0">
Time in seconds at which the stream starts after being looped.
</member>
- <member name="packet_sequence" type="OGGPacketSequence" setter="set_packet_sequence" getter="get_packet_sequence">
- Contains the raw OGG data for this stream.
+ <member name="packet_sequence" type="OggPacketSequence" setter="set_packet_sequence" getter="get_packet_sequence">
+ Contains the raw Ogg data for this stream.
</member>
</members>
</class>
diff --git a/modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml b/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml
index 68aa46147f..0879c773ac 100644
--- a/modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml
+++ b/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlaybackOGGVorbis" inherits="AudioStreamPlaybackResampled" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="AudioStreamPlaybackOggVorbis" inherits="AudioStreamPlaybackResampled" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
</brief_description>
<description>
diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp
index 7f81f88cdb..84a71fe82d 100644
--- a/modules/vorbis/register_types.cpp
+++ b/modules/vorbis/register_types.cpp
@@ -40,13 +40,13 @@ void initialize_vorbis_module(ModuleInitializationLevel p_level) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- Ref<ResourceImporterOGGVorbis> ogg_vorbis_importer;
+ Ref<ResourceImporterOggVorbis> ogg_vorbis_importer;
ogg_vorbis_importer.instantiate();
ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
}
#endif
- GDREGISTER_CLASS(AudioStreamOGGVorbis);
- GDREGISTER_CLASS(AudioStreamPlaybackOGGVorbis);
+ GDREGISTER_CLASS(AudioStreamOggVorbis);
+ GDREGISTER_CLASS(AudioStreamPlaybackOggVorbis);
}
void uninitialize_vorbis_module(ModuleInitializationLevel p_level) {
diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp
index 9461d531fd..bf5f7206b8 100644
--- a/modules/vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp
@@ -40,39 +40,39 @@
#include "editor/import/audio_stream_import_settings.h"
#endif
-String ResourceImporterOGGVorbis::get_importer_name() const {
+String ResourceImporterOggVorbis::get_importer_name() const {
return "oggvorbisstr";
}
-String ResourceImporterOGGVorbis::get_visible_name() const {
+String ResourceImporterOggVorbis::get_visible_name() const {
return "oggvorbisstr";
}
-void ResourceImporterOGGVorbis::get_recognized_extensions(List<String> *p_extensions) const {
+void ResourceImporterOggVorbis::get_recognized_extensions(List<String> *p_extensions) const {
p_extensions->push_back("ogg");
}
-String ResourceImporterOGGVorbis::get_save_extension() const {
+String ResourceImporterOggVorbis::get_save_extension() const {
return "oggvorbisstr";
}
-String ResourceImporterOGGVorbis::get_resource_type() const {
- return "AudioStreamOGGVorbis";
+String ResourceImporterOggVorbis::get_resource_type() const {
+ return "AudioStreamOggVorbis";
}
-bool ResourceImporterOGGVorbis::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {
+bool ResourceImporterOggVorbis::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {
return true;
}
-int ResourceImporterOGGVorbis::get_preset_count() const {
+int ResourceImporterOggVorbis::get_preset_count() const {
return 0;
}
-String ResourceImporterOGGVorbis::get_preset_name(int p_idx) const {
+String ResourceImporterOggVorbis::get_preset_name(int p_idx) const {
return String();
}
-void ResourceImporterOGGVorbis::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const {
+void ResourceImporterOggVorbis::get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "loop"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "bpm", PROPERTY_HINT_RANGE, "0,400,0.01,or_greater"), 0));
@@ -80,9 +80,9 @@ void ResourceImporterOGGVorbis::get_import_options(const String &p_path, List<Im
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "bar_beats", PROPERTY_HINT_RANGE, "2,32,or_greater"), 4));
}
-Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const String &p_path) {
+Ref<AudioStreamOggVorbis> ResourceImporterOggVorbis::import_ogg_vorbis(const String &p_path) {
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ);
- ERR_FAIL_COND_V_MSG(f.is_null(), Ref<AudioStreamOGGVorbis>(), "Cannot open file '" + p_path + "'.");
+ ERR_FAIL_COND_V_MSG(f.is_null(), Ref<AudioStreamOggVorbis>(), "Cannot open file '" + p_path + "'.");
uint64_t len = f->get_length();
@@ -92,10 +92,10 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
f->get_buffer(w, len);
- Ref<AudioStreamOGGVorbis> ogg_vorbis_stream;
+ Ref<AudioStreamOggVorbis> ogg_vorbis_stream;
ogg_vorbis_stream.instantiate();
- Ref<OGGPacketSequence> ogg_packet_sequence;
+ Ref<OggPacketSequence> ogg_packet_sequence;
ogg_packet_sequence.instantiate();
ogg_stream_state stream_state;
@@ -110,16 +110,16 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
size_t packet_count = 0;
bool done = false;
while (!done) {
- ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOGGVorbis>(), "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
while (ogg_sync_pageout(&sync_state, &page) != 1) {
if (cursor >= len) {
done = true;
break;
}
- ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOGGVorbis>(), "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
char *sync_buf = ogg_sync_buffer(&sync_state, OGG_SYNC_BUFFER_SIZE);
- ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOGGVorbis>(), "Ogg sync error " + itos(err));
- ERR_FAIL_COND_V(cursor > len, Ref<AudioStreamOGGVorbis>());
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V(cursor > len, Ref<AudioStreamOggVorbis>());
size_t copy_size = len - cursor;
if (copy_size > OGG_SYNC_BUFFER_SIZE) {
copy_size = OGG_SYNC_BUFFER_SIZE;
@@ -127,22 +127,22 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
memcpy(sync_buf, &file_data[cursor], copy_size);
ogg_sync_wrote(&sync_state, copy_size);
cursor += copy_size;
- ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOGGVorbis>(), "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
}
if (done) {
break;
}
- ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOGGVorbis>(), "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
// Have a page now.
if (!initialized_stream) {
if (ogg_stream_init(&stream_state, ogg_page_serialno(&page))) {
- ERR_FAIL_V_MSG(Ref<AudioStreamOGGVorbis>(), "Failed allocating memory for OGG Vorbis stream.");
+ ERR_FAIL_V_MSG(Ref<AudioStreamOggVorbis>(), "Failed allocating memory for Ogg Vorbis stream.");
}
initialized_stream = true;
}
ogg_stream_pagein(&stream_state, &page);
- ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Ref<AudioStreamOGGVorbis>(), "Ogg stream error " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Ref<AudioStreamOggVorbis>(), "Ogg stream error " + itos(err));
int desync_iters = 0;
Vector<Vector<uint8_t>> packet_data;
@@ -153,7 +153,7 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
if (err == -1) {
// According to the docs this is usually recoverable, but don't sit here spinning forever.
desync_iters++;
- ERR_FAIL_COND_V_MSG(desync_iters > 100, Ref<AudioStreamOGGVorbis>(), "Packet sync issue during ogg import");
+ ERR_FAIL_COND_V_MSG(desync_iters > 100, Ref<AudioStreamOggVorbis>(), "Packet sync issue during Ogg import");
continue;
} else if (err == 0) {
// Not enough data to fully reconstruct a packet. Go on to the next page.
@@ -186,7 +186,7 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
ogg_sync_clear(&sync_state);
if (ogg_packet_sequence->get_packet_granule_positions().is_empty()) {
- ERR_FAIL_V_MSG(Ref<AudioStreamOGGVorbis>(), "OGG Vorbis decoding failed. Check that your data is a valid OGG Vorbis audio stream.");
+ ERR_FAIL_V_MSG(Ref<AudioStreamOggVorbis>(), "Ogg Vorbis decoding failed. Check that your data is a valid Ogg Vorbis audio stream.");
}
ogg_vorbis_stream->set_packet_sequence(ogg_packet_sequence);
@@ -196,26 +196,26 @@ Ref<AudioStreamOGGVorbis> ResourceImporterOGGVorbis::import_ogg_vorbis(const Str
#ifdef TOOLS_ENABLED
-bool ResourceImporterOGGVorbis::has_advanced_options() const {
+bool ResourceImporterOggVorbis::has_advanced_options() const {
return true;
}
-void ResourceImporterOGGVorbis::show_advanced_options(const String &p_path) {
- Ref<AudioStreamOGGVorbis> ogg_stream = import_ogg_vorbis(p_path);
+void ResourceImporterOggVorbis::show_advanced_options(const String &p_path) {
+ Ref<AudioStreamOggVorbis> ogg_stream = import_ogg_vorbis(p_path);
if (ogg_stream.is_valid()) {
AudioStreamImportSettings::get_singleton()->edit(p_path, "oggvorbisstr", ogg_stream);
}
}
#endif
-Error ResourceImporterOGGVorbis::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) {
+Error ResourceImporterOggVorbis::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) {
bool loop = p_options["loop"];
float loop_offset = p_options["loop_offset"];
double bpm = p_options["bpm"];
int beat_count = p_options["beat_count"];
int bar_beats = p_options["bar_beats"];
- Ref<AudioStreamOGGVorbis> ogg_vorbis_stream = import_ogg_vorbis(p_source_file);
+ Ref<AudioStreamOggVorbis> ogg_vorbis_stream = import_ogg_vorbis(p_source_file);
if (ogg_vorbis_stream.is_null()) {
return ERR_CANT_OPEN;
}
@@ -226,8 +226,8 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
ogg_vorbis_stream->set_beat_count(beat_count);
ogg_vorbis_stream->set_bar_beats(bar_beats);
- return ResourceSaver::save(p_save_path + ".oggvorbisstr", ogg_vorbis_stream);
+ return ResourceSaver::save(ogg_vorbis_stream, p_save_path + ".oggvorbisstr");
}
-ResourceImporterOGGVorbis::ResourceImporterOGGVorbis() {
+ResourceImporterOggVorbis::ResourceImporterOggVorbis() {
}
diff --git a/modules/vorbis/resource_importer_ogg_vorbis.h b/modules/vorbis/resource_importer_ogg_vorbis.h
index e6e98a29c1..a1a970e2cc 100644
--- a/modules/vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/vorbis/resource_importer_ogg_vorbis.h
@@ -34,8 +34,8 @@
#include "audio_stream_ogg_vorbis.h"
#include "core/io/resource_importer.h"
-class ResourceImporterOGGVorbis : public ResourceImporter {
- GDCLASS(ResourceImporterOGGVorbis, ResourceImporter);
+class ResourceImporterOggVorbis : public ResourceImporter {
+ GDCLASS(ResourceImporterOggVorbis, ResourceImporter);
enum {
OGG_SYNC_BUFFER_SIZE = 8192,
@@ -44,7 +44,7 @@ class ResourceImporterOGGVorbis : public ResourceImporter {
private:
// virtual int get_samples_in_packet(Vector<uint8_t> p_packet) = 0;
- static Ref<AudioStreamOGGVorbis> import_ogg_vorbis(const String &p_path);
+ static Ref<AudioStreamOggVorbis> import_ogg_vorbis(const String &p_path);
public:
#ifdef TOOLS_ENABLED
@@ -63,7 +63,7 @@ public:
virtual Error 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 = nullptr, Variant *r_metadata = nullptr) override;
- ResourceImporterOGGVorbis();
+ ResourceImporterOggVorbis();
};
#endif // RESOURCE_IMPORTER_OGG_VORBIS_H
diff --git a/modules/webp/resource_saver_webp.cpp b/modules/webp/resource_saver_webp.cpp
index d270d39163..bd71c2869a 100644
--- a/modules/webp/resource_saver_webp.cpp
+++ b/modules/webp/resource_saver_webp.cpp
@@ -35,7 +35,7 @@
#include "scene/resources/texture.h"
#include "webp_common.h"
-Error ResourceSaverWebP::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceSaverWebP::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<ImageTexture> texture = p_resource;
ERR_FAIL_COND_V_MSG(!texture.is_valid(), ERR_INVALID_PARAMETER, "Can't save invalid texture as WEBP.");
diff --git a/modules/webp/resource_saver_webp.h b/modules/webp/resource_saver_webp.h
index 59e944efa0..cbd5864463 100644
--- a/modules/webp/resource_saver_webp.h
+++ b/modules/webp/resource_saver_webp.h
@@ -39,7 +39,7 @@ public:
static Error save_image(const String &p_path, const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
diff --git a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
index 3996a002ed..df92097135 100644
--- a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
+++ b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
@@ -57,7 +57,7 @@
Initialize the multiplayer peer with the given [code]peer_id[/code] (must be between 1 and 2147483647).
If [code]server_compatibilty[/code] is [code]false[/code] (default), the multiplayer peer will be immediately in state [constant MultiplayerPeer.CONNECTION_CONNECTED] and [signal MultiplayerPeer.connection_succeeded] will not be emitted.
If [code]server_compatibilty[/code] is [code]true[/code] the peer will suppress all [signal MultiplayerPeer.peer_connected] signals until a peer with id [constant MultiplayerPeer.TARGET_PEER_SERVER] connects and then emit [signal MultiplayerPeer.connection_succeeded]. After that the signal [signal MultiplayerPeer.peer_connected] will be emitted for every already connected peer, and any new peer that might connect. If the server peer disconnects after that, signal [signal MultiplayerPeer.server_disconnected] will be emitted and state will become [constant MultiplayerPeer.CONNECTION_CONNECTED].
- You can optionally specify a [code]channels_config[/code] array of [enum TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
+ You can optionally specify a [code]channels_config[/code] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
</description>
</method>
<method name="remove_peer">
diff --git a/modules/webrtc/webrtc_multiplayer_peer.cpp b/modules/webrtc/webrtc_multiplayer_peer.cpp
index 6f68b84ad3..e03b6b2473 100644
--- a/modules/webrtc/webrtc_multiplayer_peer.cpp
+++ b/modules/webrtc/webrtc_multiplayer_peer.cpp
@@ -197,14 +197,14 @@ Error WebRTCMultiplayerPeer::initialize(int p_self_id, bool p_server_compat, Arr
cfg["ordered"] = true;
switch (mode) {
- case Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED:
+ case TRANSFER_MODE_UNRELIABLE_ORDERED:
cfg["maxPacketLifetime"] = 1;
break;
- case Multiplayer::TRANSFER_MODE_UNRELIABLE:
+ case TRANSFER_MODE_UNRELIABLE:
cfg["maxPacketLifetime"] = 1;
cfg["ordered"] = false;
break;
- case Multiplayer::TRANSFER_MODE_RELIABLE:
+ case TRANSFER_MODE_RELIABLE:
break;
default:
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, vformat("The 'channels_config' array must contain only enum values from 'MultiplayerPeer.Multiplayer::TransferMode'. Got: %d", mode));
@@ -339,13 +339,13 @@ Error WebRTCMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_si
int ch = get_transfer_channel();
if (ch == 0) {
switch (get_transfer_mode()) {
- case Multiplayer::TRANSFER_MODE_RELIABLE:
+ case TRANSFER_MODE_RELIABLE:
ch = CH_RELIABLE;
break;
- case Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED:
+ case TRANSFER_MODE_UNRELIABLE_ORDERED:
ch = CH_ORDERED;
break;
- case Multiplayer::TRANSFER_MODE_UNRELIABLE:
+ case TRANSFER_MODE_UNRELIABLE:
ch = CH_UNRELIABLE;
break;
}
diff --git a/modules/webrtc/webrtc_multiplayer_peer.h b/modules/webrtc/webrtc_multiplayer_peer.h
index d4ed7ef7de..ea7c60036b 100644
--- a/modules/webrtc/webrtc_multiplayer_peer.h
+++ b/modules/webrtc/webrtc_multiplayer_peer.h
@@ -31,7 +31,7 @@
#ifndef WEBRTC_MULTIPLAYER_PEER_H
#define WEBRTC_MULTIPLAYER_PEER_H
-#include "core/multiplayer/multiplayer_peer.h"
+#include "scene/main/multiplayer_peer.h"
#include "webrtc_peer_connection.h"
class WebRTCMultiplayerPeer : public MultiplayerPeer {
diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h
index db529a669d..3259e78b3b 100644
--- a/modules/websocket/websocket_multiplayer_peer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -32,8 +32,8 @@
#define WEBSOCKET_MULTIPLAYER_PEER_H
#include "core/error/error_list.h"
-#include "core/multiplayer/multiplayer_peer.h"
#include "core/templates/list.h"
+#include "scene/main/multiplayer_peer.h"
#include "websocket_peer.h"
class WebSocketMultiplayerPeer : public MultiplayerPeer {
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index 3be220d110..86f933d4bc 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -276,9 +276,9 @@ void DisplayServerAndroid::_window_callback(const Callable &p_callable, const Va
Variant ret;
Callable::CallError ce;
if (p_deferred) {
- p_callable.call((const Variant **)&argp, 1, ret, ce);
+ p_callable.callp((const Variant **)&argp, 1, ret, ce);
} else {
- p_callable.call_deferred((const Variant **)&argp, 1);
+ p_callable.call_deferredp((const Variant **)&argp, 1);
}
}
}
@@ -482,7 +482,7 @@ void DisplayServerAndroid::notify_surface_changed(int p_width, int p_height) {
Variant ret;
Callable::CallError ce;
- rect_changed_callback.call(reinterpret_cast<const Variant **>(&sizep), 1, ret, ce);
+ rect_changed_callback.callp(reinterpret_cast<const Variant **>(&sizep), 1, ret, ce);
}
DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 560f188b82..5bbe0ffab6 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -30,10 +30,10 @@
#include "export.h"
-#include "export_plugin.h"
-
#include "core/os/os.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export.h"
+#include "export_plugin.h"
void register_android_exporter() {
EDITOR_DEF("export/android/android_sdk_path", "");
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 2cfb152804..6f1b4bde40 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -1671,7 +1671,7 @@ Vector<String> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExp
return enabled_abis;
}
-void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
if (driver == "opengl3") {
r_features->push_back("etc");
@@ -1705,6 +1705,8 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
}
plugins_changed.clear();
+ // Android supports multiple architectures in an app bundle, so
+ // we expose each option as a checkbox in the export dialog.
const Vector<String> abis = get_abis();
for (int i = 0; i < abis.size(); ++i) {
const String abi = abis[i];
@@ -3109,7 +3111,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
CLEANUP_AND_RETURN(OK);
}
-void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) {
+void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) const {
r_features->push_back("mobile");
r_features->push_back("android");
}
diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h
index 15ac8091be..1da3f68f9a 100644
--- a/platform/android/export/export_plugin.h
+++ b/platform/android/export/export_plugin.h
@@ -35,7 +35,7 @@
#include "core/io/zip_io.h"
#include "core/os/os.h"
-#include "editor/editor_export.h"
+#include "editor/export/editor_export_platform.h"
const String SPLASH_CONFIG_XML_CONTENT = R"SPLASH(<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
@@ -156,7 +156,7 @@ public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -231,7 +231,7 @@ public:
Error export_project_helper(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int export_format, bool should_sign, int p_flags);
- virtual void get_platform_features(List<String> *r_features) override;
+ virtual void get_platform_features(List<String> *r_features) const override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
diff --git a/platform/android/export/gradle_export_util.h b/platform/android/export/gradle_export_util.h
index 018ae649d6..232b4458c6 100644
--- a/platform/android/export/gradle_export_util.h
+++ b/platform/android/export/gradle_export_util.h
@@ -35,7 +35,7 @@
#include "core/io/file_access.h"
#include "core/io/zip_io.h"
#include "core/os/os.h"
-#include "editor/editor_export.h"
+#include "editor/export/editor_export.h"
const String godot_project_name_xml_string = R"(<?xml version="1.0" encoding="utf-8"?>
<!--WARNING: THIS FILE WILL BE OVERWRITTEN AT BUILD TIME-->
diff --git a/platform/android/file_access_filesystem_jandroid.cpp b/platform/android/file_access_filesystem_jandroid.cpp
index 733d92f741..6b21c18d59 100644
--- a/platform/android/file_access_filesystem_jandroid.cpp
+++ b/platform/android/file_access_filesystem_jandroid.cpp
@@ -29,9 +29,11 @@
/*************************************************************************/
#include "file_access_filesystem_jandroid.h"
+
#include "core/os/os.h"
#include "core/templates/local_vector.h"
#include "thread_jandroid.h"
+
#include <unistd.h>
jobject FileAccessFilesystemJAndroid::file_access_handler = nullptr;
@@ -198,7 +200,7 @@ String FileAccessFilesystemJAndroid::get_line() const {
if (elem == '\n' || elem == '\0') {
// Found the end of the line
const_cast<FileAccessFilesystemJAndroid *>(this)->seek(start_position + line_buffer_position + 1);
- if (result.parse_utf8((const char *)line_buffer.ptr(), line_buffer_position)) {
+ if (result.parse_utf8((const char *)line_buffer.ptr(), line_buffer_position, true)) {
return String();
}
return result;
@@ -206,7 +208,7 @@ String FileAccessFilesystemJAndroid::get_line() const {
}
}
- if (result.parse_utf8((const char *)line_buffer.ptr(), line_buffer_position)) {
+ if (result.parse_utf8((const char *)line_buffer.ptr(), line_buffer_position, true)) {
return String();
}
return result;
diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm
index 73d4a2a427..6172940572 100644
--- a/platform/ios/display_server_ios.mm
+++ b/platform/ios/display_server_ios.mm
@@ -219,7 +219,7 @@ void DisplayServerIOS::_window_callback(const Callable &p_callable, const Varian
const Variant *argp = &p_arg;
Variant ret;
Callable::CallError ce;
- p_callable.call((const Variant **)&argp, 1, ret, ce);
+ p_callable.callp((const Variant **)&argp, 1, ret, ce);
}
}
diff --git a/platform/ios/export/export.cpp b/platform/ios/export/export.cpp
index 1531c2bde5..6024db2f2c 100644
--- a/platform/ios/export/export.cpp
+++ b/platform/ios/export/export.cpp
@@ -30,6 +30,7 @@
#include "export.h"
+#include "editor/export/editor_export.h"
#include "export_plugin.h"
void register_ios_exporter() {
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index a2e80d33fd..9ca2948542 100644
--- a/platform/ios/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -30,9 +30,10 @@
#include "export_plugin.h"
+#include "core/string/translation.h"
#include "editor/editor_node.h"
-void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
// Vulkan and OpenGL ES 3.0 both mandate ETC2 support.
r_features->push_back("etc2");
@@ -43,7 +44,7 @@ void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset>
}
}
-Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() {
+Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() const {
Vector<ExportArchitecture> archs;
archs.push_back(ExportArchitecture("arm64", true));
return archs;
@@ -1155,7 +1156,7 @@ Error EditorExportPlatformIOS::_export_additional_assets(const String &p_out_dir
return OK;
}
-Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) {
+Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const {
Vector<ExportArchitecture> all_archs = _get_supported_architectures();
Vector<String> enabled_archs;
for (int i = 0; i < all_archs.size(); ++i) {
diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h
index 91b13419f1..07e30c1d00 100644
--- a/platform/ios/export/export_plugin.h
+++ b/platform/ios/export/export_plugin.h
@@ -40,8 +40,8 @@
#include "core/os/os.h"
#include "core/templates/safe_refcount.h"
#include "core/version.h"
-#include "editor/editor_export.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export_platform.h"
#include "main/splash.gen.h"
#include "platform/ios/logo.gen.h"
#include "string.h"
@@ -106,8 +106,8 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
Error _export_loading_screen_file(const Ref<EditorExportPreset> &p_preset, const String &p_dest_dir);
Error _export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir);
- Vector<ExportArchitecture> _get_supported_architectures();
- Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset);
+ Vector<ExportArchitecture> _get_supported_architectures() const;
+ Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const;
void _add_assets_to_project(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets);
Error _export_additional_assets(const String &p_out_dir, const Vector<String> &p_assets, bool p_is_framework, bool p_should_embed, Vector<IOSExportAsset> &r_exported_assets);
@@ -173,7 +173,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
}
protected:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
public:
@@ -199,7 +199,7 @@ public:
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("mobile");
r_features->push_back("ios");
}
diff --git a/platform/ios/os_ios.h b/platform/ios/os_ios.h
index cfd1771653..3b88f53b6a 100644
--- a/platform/ios/os_ios.h
+++ b/platform/ios/os_ios.h
@@ -92,6 +92,9 @@ public:
virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override;
+ virtual Vector<String> get_system_fonts() const override;
+ virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
virtual Error close_dynamic_library(void *p_library_handle) override;
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override;
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm
index 880315209e..b9d186f355 100644
--- a/platform/ios/os_ios.mm
+++ b/platform/ios/os_ios.mm
@@ -44,6 +44,7 @@
#import "view_controller.h"
#import <AudioToolbox/AudioServices.h>
+#import <CoreText/CoreText.h>
#import <UIKit/UIKit.h>
#import <dlfcn.h>
#include <sys/sysctl.h>
@@ -302,6 +303,80 @@ String OS_IOS::get_processor_name() const {
ERR_FAIL_V_MSG("", String("Couldn't get the CPU model name. Returning an empty string."));
}
+Vector<String> OS_IOS::get_system_fonts() const {
+ HashSet<String> font_names;
+ CFArrayRef fonts = CTFontManagerCopyAvailableFontFamilyNames();
+ if (fonts) {
+ for (CFIndex i = 0; i < CFArrayGetCount(fonts); i++) {
+ CFStringRef cf_name = (CFStringRef)CFArrayGetValueAtIndex(fonts, i);
+ if (cf_name && (CFStringGetLength(cf_name) > 0) && (CFStringCompare(cf_name, CFSTR("LastResort"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) && (CFStringGetCharacterAtIndex(cf_name, 0) != '.')) {
+ NSString *ns_name = (__bridge NSString *)cf_name;
+ font_names.insert(String::utf8([ns_name UTF8String]));
+ }
+ }
+ CFRelease(fonts);
+ }
+
+ Vector<String> ret;
+ for (const String &E : font_names) {
+ ret.push_back(E);
+ }
+ return ret;
+}
+
+String OS_IOS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+ String ret;
+
+ String font_name = p_font_name;
+ if (font_name.to_lower() == "sans-serif") {
+ font_name = "Helvetica";
+ } else if (font_name.to_lower() == "serif") {
+ font_name = "Times";
+ } else if (font_name.to_lower() == "monospace") {
+ font_name = "Courier";
+ } else if (font_name.to_lower() == "fantasy") {
+ font_name = "Papyrus";
+ } else if (font_name.to_lower() == "cursive") {
+ font_name = "Apple Chancery";
+ };
+
+ CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
+
+ CTFontSymbolicTraits traits = 0;
+ if (p_bold) {
+ traits |= kCTFontBoldTrait;
+ }
+ if (p_italic) {
+ traits |= kCTFontItalicTrait;
+ }
+
+ CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
+ CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+
+ CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
+ CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
+
+ CTFontDescriptorRef font = CTFontDescriptorCreateWithAttributes(attributes);
+ if (font) {
+ CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(font, kCTFontURLAttribute);
+ if (url) {
+ NSString *font_path = [NSString stringWithString:[(__bridge NSURL *)url path]];
+ ret = String::utf8([font_path UTF8String]);
+ CFRelease(url);
+ }
+ CFRelease(font);
+ }
+
+ CFRelease(attributes);
+ CFRelease(traits_dict);
+ CFRelease(sym_traits);
+ CFRelease(name);
+
+ return ret;
+}
+
void OS_IOS::vibrate_handheld(int p_duration_ms) {
if (ios->supports_haptic_engine()) {
ios->vibrate_haptic_engine((float)p_duration_ms / 1000.f);
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index 4edd6c793a..bcff3306d5 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -83,7 +83,7 @@ void DisplayServerJavaScript::drop_files_js_callback(char **p_filev, int p_filec
Variant *vp = &v;
Variant ret;
Callable::CallError ce;
- ds->drop_files_callback.call((const Variant **)&vp, 1, ret, ce);
+ ds->drop_files_callback.callp((const Variant **)&vp, 1, ret, ce);
}
// JavaScript quit request callback.
@@ -94,7 +94,7 @@ void DisplayServerJavaScript::request_quit_callback() {
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- ds->window_event_callback.call((const Variant **)&eventp, 1, ret, ce);
+ ds->window_event_callback.callp((const Variant **)&eventp, 1, ret, ce);
}
}
@@ -586,7 +586,7 @@ void DisplayServerJavaScript::vk_input_text_callback(const char *p_text, int p_c
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- ds->input_text_callback.call((const Variant **)&eventp, 1, ret, ce);
+ ds->input_text_callback.callp((const Variant **)&eventp, 1, ret, ce);
// Insert key right to reach position.
Input *input = Input::get_singleton();
Ref<InputEventKey> k;
@@ -691,7 +691,7 @@ void DisplayServerJavaScript::send_window_event_callback(int p_notification) {
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- ds->window_event_callback.call((const Variant **)&eventp, 1, ret, ce);
+ ds->window_event_callback.callp((const Variant **)&eventp, 1, ret, ce);
}
}
@@ -734,7 +734,7 @@ void DisplayServerJavaScript::_dispatch_input_event(const Ref<InputEvent> &p_eve
Variant *evp = &ev;
Variant ret;
Callable::CallError ce;
- cb.call((const Variant **)&evp, 1, ret, ce);
+ cb.callp((const Variant **)&evp, 1, ret, ce);
}
}
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 825c1b6638..ea236f62f7 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -30,6 +30,7 @@
#include "export.h"
+#include "editor/editor_settings.h"
#include "export_plugin.h"
void register_javascript_exporter() {
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp
index e2ae45627e..b99f88d067 100644
--- a/platform/javascript/export/export_plugin.cpp
+++ b/platform/javascript/export/export_plugin.cpp
@@ -31,6 +31,7 @@
#include "export_plugin.h"
#include "core/config/project_settings.h"
+#include "editor/editor_settings.h"
Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) {
Ref<FileAccess> io_fa;
@@ -302,7 +303,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> &
return OK;
}
-void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc");
}
diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h
index a6df8e7094..fbaa3615cb 100644
--- a/platform/javascript/export/export_plugin.h
+++ b/platform/javascript/export/export_plugin.h
@@ -36,8 +36,8 @@
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/zip_io.h"
-#include "editor/editor_export.h"
#include "editor/editor_node.h"
+#include "editor/export/editor_export_platform.h"
#include "main/splash.gen.h"
#include "platform/javascript/logo.gen.h"
#include "platform/javascript/run_icon.gen.h"
@@ -110,7 +110,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform {
static void _server_thread_poll(void *data);
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -130,7 +130,7 @@ public:
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_option, int p_debug_flags) override;
virtual Ref<Texture2D> get_run_icon() const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("web");
r_features->push_back(get_os_name().to_lower());
}
diff --git a/platform/javascript/export/export_server.h b/platform/javascript/export/export_server.h
index 7cdbcec064..ddbe3cca30 100644
--- a/platform/javascript/export/export_server.h
+++ b/platform/javascript/export/export_server.h
@@ -35,7 +35,6 @@
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/zip_io.h"
-#include "editor/editor_export.h"
#include "editor/editor_paths.h"
class EditorHTTPServer : public RefCounted {
diff --git a/platform/javascript/godot_js.h b/platform/javascript/godot_js.h
index 567b491336..1dce8035a6 100644
--- a/platform/javascript/godot_js.h
+++ b/platform/javascript/godot_js.h
@@ -58,6 +58,7 @@ extern void godot_js_input_mouse_move_cb(void (*p_callback)(double p_x, double p
extern void godot_js_input_mouse_wheel_cb(int (*p_callback)(double p_delta_x, double p_delta_y));
extern void godot_js_input_touch_cb(void (*p_callback)(int p_type, int p_count), uint32_t *r_identifiers, double *r_coords);
extern void godot_js_input_key_cb(void (*p_callback)(int p_type, int p_repeat, int p_modifiers), char r_code[32], char r_key[32]);
+extern void godot_js_input_vibrate_handheld(int p_duration_ms);
// Input gamepad
extern void godot_js_input_gamepad_cb(void (*p_on_change)(int p_index, int p_connected, const char *p_id, const char *p_guid));
diff --git a/platform/javascript/javascript_singleton.cpp b/platform/javascript/javascript_singleton.cpp
index 8dc7aba5f8..204e92b82b 100644
--- a/platform/javascript/javascript_singleton.cpp
+++ b/platform/javascript/javascript_singleton.cpp
@@ -259,7 +259,7 @@ void JavaScriptObjectImpl::_callback(void *p_ref, int p_args_id, int p_argc) {
const Variant *argv[1] = { &arg };
Callable::CallError err;
Variant ret;
- obj->_callable.call(argv, 1, ret, err);
+ obj->_callable.callp(argv, 1, ret, err);
// Set return value
godot_js_wrapper_ex exchange;
diff --git a/platform/javascript/js/libs/library_godot_input.js b/platform/javascript/js/libs/library_godot_input.js
index 1e64c260f8..51571d64a2 100644
--- a/platform/javascript/js/libs/library_godot_input.js
+++ b/platform/javascript/js/libs/library_godot_input.js
@@ -534,6 +534,15 @@ const GodotInput = {
GodotRuntime.free(ptr);
}, false);
},
+
+ godot_js_input_vibrate_handheld__sig: 'vi',
+ godot_js_input_vibrate_handheld: function (p_duration_ms) {
+ if (typeof navigator.vibrate !== 'function') {
+ GodotRuntime.print('This browser does not support vibration.');
+ } else {
+ navigator.vibrate(p_duration_ms);
+ }
+ },
};
autoAddDeps(GodotInput, '$GodotInput');
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 1686353229..dc81b8b4b6 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -177,6 +177,10 @@ String OS_JavaScript::get_name() const {
return "HTML5";
}
+void OS_JavaScript::vibrate_handheld(int p_duration_ms) {
+ godot_js_input_vibrate_handheld(p_duration_ms);
+}
+
String OS_JavaScript::get_user_data_dir() const {
return "/userfs";
}
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index 6900a34ee3..35e13c94fc 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -90,6 +90,8 @@ public:
// Implemented in javascript_main.cpp loop callback instead.
void add_frame_delay(bool p_can_draw) override {}
+ void vibrate_handheld(int p_duration_ms) override;
+
String get_cache_path() const override;
String get_config_path() const override;
String get_data_path() const override;
diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub
index 636a3c7db2..35c41556ee 100644
--- a/platform/linuxbsd/SCsub
+++ b/platform/linuxbsd/SCsub
@@ -26,9 +26,15 @@ if env["x11"]:
if env["speechd"]:
common_linuxbsd.append(["speechd-so_wrap.c", "tts_linux.cpp"])
+if env["fontconfig"]:
+ common_linuxbsd.append("fontconfig-so_wrap.c")
+
if env["udev"]:
common_linuxbsd.append("libudev-so_wrap.c")
+if env["dbus"]:
+ common_linuxbsd.append("dbus-so_wrap.c")
+
prog = env.add_program("#bin/godot", ["godot_linuxbsd.cpp"] + common_linuxbsd)
if env["debug_symbols"] and env["separate_debug_symbols"]:
diff --git a/platform/linuxbsd/dbus-so_wrap.c b/platform/linuxbsd/dbus-so_wrap.c
new file mode 100644
index 0000000000..0876bc88b0
--- /dev/null
+++ b/platform/linuxbsd/dbus-so_wrap.c
@@ -0,0 +1,2641 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-07-29 07:23:21
+// flags: ./generate-wrapper.py --include /usr/include/dbus-1.0/dbus/dbus.h --sys-include <dbus/dbus.h> --soname libdbus-1.so --init-name dbus --output-header dbus-so_wrap.h --output-implementation dbus-so_wrap.c
+//
+#include <stdint.h>
+
+#define dbus_error_init dbus_error_init_dylibloader_orig_dbus
+#define dbus_error_free dbus_error_free_dylibloader_orig_dbus
+#define dbus_set_error dbus_set_error_dylibloader_orig_dbus
+#define dbus_set_error_const dbus_set_error_const_dylibloader_orig_dbus
+#define dbus_move_error dbus_move_error_dylibloader_orig_dbus
+#define dbus_error_has_name dbus_error_has_name_dylibloader_orig_dbus
+#define dbus_error_is_set dbus_error_is_set_dylibloader_orig_dbus
+#define dbus_parse_address dbus_parse_address_dylibloader_orig_dbus
+#define dbus_address_entry_get_value dbus_address_entry_get_value_dylibloader_orig_dbus
+#define dbus_address_entry_get_method dbus_address_entry_get_method_dylibloader_orig_dbus
+#define dbus_address_entries_free dbus_address_entries_free_dylibloader_orig_dbus
+#define dbus_address_escape_value dbus_address_escape_value_dylibloader_orig_dbus
+#define dbus_address_unescape_value dbus_address_unescape_value_dylibloader_orig_dbus
+#define dbus_malloc dbus_malloc_dylibloader_orig_dbus
+#define dbus_malloc0 dbus_malloc0_dylibloader_orig_dbus
+#define dbus_realloc dbus_realloc_dylibloader_orig_dbus
+#define dbus_free dbus_free_dylibloader_orig_dbus
+#define dbus_free_string_array dbus_free_string_array_dylibloader_orig_dbus
+#define dbus_shutdown dbus_shutdown_dylibloader_orig_dbus
+#define dbus_message_new dbus_message_new_dylibloader_orig_dbus
+#define dbus_message_new_method_call dbus_message_new_method_call_dylibloader_orig_dbus
+#define dbus_message_new_method_return dbus_message_new_method_return_dylibloader_orig_dbus
+#define dbus_message_new_signal dbus_message_new_signal_dylibloader_orig_dbus
+#define dbus_message_new_error dbus_message_new_error_dylibloader_orig_dbus
+#define dbus_message_new_error_printf dbus_message_new_error_printf_dylibloader_orig_dbus
+#define dbus_message_copy dbus_message_copy_dylibloader_orig_dbus
+#define dbus_message_ref dbus_message_ref_dylibloader_orig_dbus
+#define dbus_message_unref dbus_message_unref_dylibloader_orig_dbus
+#define dbus_message_get_type dbus_message_get_type_dylibloader_orig_dbus
+#define dbus_message_set_path dbus_message_set_path_dylibloader_orig_dbus
+#define dbus_message_get_path dbus_message_get_path_dylibloader_orig_dbus
+#define dbus_message_has_path dbus_message_has_path_dylibloader_orig_dbus
+#define dbus_message_set_interface dbus_message_set_interface_dylibloader_orig_dbus
+#define dbus_message_get_interface dbus_message_get_interface_dylibloader_orig_dbus
+#define dbus_message_has_interface dbus_message_has_interface_dylibloader_orig_dbus
+#define dbus_message_set_member dbus_message_set_member_dylibloader_orig_dbus
+#define dbus_message_get_member dbus_message_get_member_dylibloader_orig_dbus
+#define dbus_message_has_member dbus_message_has_member_dylibloader_orig_dbus
+#define dbus_message_set_error_name dbus_message_set_error_name_dylibloader_orig_dbus
+#define dbus_message_get_error_name dbus_message_get_error_name_dylibloader_orig_dbus
+#define dbus_message_set_destination dbus_message_set_destination_dylibloader_orig_dbus
+#define dbus_message_get_destination dbus_message_get_destination_dylibloader_orig_dbus
+#define dbus_message_set_sender dbus_message_set_sender_dylibloader_orig_dbus
+#define dbus_message_get_sender dbus_message_get_sender_dylibloader_orig_dbus
+#define dbus_message_get_signature dbus_message_get_signature_dylibloader_orig_dbus
+#define dbus_message_set_no_reply dbus_message_set_no_reply_dylibloader_orig_dbus
+#define dbus_message_get_no_reply dbus_message_get_no_reply_dylibloader_orig_dbus
+#define dbus_message_is_method_call dbus_message_is_method_call_dylibloader_orig_dbus
+#define dbus_message_is_signal dbus_message_is_signal_dylibloader_orig_dbus
+#define dbus_message_is_error dbus_message_is_error_dylibloader_orig_dbus
+#define dbus_message_has_destination dbus_message_has_destination_dylibloader_orig_dbus
+#define dbus_message_has_sender dbus_message_has_sender_dylibloader_orig_dbus
+#define dbus_message_has_signature dbus_message_has_signature_dylibloader_orig_dbus
+#define dbus_message_get_serial dbus_message_get_serial_dylibloader_orig_dbus
+#define dbus_message_set_serial dbus_message_set_serial_dylibloader_orig_dbus
+#define dbus_message_set_reply_serial dbus_message_set_reply_serial_dylibloader_orig_dbus
+#define dbus_message_get_reply_serial dbus_message_get_reply_serial_dylibloader_orig_dbus
+#define dbus_message_set_auto_start dbus_message_set_auto_start_dylibloader_orig_dbus
+#define dbus_message_get_auto_start dbus_message_get_auto_start_dylibloader_orig_dbus
+#define dbus_message_get_path_decomposed dbus_message_get_path_decomposed_dylibloader_orig_dbus
+#define dbus_message_append_args dbus_message_append_args_dylibloader_orig_dbus
+#define dbus_message_append_args_valist dbus_message_append_args_valist_dylibloader_orig_dbus
+#define dbus_message_get_args dbus_message_get_args_dylibloader_orig_dbus
+#define dbus_message_get_args_valist dbus_message_get_args_valist_dylibloader_orig_dbus
+#define dbus_message_contains_unix_fds dbus_message_contains_unix_fds_dylibloader_orig_dbus
+#define dbus_message_iter_init_closed dbus_message_iter_init_closed_dylibloader_orig_dbus
+#define dbus_message_iter_init dbus_message_iter_init_dylibloader_orig_dbus
+#define dbus_message_iter_has_next dbus_message_iter_has_next_dylibloader_orig_dbus
+#define dbus_message_iter_next dbus_message_iter_next_dylibloader_orig_dbus
+#define dbus_message_iter_get_signature dbus_message_iter_get_signature_dylibloader_orig_dbus
+#define dbus_message_iter_get_arg_type dbus_message_iter_get_arg_type_dylibloader_orig_dbus
+#define dbus_message_iter_get_element_type dbus_message_iter_get_element_type_dylibloader_orig_dbus
+#define dbus_message_iter_recurse dbus_message_iter_recurse_dylibloader_orig_dbus
+#define dbus_message_iter_get_basic dbus_message_iter_get_basic_dylibloader_orig_dbus
+#define dbus_message_iter_get_element_count dbus_message_iter_get_element_count_dylibloader_orig_dbus
+#define dbus_message_iter_get_array_len dbus_message_iter_get_array_len_dylibloader_orig_dbus
+#define dbus_message_iter_get_fixed_array dbus_message_iter_get_fixed_array_dylibloader_orig_dbus
+#define dbus_message_iter_init_append dbus_message_iter_init_append_dylibloader_orig_dbus
+#define dbus_message_iter_append_basic dbus_message_iter_append_basic_dylibloader_orig_dbus
+#define dbus_message_iter_append_fixed_array dbus_message_iter_append_fixed_array_dylibloader_orig_dbus
+#define dbus_message_iter_open_container dbus_message_iter_open_container_dylibloader_orig_dbus
+#define dbus_message_iter_close_container dbus_message_iter_close_container_dylibloader_orig_dbus
+#define dbus_message_iter_abandon_container dbus_message_iter_abandon_container_dylibloader_orig_dbus
+#define dbus_message_iter_abandon_container_if_open dbus_message_iter_abandon_container_if_open_dylibloader_orig_dbus
+#define dbus_message_lock dbus_message_lock_dylibloader_orig_dbus
+#define dbus_set_error_from_message dbus_set_error_from_message_dylibloader_orig_dbus
+#define dbus_message_allocate_data_slot dbus_message_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_message_free_data_slot dbus_message_free_data_slot_dylibloader_orig_dbus
+#define dbus_message_set_data dbus_message_set_data_dylibloader_orig_dbus
+#define dbus_message_get_data dbus_message_get_data_dylibloader_orig_dbus
+#define dbus_message_type_from_string dbus_message_type_from_string_dylibloader_orig_dbus
+#define dbus_message_type_to_string dbus_message_type_to_string_dylibloader_orig_dbus
+#define dbus_message_marshal dbus_message_marshal_dylibloader_orig_dbus
+#define dbus_message_demarshal dbus_message_demarshal_dylibloader_orig_dbus
+#define dbus_message_demarshal_bytes_needed dbus_message_demarshal_bytes_needed_dylibloader_orig_dbus
+#define dbus_message_set_allow_interactive_authorization dbus_message_set_allow_interactive_authorization_dylibloader_orig_dbus
+#define dbus_message_get_allow_interactive_authorization dbus_message_get_allow_interactive_authorization_dylibloader_orig_dbus
+#define dbus_connection_open dbus_connection_open_dylibloader_orig_dbus
+#define dbus_connection_open_private dbus_connection_open_private_dylibloader_orig_dbus
+#define dbus_connection_ref dbus_connection_ref_dylibloader_orig_dbus
+#define dbus_connection_unref dbus_connection_unref_dylibloader_orig_dbus
+#define dbus_connection_close dbus_connection_close_dylibloader_orig_dbus
+#define dbus_connection_get_is_connected dbus_connection_get_is_connected_dylibloader_orig_dbus
+#define dbus_connection_get_is_authenticated dbus_connection_get_is_authenticated_dylibloader_orig_dbus
+#define dbus_connection_get_is_anonymous dbus_connection_get_is_anonymous_dylibloader_orig_dbus
+#define dbus_connection_get_server_id dbus_connection_get_server_id_dylibloader_orig_dbus
+#define dbus_connection_can_send_type dbus_connection_can_send_type_dylibloader_orig_dbus
+#define dbus_connection_set_exit_on_disconnect dbus_connection_set_exit_on_disconnect_dylibloader_orig_dbus
+#define dbus_connection_flush dbus_connection_flush_dylibloader_orig_dbus
+#define dbus_connection_read_write_dispatch dbus_connection_read_write_dispatch_dylibloader_orig_dbus
+#define dbus_connection_read_write dbus_connection_read_write_dylibloader_orig_dbus
+#define dbus_connection_borrow_message dbus_connection_borrow_message_dylibloader_orig_dbus
+#define dbus_connection_return_message dbus_connection_return_message_dylibloader_orig_dbus
+#define dbus_connection_steal_borrowed_message dbus_connection_steal_borrowed_message_dylibloader_orig_dbus
+#define dbus_connection_pop_message dbus_connection_pop_message_dylibloader_orig_dbus
+#define dbus_connection_get_dispatch_status dbus_connection_get_dispatch_status_dylibloader_orig_dbus
+#define dbus_connection_dispatch dbus_connection_dispatch_dylibloader_orig_dbus
+#define dbus_connection_has_messages_to_send dbus_connection_has_messages_to_send_dylibloader_orig_dbus
+#define dbus_connection_send dbus_connection_send_dylibloader_orig_dbus
+#define dbus_connection_send_with_reply dbus_connection_send_with_reply_dylibloader_orig_dbus
+#define dbus_connection_send_with_reply_and_block dbus_connection_send_with_reply_and_block_dylibloader_orig_dbus
+#define dbus_connection_set_watch_functions dbus_connection_set_watch_functions_dylibloader_orig_dbus
+#define dbus_connection_set_timeout_functions dbus_connection_set_timeout_functions_dylibloader_orig_dbus
+#define dbus_connection_set_wakeup_main_function dbus_connection_set_wakeup_main_function_dylibloader_orig_dbus
+#define dbus_connection_set_dispatch_status_function dbus_connection_set_dispatch_status_function_dylibloader_orig_dbus
+#define dbus_connection_get_unix_user dbus_connection_get_unix_user_dylibloader_orig_dbus
+#define dbus_connection_get_unix_process_id dbus_connection_get_unix_process_id_dylibloader_orig_dbus
+#define dbus_connection_get_adt_audit_session_data dbus_connection_get_adt_audit_session_data_dylibloader_orig_dbus
+#define dbus_connection_set_unix_user_function dbus_connection_set_unix_user_function_dylibloader_orig_dbus
+#define dbus_connection_get_windows_user dbus_connection_get_windows_user_dylibloader_orig_dbus
+#define dbus_connection_set_windows_user_function dbus_connection_set_windows_user_function_dylibloader_orig_dbus
+#define dbus_connection_set_allow_anonymous dbus_connection_set_allow_anonymous_dylibloader_orig_dbus
+#define dbus_connection_set_route_peer_messages dbus_connection_set_route_peer_messages_dylibloader_orig_dbus
+#define dbus_connection_add_filter dbus_connection_add_filter_dylibloader_orig_dbus
+#define dbus_connection_remove_filter dbus_connection_remove_filter_dylibloader_orig_dbus
+#define dbus_connection_allocate_data_slot dbus_connection_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_connection_free_data_slot dbus_connection_free_data_slot_dylibloader_orig_dbus
+#define dbus_connection_set_data dbus_connection_set_data_dylibloader_orig_dbus
+#define dbus_connection_get_data dbus_connection_get_data_dylibloader_orig_dbus
+#define dbus_connection_set_change_sigpipe dbus_connection_set_change_sigpipe_dylibloader_orig_dbus
+#define dbus_connection_set_max_message_size dbus_connection_set_max_message_size_dylibloader_orig_dbus
+#define dbus_connection_get_max_message_size dbus_connection_get_max_message_size_dylibloader_orig_dbus
+#define dbus_connection_set_max_received_size dbus_connection_set_max_received_size_dylibloader_orig_dbus
+#define dbus_connection_get_max_received_size dbus_connection_get_max_received_size_dylibloader_orig_dbus
+#define dbus_connection_set_max_message_unix_fds dbus_connection_set_max_message_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_max_message_unix_fds dbus_connection_get_max_message_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_set_max_received_unix_fds dbus_connection_set_max_received_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_max_received_unix_fds dbus_connection_get_max_received_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_outgoing_size dbus_connection_get_outgoing_size_dylibloader_orig_dbus
+#define dbus_connection_get_outgoing_unix_fds dbus_connection_get_outgoing_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_preallocate_send dbus_connection_preallocate_send_dylibloader_orig_dbus
+#define dbus_connection_free_preallocated_send dbus_connection_free_preallocated_send_dylibloader_orig_dbus
+#define dbus_connection_send_preallocated dbus_connection_send_preallocated_dylibloader_orig_dbus
+#define dbus_connection_try_register_object_path dbus_connection_try_register_object_path_dylibloader_orig_dbus
+#define dbus_connection_register_object_path dbus_connection_register_object_path_dylibloader_orig_dbus
+#define dbus_connection_try_register_fallback dbus_connection_try_register_fallback_dylibloader_orig_dbus
+#define dbus_connection_register_fallback dbus_connection_register_fallback_dylibloader_orig_dbus
+#define dbus_connection_unregister_object_path dbus_connection_unregister_object_path_dylibloader_orig_dbus
+#define dbus_connection_get_object_path_data dbus_connection_get_object_path_data_dylibloader_orig_dbus
+#define dbus_connection_list_registered dbus_connection_list_registered_dylibloader_orig_dbus
+#define dbus_connection_get_unix_fd dbus_connection_get_unix_fd_dylibloader_orig_dbus
+#define dbus_connection_get_socket dbus_connection_get_socket_dylibloader_orig_dbus
+#define dbus_watch_get_fd dbus_watch_get_fd_dylibloader_orig_dbus
+#define dbus_watch_get_unix_fd dbus_watch_get_unix_fd_dylibloader_orig_dbus
+#define dbus_watch_get_socket dbus_watch_get_socket_dylibloader_orig_dbus
+#define dbus_watch_get_flags dbus_watch_get_flags_dylibloader_orig_dbus
+#define dbus_watch_get_data dbus_watch_get_data_dylibloader_orig_dbus
+#define dbus_watch_set_data dbus_watch_set_data_dylibloader_orig_dbus
+#define dbus_watch_handle dbus_watch_handle_dylibloader_orig_dbus
+#define dbus_watch_get_enabled dbus_watch_get_enabled_dylibloader_orig_dbus
+#define dbus_timeout_get_interval dbus_timeout_get_interval_dylibloader_orig_dbus
+#define dbus_timeout_get_data dbus_timeout_get_data_dylibloader_orig_dbus
+#define dbus_timeout_set_data dbus_timeout_set_data_dylibloader_orig_dbus
+#define dbus_timeout_handle dbus_timeout_handle_dylibloader_orig_dbus
+#define dbus_timeout_get_enabled dbus_timeout_get_enabled_dylibloader_orig_dbus
+#define dbus_bus_get dbus_bus_get_dylibloader_orig_dbus
+#define dbus_bus_get_private dbus_bus_get_private_dylibloader_orig_dbus
+#define dbus_bus_register dbus_bus_register_dylibloader_orig_dbus
+#define dbus_bus_set_unique_name dbus_bus_set_unique_name_dylibloader_orig_dbus
+#define dbus_bus_get_unique_name dbus_bus_get_unique_name_dylibloader_orig_dbus
+#define dbus_bus_get_unix_user dbus_bus_get_unix_user_dylibloader_orig_dbus
+#define dbus_bus_get_id dbus_bus_get_id_dylibloader_orig_dbus
+#define dbus_bus_request_name dbus_bus_request_name_dylibloader_orig_dbus
+#define dbus_bus_release_name dbus_bus_release_name_dylibloader_orig_dbus
+#define dbus_bus_name_has_owner dbus_bus_name_has_owner_dylibloader_orig_dbus
+#define dbus_bus_start_service_by_name dbus_bus_start_service_by_name_dylibloader_orig_dbus
+#define dbus_bus_add_match dbus_bus_add_match_dylibloader_orig_dbus
+#define dbus_bus_remove_match dbus_bus_remove_match_dylibloader_orig_dbus
+#define dbus_get_local_machine_id dbus_get_local_machine_id_dylibloader_orig_dbus
+#define dbus_get_version dbus_get_version_dylibloader_orig_dbus
+#define dbus_setenv dbus_setenv_dylibloader_orig_dbus
+#define dbus_try_get_local_machine_id dbus_try_get_local_machine_id_dylibloader_orig_dbus
+#define dbus_pending_call_ref dbus_pending_call_ref_dylibloader_orig_dbus
+#define dbus_pending_call_unref dbus_pending_call_unref_dylibloader_orig_dbus
+#define dbus_pending_call_set_notify dbus_pending_call_set_notify_dylibloader_orig_dbus
+#define dbus_pending_call_cancel dbus_pending_call_cancel_dylibloader_orig_dbus
+#define dbus_pending_call_get_completed dbus_pending_call_get_completed_dylibloader_orig_dbus
+#define dbus_pending_call_steal_reply dbus_pending_call_steal_reply_dylibloader_orig_dbus
+#define dbus_pending_call_block dbus_pending_call_block_dylibloader_orig_dbus
+#define dbus_pending_call_allocate_data_slot dbus_pending_call_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_pending_call_free_data_slot dbus_pending_call_free_data_slot_dylibloader_orig_dbus
+#define dbus_pending_call_set_data dbus_pending_call_set_data_dylibloader_orig_dbus
+#define dbus_pending_call_get_data dbus_pending_call_get_data_dylibloader_orig_dbus
+#define dbus_server_listen dbus_server_listen_dylibloader_orig_dbus
+#define dbus_server_ref dbus_server_ref_dylibloader_orig_dbus
+#define dbus_server_unref dbus_server_unref_dylibloader_orig_dbus
+#define dbus_server_disconnect dbus_server_disconnect_dylibloader_orig_dbus
+#define dbus_server_get_is_connected dbus_server_get_is_connected_dylibloader_orig_dbus
+#define dbus_server_get_address dbus_server_get_address_dylibloader_orig_dbus
+#define dbus_server_get_id dbus_server_get_id_dylibloader_orig_dbus
+#define dbus_server_set_new_connection_function dbus_server_set_new_connection_function_dylibloader_orig_dbus
+#define dbus_server_set_watch_functions dbus_server_set_watch_functions_dylibloader_orig_dbus
+#define dbus_server_set_timeout_functions dbus_server_set_timeout_functions_dylibloader_orig_dbus
+#define dbus_server_set_auth_mechanisms dbus_server_set_auth_mechanisms_dylibloader_orig_dbus
+#define dbus_server_allocate_data_slot dbus_server_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_server_free_data_slot dbus_server_free_data_slot_dylibloader_orig_dbus
+#define dbus_server_set_data dbus_server_set_data_dylibloader_orig_dbus
+#define dbus_server_get_data dbus_server_get_data_dylibloader_orig_dbus
+#define dbus_signature_iter_init dbus_signature_iter_init_dylibloader_orig_dbus
+#define dbus_signature_iter_get_current_type dbus_signature_iter_get_current_type_dylibloader_orig_dbus
+#define dbus_signature_iter_get_signature dbus_signature_iter_get_signature_dylibloader_orig_dbus
+#define dbus_signature_iter_get_element_type dbus_signature_iter_get_element_type_dylibloader_orig_dbus
+#define dbus_signature_iter_next dbus_signature_iter_next_dylibloader_orig_dbus
+#define dbus_signature_iter_recurse dbus_signature_iter_recurse_dylibloader_orig_dbus
+#define dbus_signature_validate dbus_signature_validate_dylibloader_orig_dbus
+#define dbus_signature_validate_single dbus_signature_validate_single_dylibloader_orig_dbus
+#define dbus_type_is_valid dbus_type_is_valid_dylibloader_orig_dbus
+#define dbus_type_is_basic dbus_type_is_basic_dylibloader_orig_dbus
+#define dbus_type_is_container dbus_type_is_container_dylibloader_orig_dbus
+#define dbus_type_is_fixed dbus_type_is_fixed_dylibloader_orig_dbus
+#define dbus_validate_path dbus_validate_path_dylibloader_orig_dbus
+#define dbus_validate_interface dbus_validate_interface_dylibloader_orig_dbus
+#define dbus_validate_member dbus_validate_member_dylibloader_orig_dbus
+#define dbus_validate_error_name dbus_validate_error_name_dylibloader_orig_dbus
+#define dbus_validate_bus_name dbus_validate_bus_name_dylibloader_orig_dbus
+#define dbus_validate_utf8 dbus_validate_utf8_dylibloader_orig_dbus
+#define dbus_threads_init dbus_threads_init_dylibloader_orig_dbus
+#define dbus_threads_init_default dbus_threads_init_default_dylibloader_orig_dbus
+#include <dbus/dbus.h>
+#undef dbus_error_init
+#undef dbus_error_free
+#undef dbus_set_error
+#undef dbus_set_error_const
+#undef dbus_move_error
+#undef dbus_error_has_name
+#undef dbus_error_is_set
+#undef dbus_parse_address
+#undef dbus_address_entry_get_value
+#undef dbus_address_entry_get_method
+#undef dbus_address_entries_free
+#undef dbus_address_escape_value
+#undef dbus_address_unescape_value
+#undef dbus_malloc
+#undef dbus_malloc0
+#undef dbus_realloc
+#undef dbus_free
+#undef dbus_free_string_array
+#undef dbus_shutdown
+#undef dbus_message_new
+#undef dbus_message_new_method_call
+#undef dbus_message_new_method_return
+#undef dbus_message_new_signal
+#undef dbus_message_new_error
+#undef dbus_message_new_error_printf
+#undef dbus_message_copy
+#undef dbus_message_ref
+#undef dbus_message_unref
+#undef dbus_message_get_type
+#undef dbus_message_set_path
+#undef dbus_message_get_path
+#undef dbus_message_has_path
+#undef dbus_message_set_interface
+#undef dbus_message_get_interface
+#undef dbus_message_has_interface
+#undef dbus_message_set_member
+#undef dbus_message_get_member
+#undef dbus_message_has_member
+#undef dbus_message_set_error_name
+#undef dbus_message_get_error_name
+#undef dbus_message_set_destination
+#undef dbus_message_get_destination
+#undef dbus_message_set_sender
+#undef dbus_message_get_sender
+#undef dbus_message_get_signature
+#undef dbus_message_set_no_reply
+#undef dbus_message_get_no_reply
+#undef dbus_message_is_method_call
+#undef dbus_message_is_signal
+#undef dbus_message_is_error
+#undef dbus_message_has_destination
+#undef dbus_message_has_sender
+#undef dbus_message_has_signature
+#undef dbus_message_get_serial
+#undef dbus_message_set_serial
+#undef dbus_message_set_reply_serial
+#undef dbus_message_get_reply_serial
+#undef dbus_message_set_auto_start
+#undef dbus_message_get_auto_start
+#undef dbus_message_get_path_decomposed
+#undef dbus_message_append_args
+#undef dbus_message_append_args_valist
+#undef dbus_message_get_args
+#undef dbus_message_get_args_valist
+#undef dbus_message_contains_unix_fds
+#undef dbus_message_iter_init_closed
+#undef dbus_message_iter_init
+#undef dbus_message_iter_has_next
+#undef dbus_message_iter_next
+#undef dbus_message_iter_get_signature
+#undef dbus_message_iter_get_arg_type
+#undef dbus_message_iter_get_element_type
+#undef dbus_message_iter_recurse
+#undef dbus_message_iter_get_basic
+#undef dbus_message_iter_get_element_count
+#undef dbus_message_iter_get_array_len
+#undef dbus_message_iter_get_fixed_array
+#undef dbus_message_iter_init_append
+#undef dbus_message_iter_append_basic
+#undef dbus_message_iter_append_fixed_array
+#undef dbus_message_iter_open_container
+#undef dbus_message_iter_close_container
+#undef dbus_message_iter_abandon_container
+#undef dbus_message_iter_abandon_container_if_open
+#undef dbus_message_lock
+#undef dbus_set_error_from_message
+#undef dbus_message_allocate_data_slot
+#undef dbus_message_free_data_slot
+#undef dbus_message_set_data
+#undef dbus_message_get_data
+#undef dbus_message_type_from_string
+#undef dbus_message_type_to_string
+#undef dbus_message_marshal
+#undef dbus_message_demarshal
+#undef dbus_message_demarshal_bytes_needed
+#undef dbus_message_set_allow_interactive_authorization
+#undef dbus_message_get_allow_interactive_authorization
+#undef dbus_connection_open
+#undef dbus_connection_open_private
+#undef dbus_connection_ref
+#undef dbus_connection_unref
+#undef dbus_connection_close
+#undef dbus_connection_get_is_connected
+#undef dbus_connection_get_is_authenticated
+#undef dbus_connection_get_is_anonymous
+#undef dbus_connection_get_server_id
+#undef dbus_connection_can_send_type
+#undef dbus_connection_set_exit_on_disconnect
+#undef dbus_connection_flush
+#undef dbus_connection_read_write_dispatch
+#undef dbus_connection_read_write
+#undef dbus_connection_borrow_message
+#undef dbus_connection_return_message
+#undef dbus_connection_steal_borrowed_message
+#undef dbus_connection_pop_message
+#undef dbus_connection_get_dispatch_status
+#undef dbus_connection_dispatch
+#undef dbus_connection_has_messages_to_send
+#undef dbus_connection_send
+#undef dbus_connection_send_with_reply
+#undef dbus_connection_send_with_reply_and_block
+#undef dbus_connection_set_watch_functions
+#undef dbus_connection_set_timeout_functions
+#undef dbus_connection_set_wakeup_main_function
+#undef dbus_connection_set_dispatch_status_function
+#undef dbus_connection_get_unix_user
+#undef dbus_connection_get_unix_process_id
+#undef dbus_connection_get_adt_audit_session_data
+#undef dbus_connection_set_unix_user_function
+#undef dbus_connection_get_windows_user
+#undef dbus_connection_set_windows_user_function
+#undef dbus_connection_set_allow_anonymous
+#undef dbus_connection_set_route_peer_messages
+#undef dbus_connection_add_filter
+#undef dbus_connection_remove_filter
+#undef dbus_connection_allocate_data_slot
+#undef dbus_connection_free_data_slot
+#undef dbus_connection_set_data
+#undef dbus_connection_get_data
+#undef dbus_connection_set_change_sigpipe
+#undef dbus_connection_set_max_message_size
+#undef dbus_connection_get_max_message_size
+#undef dbus_connection_set_max_received_size
+#undef dbus_connection_get_max_received_size
+#undef dbus_connection_set_max_message_unix_fds
+#undef dbus_connection_get_max_message_unix_fds
+#undef dbus_connection_set_max_received_unix_fds
+#undef dbus_connection_get_max_received_unix_fds
+#undef dbus_connection_get_outgoing_size
+#undef dbus_connection_get_outgoing_unix_fds
+#undef dbus_connection_preallocate_send
+#undef dbus_connection_free_preallocated_send
+#undef dbus_connection_send_preallocated
+#undef dbus_connection_try_register_object_path
+#undef dbus_connection_register_object_path
+#undef dbus_connection_try_register_fallback
+#undef dbus_connection_register_fallback
+#undef dbus_connection_unregister_object_path
+#undef dbus_connection_get_object_path_data
+#undef dbus_connection_list_registered
+#undef dbus_connection_get_unix_fd
+#undef dbus_connection_get_socket
+#undef dbus_watch_get_fd
+#undef dbus_watch_get_unix_fd
+#undef dbus_watch_get_socket
+#undef dbus_watch_get_flags
+#undef dbus_watch_get_data
+#undef dbus_watch_set_data
+#undef dbus_watch_handle
+#undef dbus_watch_get_enabled
+#undef dbus_timeout_get_interval
+#undef dbus_timeout_get_data
+#undef dbus_timeout_set_data
+#undef dbus_timeout_handle
+#undef dbus_timeout_get_enabled
+#undef dbus_bus_get
+#undef dbus_bus_get_private
+#undef dbus_bus_register
+#undef dbus_bus_set_unique_name
+#undef dbus_bus_get_unique_name
+#undef dbus_bus_get_unix_user
+#undef dbus_bus_get_id
+#undef dbus_bus_request_name
+#undef dbus_bus_release_name
+#undef dbus_bus_name_has_owner
+#undef dbus_bus_start_service_by_name
+#undef dbus_bus_add_match
+#undef dbus_bus_remove_match
+#undef dbus_get_local_machine_id
+#undef dbus_get_version
+#undef dbus_setenv
+#undef dbus_try_get_local_machine_id
+#undef dbus_pending_call_ref
+#undef dbus_pending_call_unref
+#undef dbus_pending_call_set_notify
+#undef dbus_pending_call_cancel
+#undef dbus_pending_call_get_completed
+#undef dbus_pending_call_steal_reply
+#undef dbus_pending_call_block
+#undef dbus_pending_call_allocate_data_slot
+#undef dbus_pending_call_free_data_slot
+#undef dbus_pending_call_set_data
+#undef dbus_pending_call_get_data
+#undef dbus_server_listen
+#undef dbus_server_ref
+#undef dbus_server_unref
+#undef dbus_server_disconnect
+#undef dbus_server_get_is_connected
+#undef dbus_server_get_address
+#undef dbus_server_get_id
+#undef dbus_server_set_new_connection_function
+#undef dbus_server_set_watch_functions
+#undef dbus_server_set_timeout_functions
+#undef dbus_server_set_auth_mechanisms
+#undef dbus_server_allocate_data_slot
+#undef dbus_server_free_data_slot
+#undef dbus_server_set_data
+#undef dbus_server_get_data
+#undef dbus_signature_iter_init
+#undef dbus_signature_iter_get_current_type
+#undef dbus_signature_iter_get_signature
+#undef dbus_signature_iter_get_element_type
+#undef dbus_signature_iter_next
+#undef dbus_signature_iter_recurse
+#undef dbus_signature_validate
+#undef dbus_signature_validate_single
+#undef dbus_type_is_valid
+#undef dbus_type_is_basic
+#undef dbus_type_is_container
+#undef dbus_type_is_fixed
+#undef dbus_validate_path
+#undef dbus_validate_interface
+#undef dbus_validate_member
+#undef dbus_validate_error_name
+#undef dbus_validate_bus_name
+#undef dbus_validate_utf8
+#undef dbus_threads_init
+#undef dbus_threads_init_default
+#include <dlfcn.h>
+#include <stdio.h>
+void (*dbus_error_init_dylibloader_wrapper_dbus)( DBusError*);
+void (*dbus_error_free_dylibloader_wrapper_dbus)( DBusError*);
+void (*dbus_set_error_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*,...);
+void (*dbus_set_error_const_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*);
+void (*dbus_move_error_dylibloader_wrapper_dbus)( DBusError*, DBusError*);
+dbus_bool_t (*dbus_error_has_name_dylibloader_wrapper_dbus)(const DBusError*,const char*);
+dbus_bool_t (*dbus_error_is_set_dylibloader_wrapper_dbus)(const DBusError*);
+dbus_bool_t (*dbus_parse_address_dylibloader_wrapper_dbus)(const char*, DBusAddressEntry***, int*, DBusError*);
+const char* (*dbus_address_entry_get_value_dylibloader_wrapper_dbus)( DBusAddressEntry*,const char*);
+const char* (*dbus_address_entry_get_method_dylibloader_wrapper_dbus)( DBusAddressEntry*);
+void (*dbus_address_entries_free_dylibloader_wrapper_dbus)( DBusAddressEntry**);
+char* (*dbus_address_escape_value_dylibloader_wrapper_dbus)(const char*);
+char* (*dbus_address_unescape_value_dylibloader_wrapper_dbus)(const char*, DBusError*);
+void* (*dbus_malloc_dylibloader_wrapper_dbus)( size_t);
+void* (*dbus_malloc0_dylibloader_wrapper_dbus)( size_t);
+void* (*dbus_realloc_dylibloader_wrapper_dbus)( void*, size_t);
+void (*dbus_free_dylibloader_wrapper_dbus)( void*);
+void (*dbus_free_string_array_dylibloader_wrapper_dbus)( char**);
+void (*dbus_shutdown_dylibloader_wrapper_dbus)( void);
+DBusMessage* (*dbus_message_new_dylibloader_wrapper_dbus)( int);
+DBusMessage* (*dbus_message_new_method_call_dylibloader_wrapper_dbus)(const char*,const char*,const char*,const char*);
+DBusMessage* (*dbus_message_new_method_return_dylibloader_wrapper_dbus)( DBusMessage*);
+DBusMessage* (*dbus_message_new_signal_dylibloader_wrapper_dbus)(const char*,const char*,const char*);
+DBusMessage* (*dbus_message_new_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+DBusMessage* (*dbus_message_new_error_printf_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*,...);
+DBusMessage* (*dbus_message_copy_dylibloader_wrapper_dbus)(const DBusMessage*);
+DBusMessage* (*dbus_message_ref_dylibloader_wrapper_dbus)( DBusMessage*);
+void (*dbus_message_unref_dylibloader_wrapper_dbus)( DBusMessage*);
+int (*dbus_message_get_type_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_set_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_path_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_has_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_set_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_interface_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_has_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_set_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_member_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_has_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_set_error_name_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_error_name_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_set_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_destination_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_set_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+const char* (*dbus_message_get_sender_dylibloader_wrapper_dbus)( DBusMessage*);
+const char* (*dbus_message_get_signature_dylibloader_wrapper_dbus)( DBusMessage*);
+void (*dbus_message_set_no_reply_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+dbus_bool_t (*dbus_message_get_no_reply_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_is_method_call_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+dbus_bool_t (*dbus_message_is_signal_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+dbus_bool_t (*dbus_message_is_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_has_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_has_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_bool_t (*dbus_message_has_signature_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+dbus_uint32_t (*dbus_message_get_serial_dylibloader_wrapper_dbus)( DBusMessage*);
+void (*dbus_message_set_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
+dbus_bool_t (*dbus_message_set_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
+dbus_uint32_t (*dbus_message_get_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*);
+void (*dbus_message_set_auto_start_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+dbus_bool_t (*dbus_message_get_auto_start_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_message_get_path_decomposed_dylibloader_wrapper_dbus)( DBusMessage*, char***);
+dbus_bool_t (*dbus_message_append_args_dylibloader_wrapper_dbus)( DBusMessage*, int,...);
+dbus_bool_t (*dbus_message_append_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, int, va_list);
+dbus_bool_t (*dbus_message_get_args_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int,...);
+dbus_bool_t (*dbus_message_get_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int, va_list);
+dbus_bool_t (*dbus_message_contains_unix_fds_dylibloader_wrapper_dbus)( DBusMessage*);
+void (*dbus_message_iter_init_closed_dylibloader_wrapper_dbus)( DBusMessageIter*);
+dbus_bool_t (*dbus_message_iter_init_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
+dbus_bool_t (*dbus_message_iter_has_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
+dbus_bool_t (*dbus_message_iter_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
+char* (*dbus_message_iter_get_signature_dylibloader_wrapper_dbus)( DBusMessageIter*);
+int (*dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
+int (*dbus_message_iter_get_element_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
+void (*dbus_message_iter_recurse_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+void (*dbus_message_iter_get_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, void*);
+int (*dbus_message_iter_get_element_count_dylibloader_wrapper_dbus)( DBusMessageIter*);
+int (*dbus_message_iter_get_array_len_dylibloader_wrapper_dbus)( DBusMessageIter*);
+void (*dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, void*, int*);
+void (*dbus_message_iter_init_append_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
+dbus_bool_t (*dbus_message_iter_append_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*);
+dbus_bool_t (*dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*, int);
+dbus_bool_t (*dbus_message_iter_open_container_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const char*, DBusMessageIter*);
+dbus_bool_t (*dbus_message_iter_close_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+void (*dbus_message_iter_abandon_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+void (*dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+void (*dbus_message_lock_dylibloader_wrapper_dbus)( DBusMessage*);
+dbus_bool_t (*dbus_set_error_from_message_dylibloader_wrapper_dbus)( DBusError*, DBusMessage*);
+dbus_bool_t (*dbus_message_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+void (*dbus_message_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+dbus_bool_t (*dbus_message_set_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t, void*, DBusFreeFunction);
+void* (*dbus_message_get_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t);
+int (*dbus_message_type_from_string_dylibloader_wrapper_dbus)(const char*);
+const char* (*dbus_message_type_to_string_dylibloader_wrapper_dbus)( int);
+dbus_bool_t (*dbus_message_marshal_dylibloader_wrapper_dbus)( DBusMessage*, char**, int*);
+DBusMessage* (*dbus_message_demarshal_dylibloader_wrapper_dbus)(const char*, int, DBusError*);
+int (*dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus)(const char*, int);
+void (*dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+dbus_bool_t (*dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*);
+DBusConnection* (*dbus_connection_open_dylibloader_wrapper_dbus)(const char*, DBusError*);
+DBusConnection* (*dbus_connection_open_private_dylibloader_wrapper_dbus)(const char*, DBusError*);
+DBusConnection* (*dbus_connection_ref_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_unref_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_close_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_get_is_connected_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus)( DBusConnection*);
+char* (*dbus_connection_get_server_id_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_can_send_type_dylibloader_wrapper_dbus)( DBusConnection*, int);
+void (*dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+void (*dbus_connection_flush_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus)( DBusConnection*, int);
+dbus_bool_t (*dbus_connection_read_write_dylibloader_wrapper_dbus)( DBusConnection*, int);
+DBusMessage* (*dbus_connection_borrow_message_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_return_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
+void (*dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
+DBusMessage* (*dbus_connection_pop_message_dylibloader_wrapper_dbus)( DBusConnection*);
+DBusDispatchStatus (*dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus)( DBusConnection*);
+DBusDispatchStatus (*dbus_connection_dispatch_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus)( DBusConnection*);
+dbus_bool_t (*dbus_connection_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, dbus_uint32_t*);
+dbus_bool_t (*dbus_connection_send_with_reply_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, DBusPendingCall**, int);
+DBusMessage* (*dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, int, DBusError*);
+dbus_bool_t (*dbus_connection_set_watch_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
+void (*dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusWakeupMainFunction, void*, DBusFreeFunction);
+void (*dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusDispatchStatusFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_connection_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
+dbus_bool_t (*dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
+dbus_bool_t (*dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus)( DBusConnection*, void**, dbus_int32_t*);
+void (*dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowUnixUserFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_connection_get_windows_user_dylibloader_wrapper_dbus)( DBusConnection*, char**);
+void (*dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowWindowsUserFunction, void*, DBusFreeFunction);
+void (*dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+void (*dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+dbus_bool_t (*dbus_connection_add_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*, DBusFreeFunction);
+void (*dbus_connection_remove_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*);
+dbus_bool_t (*dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+void (*dbus_connection_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+dbus_bool_t (*dbus_connection_set_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t, void*, DBusFreeFunction);
+void* (*dbus_connection_get_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t);
+void (*dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus)( dbus_bool_t);
+void (*dbus_connection_set_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
+long (*dbus_connection_get_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_set_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
+long (*dbus_connection_get_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
+long (*dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
+long (*dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+long (*dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus)( DBusConnection*);
+long (*dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+DBusPreallocatedSend* (*dbus_connection_preallocate_send_dylibloader_wrapper_dbus)( DBusConnection*);
+void (*dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*);
+void (*dbus_connection_send_preallocated_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*, DBusMessage*, dbus_uint32_t*);
+dbus_bool_t (*dbus_connection_try_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
+dbus_bool_t (*dbus_connection_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
+dbus_bool_t (*dbus_connection_try_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
+dbus_bool_t (*dbus_connection_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
+dbus_bool_t (*dbus_connection_unregister_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
+dbus_bool_t (*dbus_connection_get_object_path_data_dylibloader_wrapper_dbus)( DBusConnection*,const char*, void**);
+dbus_bool_t (*dbus_connection_list_registered_dylibloader_wrapper_dbus)( DBusConnection*,const char*, char***);
+dbus_bool_t (*dbus_connection_get_unix_fd_dylibloader_wrapper_dbus)( DBusConnection*, int*);
+dbus_bool_t (*dbus_connection_get_socket_dylibloader_wrapper_dbus)( DBusConnection*, int*);
+int (*dbus_watch_get_fd_dylibloader_wrapper_dbus)( DBusWatch*);
+int (*dbus_watch_get_unix_fd_dylibloader_wrapper_dbus)( DBusWatch*);
+int (*dbus_watch_get_socket_dylibloader_wrapper_dbus)( DBusWatch*);
+unsigned int (*dbus_watch_get_flags_dylibloader_wrapper_dbus)( DBusWatch*);
+void* (*dbus_watch_get_data_dylibloader_wrapper_dbus)( DBusWatch*);
+void (*dbus_watch_set_data_dylibloader_wrapper_dbus)( DBusWatch*, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_watch_handle_dylibloader_wrapper_dbus)( DBusWatch*, unsigned int);
+dbus_bool_t (*dbus_watch_get_enabled_dylibloader_wrapper_dbus)( DBusWatch*);
+int (*dbus_timeout_get_interval_dylibloader_wrapper_dbus)( DBusTimeout*);
+void* (*dbus_timeout_get_data_dylibloader_wrapper_dbus)( DBusTimeout*);
+void (*dbus_timeout_set_data_dylibloader_wrapper_dbus)( DBusTimeout*, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_timeout_handle_dylibloader_wrapper_dbus)( DBusTimeout*);
+dbus_bool_t (*dbus_timeout_get_enabled_dylibloader_wrapper_dbus)( DBusTimeout*);
+DBusConnection* (*dbus_bus_get_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
+DBusConnection* (*dbus_bus_get_private_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
+dbus_bool_t (*dbus_bus_register_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
+dbus_bool_t (*dbus_bus_set_unique_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
+const char* (*dbus_bus_get_unique_name_dylibloader_wrapper_dbus)( DBusConnection*);
+unsigned long (*dbus_bus_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+char* (*dbus_bus_get_id_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
+int (*dbus_bus_request_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, unsigned int, DBusError*);
+int (*dbus_bus_release_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+dbus_bool_t (*dbus_bus_name_has_owner_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+dbus_bool_t (*dbus_bus_start_service_by_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, dbus_uint32_t, dbus_uint32_t*, DBusError*);
+void (*dbus_bus_add_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+void (*dbus_bus_remove_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+char* (*dbus_get_local_machine_id_dylibloader_wrapper_dbus)( void);
+void (*dbus_get_version_dylibloader_wrapper_dbus)( int*, int*, int*);
+dbus_bool_t (*dbus_setenv_dylibloader_wrapper_dbus)(const char*,const char*);
+char* (*dbus_try_get_local_machine_id_dylibloader_wrapper_dbus)( DBusError*);
+DBusPendingCall* (*dbus_pending_call_ref_dylibloader_wrapper_dbus)( DBusPendingCall*);
+void (*dbus_pending_call_unref_dylibloader_wrapper_dbus)( DBusPendingCall*);
+dbus_bool_t (*dbus_pending_call_set_notify_dylibloader_wrapper_dbus)( DBusPendingCall*, DBusPendingCallNotifyFunction, void*, DBusFreeFunction);
+void (*dbus_pending_call_cancel_dylibloader_wrapper_dbus)( DBusPendingCall*);
+dbus_bool_t (*dbus_pending_call_get_completed_dylibloader_wrapper_dbus)( DBusPendingCall*);
+DBusMessage* (*dbus_pending_call_steal_reply_dylibloader_wrapper_dbus)( DBusPendingCall*);
+void (*dbus_pending_call_block_dylibloader_wrapper_dbus)( DBusPendingCall*);
+dbus_bool_t (*dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+void (*dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+dbus_bool_t (*dbus_pending_call_set_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t, void*, DBusFreeFunction);
+void* (*dbus_pending_call_get_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t);
+DBusServer* (*dbus_server_listen_dylibloader_wrapper_dbus)(const char*, DBusError*);
+DBusServer* (*dbus_server_ref_dylibloader_wrapper_dbus)( DBusServer*);
+void (*dbus_server_unref_dylibloader_wrapper_dbus)( DBusServer*);
+void (*dbus_server_disconnect_dylibloader_wrapper_dbus)( DBusServer*);
+dbus_bool_t (*dbus_server_get_is_connected_dylibloader_wrapper_dbus)( DBusServer*);
+char* (*dbus_server_get_address_dylibloader_wrapper_dbus)( DBusServer*);
+char* (*dbus_server_get_id_dylibloader_wrapper_dbus)( DBusServer*);
+void (*dbus_server_set_new_connection_function_dylibloader_wrapper_dbus)( DBusServer*, DBusNewConnectionFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_server_set_watch_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_server_set_timeout_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
+dbus_bool_t (*dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus)( DBusServer*,const char**);
+dbus_bool_t (*dbus_server_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+void (*dbus_server_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+dbus_bool_t (*dbus_server_set_data_dylibloader_wrapper_dbus)( DBusServer*, int, void*, DBusFreeFunction);
+void* (*dbus_server_get_data_dylibloader_wrapper_dbus)( DBusServer*, int);
+void (*dbus_signature_iter_init_dylibloader_wrapper_dbus)( DBusSignatureIter*,const char*);
+int (*dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+char* (*dbus_signature_iter_get_signature_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+int (*dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+dbus_bool_t (*dbus_signature_iter_next_dylibloader_wrapper_dbus)( DBusSignatureIter*);
+void (*dbus_signature_iter_recurse_dylibloader_wrapper_dbus)(const DBusSignatureIter*, DBusSignatureIter*);
+dbus_bool_t (*dbus_signature_validate_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_signature_validate_single_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_type_is_valid_dylibloader_wrapper_dbus)( int);
+dbus_bool_t (*dbus_type_is_basic_dylibloader_wrapper_dbus)( int);
+dbus_bool_t (*dbus_type_is_container_dylibloader_wrapper_dbus)( int);
+dbus_bool_t (*dbus_type_is_fixed_dylibloader_wrapper_dbus)( int);
+dbus_bool_t (*dbus_validate_path_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_validate_interface_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_validate_member_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_validate_error_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_validate_bus_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_validate_utf8_dylibloader_wrapper_dbus)(const char*, DBusError*);
+dbus_bool_t (*dbus_threads_init_dylibloader_wrapper_dbus)(const DBusThreadFunctions*);
+dbus_bool_t (*dbus_threads_init_default_dylibloader_wrapper_dbus)( void);
+int initialize_dbus(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libdbus-1.so", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// dbus_error_init
+ *(void **) (&dbus_error_init_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_error_init");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_error_free
+ *(void **) (&dbus_error_free_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_error_free");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_set_error
+ *(void **) (&dbus_set_error_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_set_error");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_set_error_const
+ *(void **) (&dbus_set_error_const_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_set_error_const");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_move_error
+ *(void **) (&dbus_move_error_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_move_error");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_error_has_name
+ *(void **) (&dbus_error_has_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_error_has_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_error_is_set
+ *(void **) (&dbus_error_is_set_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_error_is_set");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_parse_address
+ *(void **) (&dbus_parse_address_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_parse_address");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_address_entry_get_value
+ *(void **) (&dbus_address_entry_get_value_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_address_entry_get_value");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_address_entry_get_method
+ *(void **) (&dbus_address_entry_get_method_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_address_entry_get_method");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_address_entries_free
+ *(void **) (&dbus_address_entries_free_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_address_entries_free");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_address_escape_value
+ *(void **) (&dbus_address_escape_value_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_address_escape_value");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_address_unescape_value
+ *(void **) (&dbus_address_unescape_value_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_address_unescape_value");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_malloc
+ *(void **) (&dbus_malloc_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_malloc");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_malloc0
+ *(void **) (&dbus_malloc0_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_malloc0");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_realloc
+ *(void **) (&dbus_realloc_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_realloc");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_free
+ *(void **) (&dbus_free_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_free");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_free_string_array
+ *(void **) (&dbus_free_string_array_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_free_string_array");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_shutdown
+ *(void **) (&dbus_shutdown_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_shutdown");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new
+ *(void **) (&dbus_message_new_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new_method_call
+ *(void **) (&dbus_message_new_method_call_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new_method_call");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new_method_return
+ *(void **) (&dbus_message_new_method_return_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new_method_return");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new_signal
+ *(void **) (&dbus_message_new_signal_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new_signal");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new_error
+ *(void **) (&dbus_message_new_error_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new_error");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_new_error_printf
+ *(void **) (&dbus_message_new_error_printf_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_new_error_printf");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_copy
+ *(void **) (&dbus_message_copy_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_copy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_ref
+ *(void **) (&dbus_message_ref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_ref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_unref
+ *(void **) (&dbus_message_unref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_unref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_type
+ *(void **) (&dbus_message_get_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_path
+ *(void **) (&dbus_message_set_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_path
+ *(void **) (&dbus_message_get_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_path
+ *(void **) (&dbus_message_has_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_interface
+ *(void **) (&dbus_message_set_interface_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_interface");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_interface
+ *(void **) (&dbus_message_get_interface_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_interface");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_interface
+ *(void **) (&dbus_message_has_interface_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_interface");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_member
+ *(void **) (&dbus_message_set_member_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_member");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_member
+ *(void **) (&dbus_message_get_member_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_member");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_member
+ *(void **) (&dbus_message_has_member_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_member");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_error_name
+ *(void **) (&dbus_message_set_error_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_error_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_error_name
+ *(void **) (&dbus_message_get_error_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_error_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_destination
+ *(void **) (&dbus_message_set_destination_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_destination");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_destination
+ *(void **) (&dbus_message_get_destination_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_destination");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_sender
+ *(void **) (&dbus_message_set_sender_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_sender");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_sender
+ *(void **) (&dbus_message_get_sender_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_sender");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_signature
+ *(void **) (&dbus_message_get_signature_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_signature");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_no_reply
+ *(void **) (&dbus_message_set_no_reply_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_no_reply");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_no_reply
+ *(void **) (&dbus_message_get_no_reply_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_no_reply");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_is_method_call
+ *(void **) (&dbus_message_is_method_call_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_is_method_call");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_is_signal
+ *(void **) (&dbus_message_is_signal_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_is_signal");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_is_error
+ *(void **) (&dbus_message_is_error_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_is_error");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_destination
+ *(void **) (&dbus_message_has_destination_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_destination");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_sender
+ *(void **) (&dbus_message_has_sender_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_sender");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_has_signature
+ *(void **) (&dbus_message_has_signature_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_has_signature");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_serial
+ *(void **) (&dbus_message_get_serial_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_serial");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_serial
+ *(void **) (&dbus_message_set_serial_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_serial");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_reply_serial
+ *(void **) (&dbus_message_set_reply_serial_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_reply_serial");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_reply_serial
+ *(void **) (&dbus_message_get_reply_serial_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_reply_serial");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_auto_start
+ *(void **) (&dbus_message_set_auto_start_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_auto_start");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_auto_start
+ *(void **) (&dbus_message_get_auto_start_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_auto_start");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_path_decomposed
+ *(void **) (&dbus_message_get_path_decomposed_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_path_decomposed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_append_args
+ *(void **) (&dbus_message_append_args_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_append_args");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_append_args_valist
+ *(void **) (&dbus_message_append_args_valist_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_append_args_valist");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_args
+ *(void **) (&dbus_message_get_args_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_args");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_args_valist
+ *(void **) (&dbus_message_get_args_valist_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_args_valist");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_contains_unix_fds
+ *(void **) (&dbus_message_contains_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_contains_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_init_closed
+ *(void **) (&dbus_message_iter_init_closed_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_init_closed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_init
+ *(void **) (&dbus_message_iter_init_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_init");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_has_next
+ *(void **) (&dbus_message_iter_has_next_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_has_next");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_next
+ *(void **) (&dbus_message_iter_next_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_next");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_signature
+ *(void **) (&dbus_message_iter_get_signature_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_signature");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_arg_type
+ *(void **) (&dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_arg_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_element_type
+ *(void **) (&dbus_message_iter_get_element_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_element_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_recurse
+ *(void **) (&dbus_message_iter_recurse_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_recurse");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_basic
+ *(void **) (&dbus_message_iter_get_basic_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_basic");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_element_count
+ *(void **) (&dbus_message_iter_get_element_count_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_element_count");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_array_len
+ *(void **) (&dbus_message_iter_get_array_len_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_array_len");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_get_fixed_array
+ *(void **) (&dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_get_fixed_array");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_init_append
+ *(void **) (&dbus_message_iter_init_append_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_init_append");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_append_basic
+ *(void **) (&dbus_message_iter_append_basic_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_append_basic");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_append_fixed_array
+ *(void **) (&dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_append_fixed_array");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_open_container
+ *(void **) (&dbus_message_iter_open_container_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_open_container");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_close_container
+ *(void **) (&dbus_message_iter_close_container_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_close_container");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_abandon_container
+ *(void **) (&dbus_message_iter_abandon_container_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_abandon_container");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_iter_abandon_container_if_open
+ *(void **) (&dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_iter_abandon_container_if_open");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_lock
+ *(void **) (&dbus_message_lock_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_lock");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_set_error_from_message
+ *(void **) (&dbus_set_error_from_message_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_set_error_from_message");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_allocate_data_slot
+ *(void **) (&dbus_message_allocate_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_allocate_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_free_data_slot
+ *(void **) (&dbus_message_free_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_free_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_data
+ *(void **) (&dbus_message_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_data
+ *(void **) (&dbus_message_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_type_from_string
+ *(void **) (&dbus_message_type_from_string_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_type_from_string");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_type_to_string
+ *(void **) (&dbus_message_type_to_string_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_type_to_string");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_marshal
+ *(void **) (&dbus_message_marshal_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_marshal");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_demarshal
+ *(void **) (&dbus_message_demarshal_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_demarshal");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_demarshal_bytes_needed
+ *(void **) (&dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_demarshal_bytes_needed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_set_allow_interactive_authorization
+ *(void **) (&dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_set_allow_interactive_authorization");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_message_get_allow_interactive_authorization
+ *(void **) (&dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_message_get_allow_interactive_authorization");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_open
+ *(void **) (&dbus_connection_open_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_open");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_open_private
+ *(void **) (&dbus_connection_open_private_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_open_private");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_ref
+ *(void **) (&dbus_connection_ref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_ref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_unref
+ *(void **) (&dbus_connection_unref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_unref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_close
+ *(void **) (&dbus_connection_close_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_close");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_is_connected
+ *(void **) (&dbus_connection_get_is_connected_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_is_connected");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_is_authenticated
+ *(void **) (&dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_is_authenticated");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_is_anonymous
+ *(void **) (&dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_is_anonymous");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_server_id
+ *(void **) (&dbus_connection_get_server_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_server_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_can_send_type
+ *(void **) (&dbus_connection_can_send_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_can_send_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_exit_on_disconnect
+ *(void **) (&dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_exit_on_disconnect");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_flush
+ *(void **) (&dbus_connection_flush_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_flush");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_read_write_dispatch
+ *(void **) (&dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_read_write_dispatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_read_write
+ *(void **) (&dbus_connection_read_write_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_read_write");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_borrow_message
+ *(void **) (&dbus_connection_borrow_message_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_borrow_message");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_return_message
+ *(void **) (&dbus_connection_return_message_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_return_message");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_steal_borrowed_message
+ *(void **) (&dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_steal_borrowed_message");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_pop_message
+ *(void **) (&dbus_connection_pop_message_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_pop_message");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_dispatch_status
+ *(void **) (&dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_dispatch_status");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_dispatch
+ *(void **) (&dbus_connection_dispatch_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_dispatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_has_messages_to_send
+ *(void **) (&dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_has_messages_to_send");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_send
+ *(void **) (&dbus_connection_send_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_send");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_send_with_reply
+ *(void **) (&dbus_connection_send_with_reply_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_send_with_reply");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_send_with_reply_and_block
+ *(void **) (&dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_send_with_reply_and_block");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_watch_functions
+ *(void **) (&dbus_connection_set_watch_functions_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_watch_functions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_timeout_functions
+ *(void **) (&dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_timeout_functions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_wakeup_main_function
+ *(void **) (&dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_wakeup_main_function");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_dispatch_status_function
+ *(void **) (&dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_dispatch_status_function");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_unix_user
+ *(void **) (&dbus_connection_get_unix_user_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_unix_user");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_unix_process_id
+ *(void **) (&dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_unix_process_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_adt_audit_session_data
+ *(void **) (&dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_adt_audit_session_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_unix_user_function
+ *(void **) (&dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_unix_user_function");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_windows_user
+ *(void **) (&dbus_connection_get_windows_user_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_windows_user");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_windows_user_function
+ *(void **) (&dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_windows_user_function");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_allow_anonymous
+ *(void **) (&dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_allow_anonymous");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_route_peer_messages
+ *(void **) (&dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_route_peer_messages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_add_filter
+ *(void **) (&dbus_connection_add_filter_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_add_filter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_remove_filter
+ *(void **) (&dbus_connection_remove_filter_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_remove_filter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_allocate_data_slot
+ *(void **) (&dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_allocate_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_free_data_slot
+ *(void **) (&dbus_connection_free_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_free_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_data
+ *(void **) (&dbus_connection_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_data
+ *(void **) (&dbus_connection_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_change_sigpipe
+ *(void **) (&dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_change_sigpipe");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_max_message_size
+ *(void **) (&dbus_connection_set_max_message_size_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_max_message_size");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_max_message_size
+ *(void **) (&dbus_connection_get_max_message_size_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_max_message_size");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_max_received_size
+ *(void **) (&dbus_connection_set_max_received_size_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_max_received_size");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_max_received_size
+ *(void **) (&dbus_connection_get_max_received_size_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_max_received_size");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_max_message_unix_fds
+ *(void **) (&dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_max_message_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_max_message_unix_fds
+ *(void **) (&dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_max_message_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_set_max_received_unix_fds
+ *(void **) (&dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_set_max_received_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_max_received_unix_fds
+ *(void **) (&dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_max_received_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_outgoing_size
+ *(void **) (&dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_outgoing_size");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_outgoing_unix_fds
+ *(void **) (&dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_outgoing_unix_fds");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_preallocate_send
+ *(void **) (&dbus_connection_preallocate_send_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_preallocate_send");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_free_preallocated_send
+ *(void **) (&dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_free_preallocated_send");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_send_preallocated
+ *(void **) (&dbus_connection_send_preallocated_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_send_preallocated");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_try_register_object_path
+ *(void **) (&dbus_connection_try_register_object_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_try_register_object_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_register_object_path
+ *(void **) (&dbus_connection_register_object_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_register_object_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_try_register_fallback
+ *(void **) (&dbus_connection_try_register_fallback_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_try_register_fallback");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_register_fallback
+ *(void **) (&dbus_connection_register_fallback_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_register_fallback");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_unregister_object_path
+ *(void **) (&dbus_connection_unregister_object_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_unregister_object_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_object_path_data
+ *(void **) (&dbus_connection_get_object_path_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_object_path_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_list_registered
+ *(void **) (&dbus_connection_list_registered_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_list_registered");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_unix_fd
+ *(void **) (&dbus_connection_get_unix_fd_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_unix_fd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_connection_get_socket
+ *(void **) (&dbus_connection_get_socket_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_connection_get_socket");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_fd
+ *(void **) (&dbus_watch_get_fd_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_fd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_unix_fd
+ *(void **) (&dbus_watch_get_unix_fd_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_unix_fd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_socket
+ *(void **) (&dbus_watch_get_socket_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_socket");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_flags
+ *(void **) (&dbus_watch_get_flags_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_flags");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_data
+ *(void **) (&dbus_watch_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_set_data
+ *(void **) (&dbus_watch_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_handle
+ *(void **) (&dbus_watch_handle_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_handle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_watch_get_enabled
+ *(void **) (&dbus_watch_get_enabled_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_watch_get_enabled");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_timeout_get_interval
+ *(void **) (&dbus_timeout_get_interval_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_timeout_get_interval");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_timeout_get_data
+ *(void **) (&dbus_timeout_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_timeout_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_timeout_set_data
+ *(void **) (&dbus_timeout_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_timeout_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_timeout_handle
+ *(void **) (&dbus_timeout_handle_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_timeout_handle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_timeout_get_enabled
+ *(void **) (&dbus_timeout_get_enabled_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_timeout_get_enabled");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_get
+ *(void **) (&dbus_bus_get_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_get");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_get_private
+ *(void **) (&dbus_bus_get_private_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_get_private");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_register
+ *(void **) (&dbus_bus_register_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_register");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_set_unique_name
+ *(void **) (&dbus_bus_set_unique_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_set_unique_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_get_unique_name
+ *(void **) (&dbus_bus_get_unique_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_get_unique_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_get_unix_user
+ *(void **) (&dbus_bus_get_unix_user_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_get_unix_user");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_get_id
+ *(void **) (&dbus_bus_get_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_get_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_request_name
+ *(void **) (&dbus_bus_request_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_request_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_release_name
+ *(void **) (&dbus_bus_release_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_release_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_name_has_owner
+ *(void **) (&dbus_bus_name_has_owner_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_name_has_owner");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_start_service_by_name
+ *(void **) (&dbus_bus_start_service_by_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_start_service_by_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_add_match
+ *(void **) (&dbus_bus_add_match_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_add_match");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_bus_remove_match
+ *(void **) (&dbus_bus_remove_match_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_bus_remove_match");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_get_local_machine_id
+ *(void **) (&dbus_get_local_machine_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_get_local_machine_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_get_version
+ *(void **) (&dbus_get_version_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_get_version");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_setenv
+ *(void **) (&dbus_setenv_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_setenv");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_try_get_local_machine_id
+ *(void **) (&dbus_try_get_local_machine_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_try_get_local_machine_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_ref
+ *(void **) (&dbus_pending_call_ref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_ref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_unref
+ *(void **) (&dbus_pending_call_unref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_unref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_set_notify
+ *(void **) (&dbus_pending_call_set_notify_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_set_notify");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_cancel
+ *(void **) (&dbus_pending_call_cancel_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_cancel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_get_completed
+ *(void **) (&dbus_pending_call_get_completed_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_get_completed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_steal_reply
+ *(void **) (&dbus_pending_call_steal_reply_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_steal_reply");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_block
+ *(void **) (&dbus_pending_call_block_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_block");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_allocate_data_slot
+ *(void **) (&dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_allocate_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_free_data_slot
+ *(void **) (&dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_free_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_set_data
+ *(void **) (&dbus_pending_call_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_pending_call_get_data
+ *(void **) (&dbus_pending_call_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_pending_call_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_listen
+ *(void **) (&dbus_server_listen_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_listen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_ref
+ *(void **) (&dbus_server_ref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_ref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_unref
+ *(void **) (&dbus_server_unref_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_unref");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_disconnect
+ *(void **) (&dbus_server_disconnect_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_disconnect");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_get_is_connected
+ *(void **) (&dbus_server_get_is_connected_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_get_is_connected");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_get_address
+ *(void **) (&dbus_server_get_address_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_get_address");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_get_id
+ *(void **) (&dbus_server_get_id_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_get_id");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_set_new_connection_function
+ *(void **) (&dbus_server_set_new_connection_function_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_set_new_connection_function");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_set_watch_functions
+ *(void **) (&dbus_server_set_watch_functions_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_set_watch_functions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_set_timeout_functions
+ *(void **) (&dbus_server_set_timeout_functions_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_set_timeout_functions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_set_auth_mechanisms
+ *(void **) (&dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_set_auth_mechanisms");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_allocate_data_slot
+ *(void **) (&dbus_server_allocate_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_allocate_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_free_data_slot
+ *(void **) (&dbus_server_free_data_slot_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_free_data_slot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_set_data
+ *(void **) (&dbus_server_set_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_set_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_server_get_data
+ *(void **) (&dbus_server_get_data_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_server_get_data");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_init
+ *(void **) (&dbus_signature_iter_init_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_init");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_get_current_type
+ *(void **) (&dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_get_current_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_get_signature
+ *(void **) (&dbus_signature_iter_get_signature_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_get_signature");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_get_element_type
+ *(void **) (&dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_get_element_type");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_next
+ *(void **) (&dbus_signature_iter_next_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_next");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_iter_recurse
+ *(void **) (&dbus_signature_iter_recurse_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_iter_recurse");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_validate
+ *(void **) (&dbus_signature_validate_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_validate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_signature_validate_single
+ *(void **) (&dbus_signature_validate_single_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_signature_validate_single");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_type_is_valid
+ *(void **) (&dbus_type_is_valid_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_type_is_valid");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_type_is_basic
+ *(void **) (&dbus_type_is_basic_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_type_is_basic");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_type_is_container
+ *(void **) (&dbus_type_is_container_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_type_is_container");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_type_is_fixed
+ *(void **) (&dbus_type_is_fixed_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_type_is_fixed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_path
+ *(void **) (&dbus_validate_path_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_path");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_interface
+ *(void **) (&dbus_validate_interface_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_interface");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_member
+ *(void **) (&dbus_validate_member_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_member");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_error_name
+ *(void **) (&dbus_validate_error_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_error_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_bus_name
+ *(void **) (&dbus_validate_bus_name_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_bus_name");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_validate_utf8
+ *(void **) (&dbus_validate_utf8_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_validate_utf8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_threads_init
+ *(void **) (&dbus_threads_init_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_threads_init");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// dbus_threads_init_default
+ *(void **) (&dbus_threads_init_default_dylibloader_wrapper_dbus) = dlsym(handle, "dbus_threads_init_default");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/dbus-so_wrap.h b/platform/linuxbsd/dbus-so_wrap.h
new file mode 100644
index 0000000000..52e1dd300c
--- /dev/null
+++ b/platform/linuxbsd/dbus-so_wrap.h
@@ -0,0 +1,970 @@
+#ifndef DYLIBLOAD_WRAPPER_DBUS
+#define DYLIBLOAD_WRAPPER_DBUS
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-07-29 07:23:21
+// flags: ./generate-wrapper.py --include /usr/include/dbus-1.0/dbus/dbus.h --sys-include <dbus/dbus.h> --soname libdbus-1.so --init-name dbus --output-header dbus-so_wrap.h --output-implementation dbus-so_wrap.c
+//
+#include <stdint.h>
+
+#define dbus_error_init dbus_error_init_dylibloader_orig_dbus
+#define dbus_error_free dbus_error_free_dylibloader_orig_dbus
+#define dbus_set_error dbus_set_error_dylibloader_orig_dbus
+#define dbus_set_error_const dbus_set_error_const_dylibloader_orig_dbus
+#define dbus_move_error dbus_move_error_dylibloader_orig_dbus
+#define dbus_error_has_name dbus_error_has_name_dylibloader_orig_dbus
+#define dbus_error_is_set dbus_error_is_set_dylibloader_orig_dbus
+#define dbus_parse_address dbus_parse_address_dylibloader_orig_dbus
+#define dbus_address_entry_get_value dbus_address_entry_get_value_dylibloader_orig_dbus
+#define dbus_address_entry_get_method dbus_address_entry_get_method_dylibloader_orig_dbus
+#define dbus_address_entries_free dbus_address_entries_free_dylibloader_orig_dbus
+#define dbus_address_escape_value dbus_address_escape_value_dylibloader_orig_dbus
+#define dbus_address_unescape_value dbus_address_unescape_value_dylibloader_orig_dbus
+#define dbus_malloc dbus_malloc_dylibloader_orig_dbus
+#define dbus_malloc0 dbus_malloc0_dylibloader_orig_dbus
+#define dbus_realloc dbus_realloc_dylibloader_orig_dbus
+#define dbus_free dbus_free_dylibloader_orig_dbus
+#define dbus_free_string_array dbus_free_string_array_dylibloader_orig_dbus
+#define dbus_shutdown dbus_shutdown_dylibloader_orig_dbus
+#define dbus_message_new dbus_message_new_dylibloader_orig_dbus
+#define dbus_message_new_method_call dbus_message_new_method_call_dylibloader_orig_dbus
+#define dbus_message_new_method_return dbus_message_new_method_return_dylibloader_orig_dbus
+#define dbus_message_new_signal dbus_message_new_signal_dylibloader_orig_dbus
+#define dbus_message_new_error dbus_message_new_error_dylibloader_orig_dbus
+#define dbus_message_new_error_printf dbus_message_new_error_printf_dylibloader_orig_dbus
+#define dbus_message_copy dbus_message_copy_dylibloader_orig_dbus
+#define dbus_message_ref dbus_message_ref_dylibloader_orig_dbus
+#define dbus_message_unref dbus_message_unref_dylibloader_orig_dbus
+#define dbus_message_get_type dbus_message_get_type_dylibloader_orig_dbus
+#define dbus_message_set_path dbus_message_set_path_dylibloader_orig_dbus
+#define dbus_message_get_path dbus_message_get_path_dylibloader_orig_dbus
+#define dbus_message_has_path dbus_message_has_path_dylibloader_orig_dbus
+#define dbus_message_set_interface dbus_message_set_interface_dylibloader_orig_dbus
+#define dbus_message_get_interface dbus_message_get_interface_dylibloader_orig_dbus
+#define dbus_message_has_interface dbus_message_has_interface_dylibloader_orig_dbus
+#define dbus_message_set_member dbus_message_set_member_dylibloader_orig_dbus
+#define dbus_message_get_member dbus_message_get_member_dylibloader_orig_dbus
+#define dbus_message_has_member dbus_message_has_member_dylibloader_orig_dbus
+#define dbus_message_set_error_name dbus_message_set_error_name_dylibloader_orig_dbus
+#define dbus_message_get_error_name dbus_message_get_error_name_dylibloader_orig_dbus
+#define dbus_message_set_destination dbus_message_set_destination_dylibloader_orig_dbus
+#define dbus_message_get_destination dbus_message_get_destination_dylibloader_orig_dbus
+#define dbus_message_set_sender dbus_message_set_sender_dylibloader_orig_dbus
+#define dbus_message_get_sender dbus_message_get_sender_dylibloader_orig_dbus
+#define dbus_message_get_signature dbus_message_get_signature_dylibloader_orig_dbus
+#define dbus_message_set_no_reply dbus_message_set_no_reply_dylibloader_orig_dbus
+#define dbus_message_get_no_reply dbus_message_get_no_reply_dylibloader_orig_dbus
+#define dbus_message_is_method_call dbus_message_is_method_call_dylibloader_orig_dbus
+#define dbus_message_is_signal dbus_message_is_signal_dylibloader_orig_dbus
+#define dbus_message_is_error dbus_message_is_error_dylibloader_orig_dbus
+#define dbus_message_has_destination dbus_message_has_destination_dylibloader_orig_dbus
+#define dbus_message_has_sender dbus_message_has_sender_dylibloader_orig_dbus
+#define dbus_message_has_signature dbus_message_has_signature_dylibloader_orig_dbus
+#define dbus_message_get_serial dbus_message_get_serial_dylibloader_orig_dbus
+#define dbus_message_set_serial dbus_message_set_serial_dylibloader_orig_dbus
+#define dbus_message_set_reply_serial dbus_message_set_reply_serial_dylibloader_orig_dbus
+#define dbus_message_get_reply_serial dbus_message_get_reply_serial_dylibloader_orig_dbus
+#define dbus_message_set_auto_start dbus_message_set_auto_start_dylibloader_orig_dbus
+#define dbus_message_get_auto_start dbus_message_get_auto_start_dylibloader_orig_dbus
+#define dbus_message_get_path_decomposed dbus_message_get_path_decomposed_dylibloader_orig_dbus
+#define dbus_message_append_args dbus_message_append_args_dylibloader_orig_dbus
+#define dbus_message_append_args_valist dbus_message_append_args_valist_dylibloader_orig_dbus
+#define dbus_message_get_args dbus_message_get_args_dylibloader_orig_dbus
+#define dbus_message_get_args_valist dbus_message_get_args_valist_dylibloader_orig_dbus
+#define dbus_message_contains_unix_fds dbus_message_contains_unix_fds_dylibloader_orig_dbus
+#define dbus_message_iter_init_closed dbus_message_iter_init_closed_dylibloader_orig_dbus
+#define dbus_message_iter_init dbus_message_iter_init_dylibloader_orig_dbus
+#define dbus_message_iter_has_next dbus_message_iter_has_next_dylibloader_orig_dbus
+#define dbus_message_iter_next dbus_message_iter_next_dylibloader_orig_dbus
+#define dbus_message_iter_get_signature dbus_message_iter_get_signature_dylibloader_orig_dbus
+#define dbus_message_iter_get_arg_type dbus_message_iter_get_arg_type_dylibloader_orig_dbus
+#define dbus_message_iter_get_element_type dbus_message_iter_get_element_type_dylibloader_orig_dbus
+#define dbus_message_iter_recurse dbus_message_iter_recurse_dylibloader_orig_dbus
+#define dbus_message_iter_get_basic dbus_message_iter_get_basic_dylibloader_orig_dbus
+#define dbus_message_iter_get_element_count dbus_message_iter_get_element_count_dylibloader_orig_dbus
+#define dbus_message_iter_get_array_len dbus_message_iter_get_array_len_dylibloader_orig_dbus
+#define dbus_message_iter_get_fixed_array dbus_message_iter_get_fixed_array_dylibloader_orig_dbus
+#define dbus_message_iter_init_append dbus_message_iter_init_append_dylibloader_orig_dbus
+#define dbus_message_iter_append_basic dbus_message_iter_append_basic_dylibloader_orig_dbus
+#define dbus_message_iter_append_fixed_array dbus_message_iter_append_fixed_array_dylibloader_orig_dbus
+#define dbus_message_iter_open_container dbus_message_iter_open_container_dylibloader_orig_dbus
+#define dbus_message_iter_close_container dbus_message_iter_close_container_dylibloader_orig_dbus
+#define dbus_message_iter_abandon_container dbus_message_iter_abandon_container_dylibloader_orig_dbus
+#define dbus_message_iter_abandon_container_if_open dbus_message_iter_abandon_container_if_open_dylibloader_orig_dbus
+#define dbus_message_lock dbus_message_lock_dylibloader_orig_dbus
+#define dbus_set_error_from_message dbus_set_error_from_message_dylibloader_orig_dbus
+#define dbus_message_allocate_data_slot dbus_message_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_message_free_data_slot dbus_message_free_data_slot_dylibloader_orig_dbus
+#define dbus_message_set_data dbus_message_set_data_dylibloader_orig_dbus
+#define dbus_message_get_data dbus_message_get_data_dylibloader_orig_dbus
+#define dbus_message_type_from_string dbus_message_type_from_string_dylibloader_orig_dbus
+#define dbus_message_type_to_string dbus_message_type_to_string_dylibloader_orig_dbus
+#define dbus_message_marshal dbus_message_marshal_dylibloader_orig_dbus
+#define dbus_message_demarshal dbus_message_demarshal_dylibloader_orig_dbus
+#define dbus_message_demarshal_bytes_needed dbus_message_demarshal_bytes_needed_dylibloader_orig_dbus
+#define dbus_message_set_allow_interactive_authorization dbus_message_set_allow_interactive_authorization_dylibloader_orig_dbus
+#define dbus_message_get_allow_interactive_authorization dbus_message_get_allow_interactive_authorization_dylibloader_orig_dbus
+#define dbus_connection_open dbus_connection_open_dylibloader_orig_dbus
+#define dbus_connection_open_private dbus_connection_open_private_dylibloader_orig_dbus
+#define dbus_connection_ref dbus_connection_ref_dylibloader_orig_dbus
+#define dbus_connection_unref dbus_connection_unref_dylibloader_orig_dbus
+#define dbus_connection_close dbus_connection_close_dylibloader_orig_dbus
+#define dbus_connection_get_is_connected dbus_connection_get_is_connected_dylibloader_orig_dbus
+#define dbus_connection_get_is_authenticated dbus_connection_get_is_authenticated_dylibloader_orig_dbus
+#define dbus_connection_get_is_anonymous dbus_connection_get_is_anonymous_dylibloader_orig_dbus
+#define dbus_connection_get_server_id dbus_connection_get_server_id_dylibloader_orig_dbus
+#define dbus_connection_can_send_type dbus_connection_can_send_type_dylibloader_orig_dbus
+#define dbus_connection_set_exit_on_disconnect dbus_connection_set_exit_on_disconnect_dylibloader_orig_dbus
+#define dbus_connection_flush dbus_connection_flush_dylibloader_orig_dbus
+#define dbus_connection_read_write_dispatch dbus_connection_read_write_dispatch_dylibloader_orig_dbus
+#define dbus_connection_read_write dbus_connection_read_write_dylibloader_orig_dbus
+#define dbus_connection_borrow_message dbus_connection_borrow_message_dylibloader_orig_dbus
+#define dbus_connection_return_message dbus_connection_return_message_dylibloader_orig_dbus
+#define dbus_connection_steal_borrowed_message dbus_connection_steal_borrowed_message_dylibloader_orig_dbus
+#define dbus_connection_pop_message dbus_connection_pop_message_dylibloader_orig_dbus
+#define dbus_connection_get_dispatch_status dbus_connection_get_dispatch_status_dylibloader_orig_dbus
+#define dbus_connection_dispatch dbus_connection_dispatch_dylibloader_orig_dbus
+#define dbus_connection_has_messages_to_send dbus_connection_has_messages_to_send_dylibloader_orig_dbus
+#define dbus_connection_send dbus_connection_send_dylibloader_orig_dbus
+#define dbus_connection_send_with_reply dbus_connection_send_with_reply_dylibloader_orig_dbus
+#define dbus_connection_send_with_reply_and_block dbus_connection_send_with_reply_and_block_dylibloader_orig_dbus
+#define dbus_connection_set_watch_functions dbus_connection_set_watch_functions_dylibloader_orig_dbus
+#define dbus_connection_set_timeout_functions dbus_connection_set_timeout_functions_dylibloader_orig_dbus
+#define dbus_connection_set_wakeup_main_function dbus_connection_set_wakeup_main_function_dylibloader_orig_dbus
+#define dbus_connection_set_dispatch_status_function dbus_connection_set_dispatch_status_function_dylibloader_orig_dbus
+#define dbus_connection_get_unix_user dbus_connection_get_unix_user_dylibloader_orig_dbus
+#define dbus_connection_get_unix_process_id dbus_connection_get_unix_process_id_dylibloader_orig_dbus
+#define dbus_connection_get_adt_audit_session_data dbus_connection_get_adt_audit_session_data_dylibloader_orig_dbus
+#define dbus_connection_set_unix_user_function dbus_connection_set_unix_user_function_dylibloader_orig_dbus
+#define dbus_connection_get_windows_user dbus_connection_get_windows_user_dylibloader_orig_dbus
+#define dbus_connection_set_windows_user_function dbus_connection_set_windows_user_function_dylibloader_orig_dbus
+#define dbus_connection_set_allow_anonymous dbus_connection_set_allow_anonymous_dylibloader_orig_dbus
+#define dbus_connection_set_route_peer_messages dbus_connection_set_route_peer_messages_dylibloader_orig_dbus
+#define dbus_connection_add_filter dbus_connection_add_filter_dylibloader_orig_dbus
+#define dbus_connection_remove_filter dbus_connection_remove_filter_dylibloader_orig_dbus
+#define dbus_connection_allocate_data_slot dbus_connection_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_connection_free_data_slot dbus_connection_free_data_slot_dylibloader_orig_dbus
+#define dbus_connection_set_data dbus_connection_set_data_dylibloader_orig_dbus
+#define dbus_connection_get_data dbus_connection_get_data_dylibloader_orig_dbus
+#define dbus_connection_set_change_sigpipe dbus_connection_set_change_sigpipe_dylibloader_orig_dbus
+#define dbus_connection_set_max_message_size dbus_connection_set_max_message_size_dylibloader_orig_dbus
+#define dbus_connection_get_max_message_size dbus_connection_get_max_message_size_dylibloader_orig_dbus
+#define dbus_connection_set_max_received_size dbus_connection_set_max_received_size_dylibloader_orig_dbus
+#define dbus_connection_get_max_received_size dbus_connection_get_max_received_size_dylibloader_orig_dbus
+#define dbus_connection_set_max_message_unix_fds dbus_connection_set_max_message_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_max_message_unix_fds dbus_connection_get_max_message_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_set_max_received_unix_fds dbus_connection_set_max_received_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_max_received_unix_fds dbus_connection_get_max_received_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_get_outgoing_size dbus_connection_get_outgoing_size_dylibloader_orig_dbus
+#define dbus_connection_get_outgoing_unix_fds dbus_connection_get_outgoing_unix_fds_dylibloader_orig_dbus
+#define dbus_connection_preallocate_send dbus_connection_preallocate_send_dylibloader_orig_dbus
+#define dbus_connection_free_preallocated_send dbus_connection_free_preallocated_send_dylibloader_orig_dbus
+#define dbus_connection_send_preallocated dbus_connection_send_preallocated_dylibloader_orig_dbus
+#define dbus_connection_try_register_object_path dbus_connection_try_register_object_path_dylibloader_orig_dbus
+#define dbus_connection_register_object_path dbus_connection_register_object_path_dylibloader_orig_dbus
+#define dbus_connection_try_register_fallback dbus_connection_try_register_fallback_dylibloader_orig_dbus
+#define dbus_connection_register_fallback dbus_connection_register_fallback_dylibloader_orig_dbus
+#define dbus_connection_unregister_object_path dbus_connection_unregister_object_path_dylibloader_orig_dbus
+#define dbus_connection_get_object_path_data dbus_connection_get_object_path_data_dylibloader_orig_dbus
+#define dbus_connection_list_registered dbus_connection_list_registered_dylibloader_orig_dbus
+#define dbus_connection_get_unix_fd dbus_connection_get_unix_fd_dylibloader_orig_dbus
+#define dbus_connection_get_socket dbus_connection_get_socket_dylibloader_orig_dbus
+#define dbus_watch_get_fd dbus_watch_get_fd_dylibloader_orig_dbus
+#define dbus_watch_get_unix_fd dbus_watch_get_unix_fd_dylibloader_orig_dbus
+#define dbus_watch_get_socket dbus_watch_get_socket_dylibloader_orig_dbus
+#define dbus_watch_get_flags dbus_watch_get_flags_dylibloader_orig_dbus
+#define dbus_watch_get_data dbus_watch_get_data_dylibloader_orig_dbus
+#define dbus_watch_set_data dbus_watch_set_data_dylibloader_orig_dbus
+#define dbus_watch_handle dbus_watch_handle_dylibloader_orig_dbus
+#define dbus_watch_get_enabled dbus_watch_get_enabled_dylibloader_orig_dbus
+#define dbus_timeout_get_interval dbus_timeout_get_interval_dylibloader_orig_dbus
+#define dbus_timeout_get_data dbus_timeout_get_data_dylibloader_orig_dbus
+#define dbus_timeout_set_data dbus_timeout_set_data_dylibloader_orig_dbus
+#define dbus_timeout_handle dbus_timeout_handle_dylibloader_orig_dbus
+#define dbus_timeout_get_enabled dbus_timeout_get_enabled_dylibloader_orig_dbus
+#define dbus_bus_get dbus_bus_get_dylibloader_orig_dbus
+#define dbus_bus_get_private dbus_bus_get_private_dylibloader_orig_dbus
+#define dbus_bus_register dbus_bus_register_dylibloader_orig_dbus
+#define dbus_bus_set_unique_name dbus_bus_set_unique_name_dylibloader_orig_dbus
+#define dbus_bus_get_unique_name dbus_bus_get_unique_name_dylibloader_orig_dbus
+#define dbus_bus_get_unix_user dbus_bus_get_unix_user_dylibloader_orig_dbus
+#define dbus_bus_get_id dbus_bus_get_id_dylibloader_orig_dbus
+#define dbus_bus_request_name dbus_bus_request_name_dylibloader_orig_dbus
+#define dbus_bus_release_name dbus_bus_release_name_dylibloader_orig_dbus
+#define dbus_bus_name_has_owner dbus_bus_name_has_owner_dylibloader_orig_dbus
+#define dbus_bus_start_service_by_name dbus_bus_start_service_by_name_dylibloader_orig_dbus
+#define dbus_bus_add_match dbus_bus_add_match_dylibloader_orig_dbus
+#define dbus_bus_remove_match dbus_bus_remove_match_dylibloader_orig_dbus
+#define dbus_get_local_machine_id dbus_get_local_machine_id_dylibloader_orig_dbus
+#define dbus_get_version dbus_get_version_dylibloader_orig_dbus
+#define dbus_setenv dbus_setenv_dylibloader_orig_dbus
+#define dbus_try_get_local_machine_id dbus_try_get_local_machine_id_dylibloader_orig_dbus
+#define dbus_pending_call_ref dbus_pending_call_ref_dylibloader_orig_dbus
+#define dbus_pending_call_unref dbus_pending_call_unref_dylibloader_orig_dbus
+#define dbus_pending_call_set_notify dbus_pending_call_set_notify_dylibloader_orig_dbus
+#define dbus_pending_call_cancel dbus_pending_call_cancel_dylibloader_orig_dbus
+#define dbus_pending_call_get_completed dbus_pending_call_get_completed_dylibloader_orig_dbus
+#define dbus_pending_call_steal_reply dbus_pending_call_steal_reply_dylibloader_orig_dbus
+#define dbus_pending_call_block dbus_pending_call_block_dylibloader_orig_dbus
+#define dbus_pending_call_allocate_data_slot dbus_pending_call_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_pending_call_free_data_slot dbus_pending_call_free_data_slot_dylibloader_orig_dbus
+#define dbus_pending_call_set_data dbus_pending_call_set_data_dylibloader_orig_dbus
+#define dbus_pending_call_get_data dbus_pending_call_get_data_dylibloader_orig_dbus
+#define dbus_server_listen dbus_server_listen_dylibloader_orig_dbus
+#define dbus_server_ref dbus_server_ref_dylibloader_orig_dbus
+#define dbus_server_unref dbus_server_unref_dylibloader_orig_dbus
+#define dbus_server_disconnect dbus_server_disconnect_dylibloader_orig_dbus
+#define dbus_server_get_is_connected dbus_server_get_is_connected_dylibloader_orig_dbus
+#define dbus_server_get_address dbus_server_get_address_dylibloader_orig_dbus
+#define dbus_server_get_id dbus_server_get_id_dylibloader_orig_dbus
+#define dbus_server_set_new_connection_function dbus_server_set_new_connection_function_dylibloader_orig_dbus
+#define dbus_server_set_watch_functions dbus_server_set_watch_functions_dylibloader_orig_dbus
+#define dbus_server_set_timeout_functions dbus_server_set_timeout_functions_dylibloader_orig_dbus
+#define dbus_server_set_auth_mechanisms dbus_server_set_auth_mechanisms_dylibloader_orig_dbus
+#define dbus_server_allocate_data_slot dbus_server_allocate_data_slot_dylibloader_orig_dbus
+#define dbus_server_free_data_slot dbus_server_free_data_slot_dylibloader_orig_dbus
+#define dbus_server_set_data dbus_server_set_data_dylibloader_orig_dbus
+#define dbus_server_get_data dbus_server_get_data_dylibloader_orig_dbus
+#define dbus_signature_iter_init dbus_signature_iter_init_dylibloader_orig_dbus
+#define dbus_signature_iter_get_current_type dbus_signature_iter_get_current_type_dylibloader_orig_dbus
+#define dbus_signature_iter_get_signature dbus_signature_iter_get_signature_dylibloader_orig_dbus
+#define dbus_signature_iter_get_element_type dbus_signature_iter_get_element_type_dylibloader_orig_dbus
+#define dbus_signature_iter_next dbus_signature_iter_next_dylibloader_orig_dbus
+#define dbus_signature_iter_recurse dbus_signature_iter_recurse_dylibloader_orig_dbus
+#define dbus_signature_validate dbus_signature_validate_dylibloader_orig_dbus
+#define dbus_signature_validate_single dbus_signature_validate_single_dylibloader_orig_dbus
+#define dbus_type_is_valid dbus_type_is_valid_dylibloader_orig_dbus
+#define dbus_type_is_basic dbus_type_is_basic_dylibloader_orig_dbus
+#define dbus_type_is_container dbus_type_is_container_dylibloader_orig_dbus
+#define dbus_type_is_fixed dbus_type_is_fixed_dylibloader_orig_dbus
+#define dbus_validate_path dbus_validate_path_dylibloader_orig_dbus
+#define dbus_validate_interface dbus_validate_interface_dylibloader_orig_dbus
+#define dbus_validate_member dbus_validate_member_dylibloader_orig_dbus
+#define dbus_validate_error_name dbus_validate_error_name_dylibloader_orig_dbus
+#define dbus_validate_bus_name dbus_validate_bus_name_dylibloader_orig_dbus
+#define dbus_validate_utf8 dbus_validate_utf8_dylibloader_orig_dbus
+#define dbus_threads_init dbus_threads_init_dylibloader_orig_dbus
+#define dbus_threads_init_default dbus_threads_init_default_dylibloader_orig_dbus
+#include <dbus/dbus.h>
+#undef dbus_error_init
+#undef dbus_error_free
+#undef dbus_set_error
+#undef dbus_set_error_const
+#undef dbus_move_error
+#undef dbus_error_has_name
+#undef dbus_error_is_set
+#undef dbus_parse_address
+#undef dbus_address_entry_get_value
+#undef dbus_address_entry_get_method
+#undef dbus_address_entries_free
+#undef dbus_address_escape_value
+#undef dbus_address_unescape_value
+#undef dbus_malloc
+#undef dbus_malloc0
+#undef dbus_realloc
+#undef dbus_free
+#undef dbus_free_string_array
+#undef dbus_shutdown
+#undef dbus_message_new
+#undef dbus_message_new_method_call
+#undef dbus_message_new_method_return
+#undef dbus_message_new_signal
+#undef dbus_message_new_error
+#undef dbus_message_new_error_printf
+#undef dbus_message_copy
+#undef dbus_message_ref
+#undef dbus_message_unref
+#undef dbus_message_get_type
+#undef dbus_message_set_path
+#undef dbus_message_get_path
+#undef dbus_message_has_path
+#undef dbus_message_set_interface
+#undef dbus_message_get_interface
+#undef dbus_message_has_interface
+#undef dbus_message_set_member
+#undef dbus_message_get_member
+#undef dbus_message_has_member
+#undef dbus_message_set_error_name
+#undef dbus_message_get_error_name
+#undef dbus_message_set_destination
+#undef dbus_message_get_destination
+#undef dbus_message_set_sender
+#undef dbus_message_get_sender
+#undef dbus_message_get_signature
+#undef dbus_message_set_no_reply
+#undef dbus_message_get_no_reply
+#undef dbus_message_is_method_call
+#undef dbus_message_is_signal
+#undef dbus_message_is_error
+#undef dbus_message_has_destination
+#undef dbus_message_has_sender
+#undef dbus_message_has_signature
+#undef dbus_message_get_serial
+#undef dbus_message_set_serial
+#undef dbus_message_set_reply_serial
+#undef dbus_message_get_reply_serial
+#undef dbus_message_set_auto_start
+#undef dbus_message_get_auto_start
+#undef dbus_message_get_path_decomposed
+#undef dbus_message_append_args
+#undef dbus_message_append_args_valist
+#undef dbus_message_get_args
+#undef dbus_message_get_args_valist
+#undef dbus_message_contains_unix_fds
+#undef dbus_message_iter_init_closed
+#undef dbus_message_iter_init
+#undef dbus_message_iter_has_next
+#undef dbus_message_iter_next
+#undef dbus_message_iter_get_signature
+#undef dbus_message_iter_get_arg_type
+#undef dbus_message_iter_get_element_type
+#undef dbus_message_iter_recurse
+#undef dbus_message_iter_get_basic
+#undef dbus_message_iter_get_element_count
+#undef dbus_message_iter_get_array_len
+#undef dbus_message_iter_get_fixed_array
+#undef dbus_message_iter_init_append
+#undef dbus_message_iter_append_basic
+#undef dbus_message_iter_append_fixed_array
+#undef dbus_message_iter_open_container
+#undef dbus_message_iter_close_container
+#undef dbus_message_iter_abandon_container
+#undef dbus_message_iter_abandon_container_if_open
+#undef dbus_message_lock
+#undef dbus_set_error_from_message
+#undef dbus_message_allocate_data_slot
+#undef dbus_message_free_data_slot
+#undef dbus_message_set_data
+#undef dbus_message_get_data
+#undef dbus_message_type_from_string
+#undef dbus_message_type_to_string
+#undef dbus_message_marshal
+#undef dbus_message_demarshal
+#undef dbus_message_demarshal_bytes_needed
+#undef dbus_message_set_allow_interactive_authorization
+#undef dbus_message_get_allow_interactive_authorization
+#undef dbus_connection_open
+#undef dbus_connection_open_private
+#undef dbus_connection_ref
+#undef dbus_connection_unref
+#undef dbus_connection_close
+#undef dbus_connection_get_is_connected
+#undef dbus_connection_get_is_authenticated
+#undef dbus_connection_get_is_anonymous
+#undef dbus_connection_get_server_id
+#undef dbus_connection_can_send_type
+#undef dbus_connection_set_exit_on_disconnect
+#undef dbus_connection_flush
+#undef dbus_connection_read_write_dispatch
+#undef dbus_connection_read_write
+#undef dbus_connection_borrow_message
+#undef dbus_connection_return_message
+#undef dbus_connection_steal_borrowed_message
+#undef dbus_connection_pop_message
+#undef dbus_connection_get_dispatch_status
+#undef dbus_connection_dispatch
+#undef dbus_connection_has_messages_to_send
+#undef dbus_connection_send
+#undef dbus_connection_send_with_reply
+#undef dbus_connection_send_with_reply_and_block
+#undef dbus_connection_set_watch_functions
+#undef dbus_connection_set_timeout_functions
+#undef dbus_connection_set_wakeup_main_function
+#undef dbus_connection_set_dispatch_status_function
+#undef dbus_connection_get_unix_user
+#undef dbus_connection_get_unix_process_id
+#undef dbus_connection_get_adt_audit_session_data
+#undef dbus_connection_set_unix_user_function
+#undef dbus_connection_get_windows_user
+#undef dbus_connection_set_windows_user_function
+#undef dbus_connection_set_allow_anonymous
+#undef dbus_connection_set_route_peer_messages
+#undef dbus_connection_add_filter
+#undef dbus_connection_remove_filter
+#undef dbus_connection_allocate_data_slot
+#undef dbus_connection_free_data_slot
+#undef dbus_connection_set_data
+#undef dbus_connection_get_data
+#undef dbus_connection_set_change_sigpipe
+#undef dbus_connection_set_max_message_size
+#undef dbus_connection_get_max_message_size
+#undef dbus_connection_set_max_received_size
+#undef dbus_connection_get_max_received_size
+#undef dbus_connection_set_max_message_unix_fds
+#undef dbus_connection_get_max_message_unix_fds
+#undef dbus_connection_set_max_received_unix_fds
+#undef dbus_connection_get_max_received_unix_fds
+#undef dbus_connection_get_outgoing_size
+#undef dbus_connection_get_outgoing_unix_fds
+#undef dbus_connection_preallocate_send
+#undef dbus_connection_free_preallocated_send
+#undef dbus_connection_send_preallocated
+#undef dbus_connection_try_register_object_path
+#undef dbus_connection_register_object_path
+#undef dbus_connection_try_register_fallback
+#undef dbus_connection_register_fallback
+#undef dbus_connection_unregister_object_path
+#undef dbus_connection_get_object_path_data
+#undef dbus_connection_list_registered
+#undef dbus_connection_get_unix_fd
+#undef dbus_connection_get_socket
+#undef dbus_watch_get_fd
+#undef dbus_watch_get_unix_fd
+#undef dbus_watch_get_socket
+#undef dbus_watch_get_flags
+#undef dbus_watch_get_data
+#undef dbus_watch_set_data
+#undef dbus_watch_handle
+#undef dbus_watch_get_enabled
+#undef dbus_timeout_get_interval
+#undef dbus_timeout_get_data
+#undef dbus_timeout_set_data
+#undef dbus_timeout_handle
+#undef dbus_timeout_get_enabled
+#undef dbus_bus_get
+#undef dbus_bus_get_private
+#undef dbus_bus_register
+#undef dbus_bus_set_unique_name
+#undef dbus_bus_get_unique_name
+#undef dbus_bus_get_unix_user
+#undef dbus_bus_get_id
+#undef dbus_bus_request_name
+#undef dbus_bus_release_name
+#undef dbus_bus_name_has_owner
+#undef dbus_bus_start_service_by_name
+#undef dbus_bus_add_match
+#undef dbus_bus_remove_match
+#undef dbus_get_local_machine_id
+#undef dbus_get_version
+#undef dbus_setenv
+#undef dbus_try_get_local_machine_id
+#undef dbus_pending_call_ref
+#undef dbus_pending_call_unref
+#undef dbus_pending_call_set_notify
+#undef dbus_pending_call_cancel
+#undef dbus_pending_call_get_completed
+#undef dbus_pending_call_steal_reply
+#undef dbus_pending_call_block
+#undef dbus_pending_call_allocate_data_slot
+#undef dbus_pending_call_free_data_slot
+#undef dbus_pending_call_set_data
+#undef dbus_pending_call_get_data
+#undef dbus_server_listen
+#undef dbus_server_ref
+#undef dbus_server_unref
+#undef dbus_server_disconnect
+#undef dbus_server_get_is_connected
+#undef dbus_server_get_address
+#undef dbus_server_get_id
+#undef dbus_server_set_new_connection_function
+#undef dbus_server_set_watch_functions
+#undef dbus_server_set_timeout_functions
+#undef dbus_server_set_auth_mechanisms
+#undef dbus_server_allocate_data_slot
+#undef dbus_server_free_data_slot
+#undef dbus_server_set_data
+#undef dbus_server_get_data
+#undef dbus_signature_iter_init
+#undef dbus_signature_iter_get_current_type
+#undef dbus_signature_iter_get_signature
+#undef dbus_signature_iter_get_element_type
+#undef dbus_signature_iter_next
+#undef dbus_signature_iter_recurse
+#undef dbus_signature_validate
+#undef dbus_signature_validate_single
+#undef dbus_type_is_valid
+#undef dbus_type_is_basic
+#undef dbus_type_is_container
+#undef dbus_type_is_fixed
+#undef dbus_validate_path
+#undef dbus_validate_interface
+#undef dbus_validate_member
+#undef dbus_validate_error_name
+#undef dbus_validate_bus_name
+#undef dbus_validate_utf8
+#undef dbus_threads_init
+#undef dbus_threads_init_default
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define dbus_error_init dbus_error_init_dylibloader_wrapper_dbus
+#define dbus_error_free dbus_error_free_dylibloader_wrapper_dbus
+#define dbus_set_error dbus_set_error_dylibloader_wrapper_dbus
+#define dbus_set_error_const dbus_set_error_const_dylibloader_wrapper_dbus
+#define dbus_move_error dbus_move_error_dylibloader_wrapper_dbus
+#define dbus_error_has_name dbus_error_has_name_dylibloader_wrapper_dbus
+#define dbus_error_is_set dbus_error_is_set_dylibloader_wrapper_dbus
+#define dbus_parse_address dbus_parse_address_dylibloader_wrapper_dbus
+#define dbus_address_entry_get_value dbus_address_entry_get_value_dylibloader_wrapper_dbus
+#define dbus_address_entry_get_method dbus_address_entry_get_method_dylibloader_wrapper_dbus
+#define dbus_address_entries_free dbus_address_entries_free_dylibloader_wrapper_dbus
+#define dbus_address_escape_value dbus_address_escape_value_dylibloader_wrapper_dbus
+#define dbus_address_unescape_value dbus_address_unescape_value_dylibloader_wrapper_dbus
+#define dbus_malloc dbus_malloc_dylibloader_wrapper_dbus
+#define dbus_malloc0 dbus_malloc0_dylibloader_wrapper_dbus
+#define dbus_realloc dbus_realloc_dylibloader_wrapper_dbus
+#define dbus_free dbus_free_dylibloader_wrapper_dbus
+#define dbus_free_string_array dbus_free_string_array_dylibloader_wrapper_dbus
+#define dbus_shutdown dbus_shutdown_dylibloader_wrapper_dbus
+#define dbus_message_new dbus_message_new_dylibloader_wrapper_dbus
+#define dbus_message_new_method_call dbus_message_new_method_call_dylibloader_wrapper_dbus
+#define dbus_message_new_method_return dbus_message_new_method_return_dylibloader_wrapper_dbus
+#define dbus_message_new_signal dbus_message_new_signal_dylibloader_wrapper_dbus
+#define dbus_message_new_error dbus_message_new_error_dylibloader_wrapper_dbus
+#define dbus_message_new_error_printf dbus_message_new_error_printf_dylibloader_wrapper_dbus
+#define dbus_message_copy dbus_message_copy_dylibloader_wrapper_dbus
+#define dbus_message_ref dbus_message_ref_dylibloader_wrapper_dbus
+#define dbus_message_unref dbus_message_unref_dylibloader_wrapper_dbus
+#define dbus_message_get_type dbus_message_get_type_dylibloader_wrapper_dbus
+#define dbus_message_set_path dbus_message_set_path_dylibloader_wrapper_dbus
+#define dbus_message_get_path dbus_message_get_path_dylibloader_wrapper_dbus
+#define dbus_message_has_path dbus_message_has_path_dylibloader_wrapper_dbus
+#define dbus_message_set_interface dbus_message_set_interface_dylibloader_wrapper_dbus
+#define dbus_message_get_interface dbus_message_get_interface_dylibloader_wrapper_dbus
+#define dbus_message_has_interface dbus_message_has_interface_dylibloader_wrapper_dbus
+#define dbus_message_set_member dbus_message_set_member_dylibloader_wrapper_dbus
+#define dbus_message_get_member dbus_message_get_member_dylibloader_wrapper_dbus
+#define dbus_message_has_member dbus_message_has_member_dylibloader_wrapper_dbus
+#define dbus_message_set_error_name dbus_message_set_error_name_dylibloader_wrapper_dbus
+#define dbus_message_get_error_name dbus_message_get_error_name_dylibloader_wrapper_dbus
+#define dbus_message_set_destination dbus_message_set_destination_dylibloader_wrapper_dbus
+#define dbus_message_get_destination dbus_message_get_destination_dylibloader_wrapper_dbus
+#define dbus_message_set_sender dbus_message_set_sender_dylibloader_wrapper_dbus
+#define dbus_message_get_sender dbus_message_get_sender_dylibloader_wrapper_dbus
+#define dbus_message_get_signature dbus_message_get_signature_dylibloader_wrapper_dbus
+#define dbus_message_set_no_reply dbus_message_set_no_reply_dylibloader_wrapper_dbus
+#define dbus_message_get_no_reply dbus_message_get_no_reply_dylibloader_wrapper_dbus
+#define dbus_message_is_method_call dbus_message_is_method_call_dylibloader_wrapper_dbus
+#define dbus_message_is_signal dbus_message_is_signal_dylibloader_wrapper_dbus
+#define dbus_message_is_error dbus_message_is_error_dylibloader_wrapper_dbus
+#define dbus_message_has_destination dbus_message_has_destination_dylibloader_wrapper_dbus
+#define dbus_message_has_sender dbus_message_has_sender_dylibloader_wrapper_dbus
+#define dbus_message_has_signature dbus_message_has_signature_dylibloader_wrapper_dbus
+#define dbus_message_get_serial dbus_message_get_serial_dylibloader_wrapper_dbus
+#define dbus_message_set_serial dbus_message_set_serial_dylibloader_wrapper_dbus
+#define dbus_message_set_reply_serial dbus_message_set_reply_serial_dylibloader_wrapper_dbus
+#define dbus_message_get_reply_serial dbus_message_get_reply_serial_dylibloader_wrapper_dbus
+#define dbus_message_set_auto_start dbus_message_set_auto_start_dylibloader_wrapper_dbus
+#define dbus_message_get_auto_start dbus_message_get_auto_start_dylibloader_wrapper_dbus
+#define dbus_message_get_path_decomposed dbus_message_get_path_decomposed_dylibloader_wrapper_dbus
+#define dbus_message_append_args dbus_message_append_args_dylibloader_wrapper_dbus
+#define dbus_message_append_args_valist dbus_message_append_args_valist_dylibloader_wrapper_dbus
+#define dbus_message_get_args dbus_message_get_args_dylibloader_wrapper_dbus
+#define dbus_message_get_args_valist dbus_message_get_args_valist_dylibloader_wrapper_dbus
+#define dbus_message_contains_unix_fds dbus_message_contains_unix_fds_dylibloader_wrapper_dbus
+#define dbus_message_iter_init_closed dbus_message_iter_init_closed_dylibloader_wrapper_dbus
+#define dbus_message_iter_init dbus_message_iter_init_dylibloader_wrapper_dbus
+#define dbus_message_iter_has_next dbus_message_iter_has_next_dylibloader_wrapper_dbus
+#define dbus_message_iter_next dbus_message_iter_next_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_signature dbus_message_iter_get_signature_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_arg_type dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_element_type dbus_message_iter_get_element_type_dylibloader_wrapper_dbus
+#define dbus_message_iter_recurse dbus_message_iter_recurse_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_basic dbus_message_iter_get_basic_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_element_count dbus_message_iter_get_element_count_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_array_len dbus_message_iter_get_array_len_dylibloader_wrapper_dbus
+#define dbus_message_iter_get_fixed_array dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus
+#define dbus_message_iter_init_append dbus_message_iter_init_append_dylibloader_wrapper_dbus
+#define dbus_message_iter_append_basic dbus_message_iter_append_basic_dylibloader_wrapper_dbus
+#define dbus_message_iter_append_fixed_array dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus
+#define dbus_message_iter_open_container dbus_message_iter_open_container_dylibloader_wrapper_dbus
+#define dbus_message_iter_close_container dbus_message_iter_close_container_dylibloader_wrapper_dbus
+#define dbus_message_iter_abandon_container dbus_message_iter_abandon_container_dylibloader_wrapper_dbus
+#define dbus_message_iter_abandon_container_if_open dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus
+#define dbus_message_lock dbus_message_lock_dylibloader_wrapper_dbus
+#define dbus_set_error_from_message dbus_set_error_from_message_dylibloader_wrapper_dbus
+#define dbus_message_allocate_data_slot dbus_message_allocate_data_slot_dylibloader_wrapper_dbus
+#define dbus_message_free_data_slot dbus_message_free_data_slot_dylibloader_wrapper_dbus
+#define dbus_message_set_data dbus_message_set_data_dylibloader_wrapper_dbus
+#define dbus_message_get_data dbus_message_get_data_dylibloader_wrapper_dbus
+#define dbus_message_type_from_string dbus_message_type_from_string_dylibloader_wrapper_dbus
+#define dbus_message_type_to_string dbus_message_type_to_string_dylibloader_wrapper_dbus
+#define dbus_message_marshal dbus_message_marshal_dylibloader_wrapper_dbus
+#define dbus_message_demarshal dbus_message_demarshal_dylibloader_wrapper_dbus
+#define dbus_message_demarshal_bytes_needed dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus
+#define dbus_message_set_allow_interactive_authorization dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus
+#define dbus_message_get_allow_interactive_authorization dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus
+#define dbus_connection_open dbus_connection_open_dylibloader_wrapper_dbus
+#define dbus_connection_open_private dbus_connection_open_private_dylibloader_wrapper_dbus
+#define dbus_connection_ref dbus_connection_ref_dylibloader_wrapper_dbus
+#define dbus_connection_unref dbus_connection_unref_dylibloader_wrapper_dbus
+#define dbus_connection_close dbus_connection_close_dylibloader_wrapper_dbus
+#define dbus_connection_get_is_connected dbus_connection_get_is_connected_dylibloader_wrapper_dbus
+#define dbus_connection_get_is_authenticated dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus
+#define dbus_connection_get_is_anonymous dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus
+#define dbus_connection_get_server_id dbus_connection_get_server_id_dylibloader_wrapper_dbus
+#define dbus_connection_can_send_type dbus_connection_can_send_type_dylibloader_wrapper_dbus
+#define dbus_connection_set_exit_on_disconnect dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus
+#define dbus_connection_flush dbus_connection_flush_dylibloader_wrapper_dbus
+#define dbus_connection_read_write_dispatch dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus
+#define dbus_connection_read_write dbus_connection_read_write_dylibloader_wrapper_dbus
+#define dbus_connection_borrow_message dbus_connection_borrow_message_dylibloader_wrapper_dbus
+#define dbus_connection_return_message dbus_connection_return_message_dylibloader_wrapper_dbus
+#define dbus_connection_steal_borrowed_message dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus
+#define dbus_connection_pop_message dbus_connection_pop_message_dylibloader_wrapper_dbus
+#define dbus_connection_get_dispatch_status dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus
+#define dbus_connection_dispatch dbus_connection_dispatch_dylibloader_wrapper_dbus
+#define dbus_connection_has_messages_to_send dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus
+#define dbus_connection_send dbus_connection_send_dylibloader_wrapper_dbus
+#define dbus_connection_send_with_reply dbus_connection_send_with_reply_dylibloader_wrapper_dbus
+#define dbus_connection_send_with_reply_and_block dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus
+#define dbus_connection_set_watch_functions dbus_connection_set_watch_functions_dylibloader_wrapper_dbus
+#define dbus_connection_set_timeout_functions dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus
+#define dbus_connection_set_wakeup_main_function dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus
+#define dbus_connection_set_dispatch_status_function dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus
+#define dbus_connection_get_unix_user dbus_connection_get_unix_user_dylibloader_wrapper_dbus
+#define dbus_connection_get_unix_process_id dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus
+#define dbus_connection_get_adt_audit_session_data dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus
+#define dbus_connection_set_unix_user_function dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus
+#define dbus_connection_get_windows_user dbus_connection_get_windows_user_dylibloader_wrapper_dbus
+#define dbus_connection_set_windows_user_function dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus
+#define dbus_connection_set_allow_anonymous dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus
+#define dbus_connection_set_route_peer_messages dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus
+#define dbus_connection_add_filter dbus_connection_add_filter_dylibloader_wrapper_dbus
+#define dbus_connection_remove_filter dbus_connection_remove_filter_dylibloader_wrapper_dbus
+#define dbus_connection_allocate_data_slot dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus
+#define dbus_connection_free_data_slot dbus_connection_free_data_slot_dylibloader_wrapper_dbus
+#define dbus_connection_set_data dbus_connection_set_data_dylibloader_wrapper_dbus
+#define dbus_connection_get_data dbus_connection_get_data_dylibloader_wrapper_dbus
+#define dbus_connection_set_change_sigpipe dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus
+#define dbus_connection_set_max_message_size dbus_connection_set_max_message_size_dylibloader_wrapper_dbus
+#define dbus_connection_get_max_message_size dbus_connection_get_max_message_size_dylibloader_wrapper_dbus
+#define dbus_connection_set_max_received_size dbus_connection_set_max_received_size_dylibloader_wrapper_dbus
+#define dbus_connection_get_max_received_size dbus_connection_get_max_received_size_dylibloader_wrapper_dbus
+#define dbus_connection_set_max_message_unix_fds dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus
+#define dbus_connection_get_max_message_unix_fds dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus
+#define dbus_connection_set_max_received_unix_fds dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus
+#define dbus_connection_get_max_received_unix_fds dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus
+#define dbus_connection_get_outgoing_size dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus
+#define dbus_connection_get_outgoing_unix_fds dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus
+#define dbus_connection_preallocate_send dbus_connection_preallocate_send_dylibloader_wrapper_dbus
+#define dbus_connection_free_preallocated_send dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus
+#define dbus_connection_send_preallocated dbus_connection_send_preallocated_dylibloader_wrapper_dbus
+#define dbus_connection_try_register_object_path dbus_connection_try_register_object_path_dylibloader_wrapper_dbus
+#define dbus_connection_register_object_path dbus_connection_register_object_path_dylibloader_wrapper_dbus
+#define dbus_connection_try_register_fallback dbus_connection_try_register_fallback_dylibloader_wrapper_dbus
+#define dbus_connection_register_fallback dbus_connection_register_fallback_dylibloader_wrapper_dbus
+#define dbus_connection_unregister_object_path dbus_connection_unregister_object_path_dylibloader_wrapper_dbus
+#define dbus_connection_get_object_path_data dbus_connection_get_object_path_data_dylibloader_wrapper_dbus
+#define dbus_connection_list_registered dbus_connection_list_registered_dylibloader_wrapper_dbus
+#define dbus_connection_get_unix_fd dbus_connection_get_unix_fd_dylibloader_wrapper_dbus
+#define dbus_connection_get_socket dbus_connection_get_socket_dylibloader_wrapper_dbus
+#define dbus_watch_get_fd dbus_watch_get_fd_dylibloader_wrapper_dbus
+#define dbus_watch_get_unix_fd dbus_watch_get_unix_fd_dylibloader_wrapper_dbus
+#define dbus_watch_get_socket dbus_watch_get_socket_dylibloader_wrapper_dbus
+#define dbus_watch_get_flags dbus_watch_get_flags_dylibloader_wrapper_dbus
+#define dbus_watch_get_data dbus_watch_get_data_dylibloader_wrapper_dbus
+#define dbus_watch_set_data dbus_watch_set_data_dylibloader_wrapper_dbus
+#define dbus_watch_handle dbus_watch_handle_dylibloader_wrapper_dbus
+#define dbus_watch_get_enabled dbus_watch_get_enabled_dylibloader_wrapper_dbus
+#define dbus_timeout_get_interval dbus_timeout_get_interval_dylibloader_wrapper_dbus
+#define dbus_timeout_get_data dbus_timeout_get_data_dylibloader_wrapper_dbus
+#define dbus_timeout_set_data dbus_timeout_set_data_dylibloader_wrapper_dbus
+#define dbus_timeout_handle dbus_timeout_handle_dylibloader_wrapper_dbus
+#define dbus_timeout_get_enabled dbus_timeout_get_enabled_dylibloader_wrapper_dbus
+#define dbus_bus_get dbus_bus_get_dylibloader_wrapper_dbus
+#define dbus_bus_get_private dbus_bus_get_private_dylibloader_wrapper_dbus
+#define dbus_bus_register dbus_bus_register_dylibloader_wrapper_dbus
+#define dbus_bus_set_unique_name dbus_bus_set_unique_name_dylibloader_wrapper_dbus
+#define dbus_bus_get_unique_name dbus_bus_get_unique_name_dylibloader_wrapper_dbus
+#define dbus_bus_get_unix_user dbus_bus_get_unix_user_dylibloader_wrapper_dbus
+#define dbus_bus_get_id dbus_bus_get_id_dylibloader_wrapper_dbus
+#define dbus_bus_request_name dbus_bus_request_name_dylibloader_wrapper_dbus
+#define dbus_bus_release_name dbus_bus_release_name_dylibloader_wrapper_dbus
+#define dbus_bus_name_has_owner dbus_bus_name_has_owner_dylibloader_wrapper_dbus
+#define dbus_bus_start_service_by_name dbus_bus_start_service_by_name_dylibloader_wrapper_dbus
+#define dbus_bus_add_match dbus_bus_add_match_dylibloader_wrapper_dbus
+#define dbus_bus_remove_match dbus_bus_remove_match_dylibloader_wrapper_dbus
+#define dbus_get_local_machine_id dbus_get_local_machine_id_dylibloader_wrapper_dbus
+#define dbus_get_version dbus_get_version_dylibloader_wrapper_dbus
+#define dbus_setenv dbus_setenv_dylibloader_wrapper_dbus
+#define dbus_try_get_local_machine_id dbus_try_get_local_machine_id_dylibloader_wrapper_dbus
+#define dbus_pending_call_ref dbus_pending_call_ref_dylibloader_wrapper_dbus
+#define dbus_pending_call_unref dbus_pending_call_unref_dylibloader_wrapper_dbus
+#define dbus_pending_call_set_notify dbus_pending_call_set_notify_dylibloader_wrapper_dbus
+#define dbus_pending_call_cancel dbus_pending_call_cancel_dylibloader_wrapper_dbus
+#define dbus_pending_call_get_completed dbus_pending_call_get_completed_dylibloader_wrapper_dbus
+#define dbus_pending_call_steal_reply dbus_pending_call_steal_reply_dylibloader_wrapper_dbus
+#define dbus_pending_call_block dbus_pending_call_block_dylibloader_wrapper_dbus
+#define dbus_pending_call_allocate_data_slot dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus
+#define dbus_pending_call_free_data_slot dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus
+#define dbus_pending_call_set_data dbus_pending_call_set_data_dylibloader_wrapper_dbus
+#define dbus_pending_call_get_data dbus_pending_call_get_data_dylibloader_wrapper_dbus
+#define dbus_server_listen dbus_server_listen_dylibloader_wrapper_dbus
+#define dbus_server_ref dbus_server_ref_dylibloader_wrapper_dbus
+#define dbus_server_unref dbus_server_unref_dylibloader_wrapper_dbus
+#define dbus_server_disconnect dbus_server_disconnect_dylibloader_wrapper_dbus
+#define dbus_server_get_is_connected dbus_server_get_is_connected_dylibloader_wrapper_dbus
+#define dbus_server_get_address dbus_server_get_address_dylibloader_wrapper_dbus
+#define dbus_server_get_id dbus_server_get_id_dylibloader_wrapper_dbus
+#define dbus_server_set_new_connection_function dbus_server_set_new_connection_function_dylibloader_wrapper_dbus
+#define dbus_server_set_watch_functions dbus_server_set_watch_functions_dylibloader_wrapper_dbus
+#define dbus_server_set_timeout_functions dbus_server_set_timeout_functions_dylibloader_wrapper_dbus
+#define dbus_server_set_auth_mechanisms dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus
+#define dbus_server_allocate_data_slot dbus_server_allocate_data_slot_dylibloader_wrapper_dbus
+#define dbus_server_free_data_slot dbus_server_free_data_slot_dylibloader_wrapper_dbus
+#define dbus_server_set_data dbus_server_set_data_dylibloader_wrapper_dbus
+#define dbus_server_get_data dbus_server_get_data_dylibloader_wrapper_dbus
+#define dbus_signature_iter_init dbus_signature_iter_init_dylibloader_wrapper_dbus
+#define dbus_signature_iter_get_current_type dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus
+#define dbus_signature_iter_get_signature dbus_signature_iter_get_signature_dylibloader_wrapper_dbus
+#define dbus_signature_iter_get_element_type dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus
+#define dbus_signature_iter_next dbus_signature_iter_next_dylibloader_wrapper_dbus
+#define dbus_signature_iter_recurse dbus_signature_iter_recurse_dylibloader_wrapper_dbus
+#define dbus_signature_validate dbus_signature_validate_dylibloader_wrapper_dbus
+#define dbus_signature_validate_single dbus_signature_validate_single_dylibloader_wrapper_dbus
+#define dbus_type_is_valid dbus_type_is_valid_dylibloader_wrapper_dbus
+#define dbus_type_is_basic dbus_type_is_basic_dylibloader_wrapper_dbus
+#define dbus_type_is_container dbus_type_is_container_dylibloader_wrapper_dbus
+#define dbus_type_is_fixed dbus_type_is_fixed_dylibloader_wrapper_dbus
+#define dbus_validate_path dbus_validate_path_dylibloader_wrapper_dbus
+#define dbus_validate_interface dbus_validate_interface_dylibloader_wrapper_dbus
+#define dbus_validate_member dbus_validate_member_dylibloader_wrapper_dbus
+#define dbus_validate_error_name dbus_validate_error_name_dylibloader_wrapper_dbus
+#define dbus_validate_bus_name dbus_validate_bus_name_dylibloader_wrapper_dbus
+#define dbus_validate_utf8 dbus_validate_utf8_dylibloader_wrapper_dbus
+#define dbus_threads_init dbus_threads_init_dylibloader_wrapper_dbus
+#define dbus_threads_init_default dbus_threads_init_default_dylibloader_wrapper_dbus
+extern void (*dbus_error_init_dylibloader_wrapper_dbus)( DBusError*);
+extern void (*dbus_error_free_dylibloader_wrapper_dbus)( DBusError*);
+extern void (*dbus_set_error_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*,...);
+extern void (*dbus_set_error_const_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*);
+extern void (*dbus_move_error_dylibloader_wrapper_dbus)( DBusError*, DBusError*);
+extern dbus_bool_t (*dbus_error_has_name_dylibloader_wrapper_dbus)(const DBusError*,const char*);
+extern dbus_bool_t (*dbus_error_is_set_dylibloader_wrapper_dbus)(const DBusError*);
+extern dbus_bool_t (*dbus_parse_address_dylibloader_wrapper_dbus)(const char*, DBusAddressEntry***, int*, DBusError*);
+extern const char* (*dbus_address_entry_get_value_dylibloader_wrapper_dbus)( DBusAddressEntry*,const char*);
+extern const char* (*dbus_address_entry_get_method_dylibloader_wrapper_dbus)( DBusAddressEntry*);
+extern void (*dbus_address_entries_free_dylibloader_wrapper_dbus)( DBusAddressEntry**);
+extern char* (*dbus_address_escape_value_dylibloader_wrapper_dbus)(const char*);
+extern char* (*dbus_address_unescape_value_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern void* (*dbus_malloc_dylibloader_wrapper_dbus)( size_t);
+extern void* (*dbus_malloc0_dylibloader_wrapper_dbus)( size_t);
+extern void* (*dbus_realloc_dylibloader_wrapper_dbus)( void*, size_t);
+extern void (*dbus_free_dylibloader_wrapper_dbus)( void*);
+extern void (*dbus_free_string_array_dylibloader_wrapper_dbus)( char**);
+extern void (*dbus_shutdown_dylibloader_wrapper_dbus)( void);
+extern DBusMessage* (*dbus_message_new_dylibloader_wrapper_dbus)( int);
+extern DBusMessage* (*dbus_message_new_method_call_dylibloader_wrapper_dbus)(const char*,const char*,const char*,const char*);
+extern DBusMessage* (*dbus_message_new_method_return_dylibloader_wrapper_dbus)( DBusMessage*);
+extern DBusMessage* (*dbus_message_new_signal_dylibloader_wrapper_dbus)(const char*,const char*,const char*);
+extern DBusMessage* (*dbus_message_new_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+extern DBusMessage* (*dbus_message_new_error_printf_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*,...);
+extern DBusMessage* (*dbus_message_copy_dylibloader_wrapper_dbus)(const DBusMessage*);
+extern DBusMessage* (*dbus_message_ref_dylibloader_wrapper_dbus)( DBusMessage*);
+extern void (*dbus_message_unref_dylibloader_wrapper_dbus)( DBusMessage*);
+extern int (*dbus_message_get_type_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_set_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_path_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_has_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_set_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_interface_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_has_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_set_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_member_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_has_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_set_error_name_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_error_name_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_set_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_destination_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_set_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern const char* (*dbus_message_get_sender_dylibloader_wrapper_dbus)( DBusMessage*);
+extern const char* (*dbus_message_get_signature_dylibloader_wrapper_dbus)( DBusMessage*);
+extern void (*dbus_message_set_no_reply_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+extern dbus_bool_t (*dbus_message_get_no_reply_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_is_method_call_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+extern dbus_bool_t (*dbus_message_is_signal_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
+extern dbus_bool_t (*dbus_message_is_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_has_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_has_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_bool_t (*dbus_message_has_signature_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
+extern dbus_uint32_t (*dbus_message_get_serial_dylibloader_wrapper_dbus)( DBusMessage*);
+extern void (*dbus_message_set_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
+extern dbus_bool_t (*dbus_message_set_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
+extern dbus_uint32_t (*dbus_message_get_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*);
+extern void (*dbus_message_set_auto_start_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+extern dbus_bool_t (*dbus_message_get_auto_start_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_message_get_path_decomposed_dylibloader_wrapper_dbus)( DBusMessage*, char***);
+extern dbus_bool_t (*dbus_message_append_args_dylibloader_wrapper_dbus)( DBusMessage*, int,...);
+extern dbus_bool_t (*dbus_message_append_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, int, va_list);
+extern dbus_bool_t (*dbus_message_get_args_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int,...);
+extern dbus_bool_t (*dbus_message_get_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int, va_list);
+extern dbus_bool_t (*dbus_message_contains_unix_fds_dylibloader_wrapper_dbus)( DBusMessage*);
+extern void (*dbus_message_iter_init_closed_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern dbus_bool_t (*dbus_message_iter_init_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
+extern dbus_bool_t (*dbus_message_iter_has_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern dbus_bool_t (*dbus_message_iter_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern char* (*dbus_message_iter_get_signature_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern int (*dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern int (*dbus_message_iter_get_element_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern void (*dbus_message_iter_recurse_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+extern void (*dbus_message_iter_get_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, void*);
+extern int (*dbus_message_iter_get_element_count_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern int (*dbus_message_iter_get_array_len_dylibloader_wrapper_dbus)( DBusMessageIter*);
+extern void (*dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, void*, int*);
+extern void (*dbus_message_iter_init_append_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
+extern dbus_bool_t (*dbus_message_iter_append_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*);
+extern dbus_bool_t (*dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*, int);
+extern dbus_bool_t (*dbus_message_iter_open_container_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const char*, DBusMessageIter*);
+extern dbus_bool_t (*dbus_message_iter_close_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+extern void (*dbus_message_iter_abandon_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+extern void (*dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
+extern void (*dbus_message_lock_dylibloader_wrapper_dbus)( DBusMessage*);
+extern dbus_bool_t (*dbus_set_error_from_message_dylibloader_wrapper_dbus)( DBusError*, DBusMessage*);
+extern dbus_bool_t (*dbus_message_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern void (*dbus_message_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern dbus_bool_t (*dbus_message_set_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t, void*, DBusFreeFunction);
+extern void* (*dbus_message_get_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t);
+extern int (*dbus_message_type_from_string_dylibloader_wrapper_dbus)(const char*);
+extern const char* (*dbus_message_type_to_string_dylibloader_wrapper_dbus)( int);
+extern dbus_bool_t (*dbus_message_marshal_dylibloader_wrapper_dbus)( DBusMessage*, char**, int*);
+extern DBusMessage* (*dbus_message_demarshal_dylibloader_wrapper_dbus)(const char*, int, DBusError*);
+extern int (*dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus)(const char*, int);
+extern void (*dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
+extern dbus_bool_t (*dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*);
+extern DBusConnection* (*dbus_connection_open_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern DBusConnection* (*dbus_connection_open_private_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern DBusConnection* (*dbus_connection_ref_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_unref_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_close_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_get_is_connected_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus)( DBusConnection*);
+extern char* (*dbus_connection_get_server_id_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_can_send_type_dylibloader_wrapper_dbus)( DBusConnection*, int);
+extern void (*dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+extern void (*dbus_connection_flush_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus)( DBusConnection*, int);
+extern dbus_bool_t (*dbus_connection_read_write_dylibloader_wrapper_dbus)( DBusConnection*, int);
+extern DBusMessage* (*dbus_connection_borrow_message_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_return_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
+extern void (*dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
+extern DBusMessage* (*dbus_connection_pop_message_dylibloader_wrapper_dbus)( DBusConnection*);
+extern DBusDispatchStatus (*dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus)( DBusConnection*);
+extern DBusDispatchStatus (*dbus_connection_dispatch_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus)( DBusConnection*);
+extern dbus_bool_t (*dbus_connection_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, dbus_uint32_t*);
+extern dbus_bool_t (*dbus_connection_send_with_reply_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, DBusPendingCall**, int);
+extern DBusMessage* (*dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, int, DBusError*);
+extern dbus_bool_t (*dbus_connection_set_watch_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
+extern void (*dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusWakeupMainFunction, void*, DBusFreeFunction);
+extern void (*dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusDispatchStatusFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_connection_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
+extern dbus_bool_t (*dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
+extern dbus_bool_t (*dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus)( DBusConnection*, void**, dbus_int32_t*);
+extern void (*dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowUnixUserFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_connection_get_windows_user_dylibloader_wrapper_dbus)( DBusConnection*, char**);
+extern void (*dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowWindowsUserFunction, void*, DBusFreeFunction);
+extern void (*dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+extern void (*dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
+extern dbus_bool_t (*dbus_connection_add_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*, DBusFreeFunction);
+extern void (*dbus_connection_remove_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*);
+extern dbus_bool_t (*dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern void (*dbus_connection_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern dbus_bool_t (*dbus_connection_set_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t, void*, DBusFreeFunction);
+extern void* (*dbus_connection_get_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t);
+extern void (*dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus)( dbus_bool_t);
+extern void (*dbus_connection_set_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
+extern long (*dbus_connection_get_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_set_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
+extern long (*dbus_connection_get_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
+extern long (*dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
+extern long (*dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+extern long (*dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus)( DBusConnection*);
+extern long (*dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
+extern DBusPreallocatedSend* (*dbus_connection_preallocate_send_dylibloader_wrapper_dbus)( DBusConnection*);
+extern void (*dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*);
+extern void (*dbus_connection_send_preallocated_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*, DBusMessage*, dbus_uint32_t*);
+extern dbus_bool_t (*dbus_connection_try_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
+extern dbus_bool_t (*dbus_connection_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
+extern dbus_bool_t (*dbus_connection_try_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
+extern dbus_bool_t (*dbus_connection_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
+extern dbus_bool_t (*dbus_connection_unregister_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
+extern dbus_bool_t (*dbus_connection_get_object_path_data_dylibloader_wrapper_dbus)( DBusConnection*,const char*, void**);
+extern dbus_bool_t (*dbus_connection_list_registered_dylibloader_wrapper_dbus)( DBusConnection*,const char*, char***);
+extern dbus_bool_t (*dbus_connection_get_unix_fd_dylibloader_wrapper_dbus)( DBusConnection*, int*);
+extern dbus_bool_t (*dbus_connection_get_socket_dylibloader_wrapper_dbus)( DBusConnection*, int*);
+extern int (*dbus_watch_get_fd_dylibloader_wrapper_dbus)( DBusWatch*);
+extern int (*dbus_watch_get_unix_fd_dylibloader_wrapper_dbus)( DBusWatch*);
+extern int (*dbus_watch_get_socket_dylibloader_wrapper_dbus)( DBusWatch*);
+extern unsigned int (*dbus_watch_get_flags_dylibloader_wrapper_dbus)( DBusWatch*);
+extern void* (*dbus_watch_get_data_dylibloader_wrapper_dbus)( DBusWatch*);
+extern void (*dbus_watch_set_data_dylibloader_wrapper_dbus)( DBusWatch*, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_watch_handle_dylibloader_wrapper_dbus)( DBusWatch*, unsigned int);
+extern dbus_bool_t (*dbus_watch_get_enabled_dylibloader_wrapper_dbus)( DBusWatch*);
+extern int (*dbus_timeout_get_interval_dylibloader_wrapper_dbus)( DBusTimeout*);
+extern void* (*dbus_timeout_get_data_dylibloader_wrapper_dbus)( DBusTimeout*);
+extern void (*dbus_timeout_set_data_dylibloader_wrapper_dbus)( DBusTimeout*, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_timeout_handle_dylibloader_wrapper_dbus)( DBusTimeout*);
+extern dbus_bool_t (*dbus_timeout_get_enabled_dylibloader_wrapper_dbus)( DBusTimeout*);
+extern DBusConnection* (*dbus_bus_get_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
+extern DBusConnection* (*dbus_bus_get_private_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
+extern dbus_bool_t (*dbus_bus_register_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
+extern dbus_bool_t (*dbus_bus_set_unique_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
+extern const char* (*dbus_bus_get_unique_name_dylibloader_wrapper_dbus)( DBusConnection*);
+extern unsigned long (*dbus_bus_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+extern char* (*dbus_bus_get_id_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
+extern int (*dbus_bus_request_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, unsigned int, DBusError*);
+extern int (*dbus_bus_release_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+extern dbus_bool_t (*dbus_bus_name_has_owner_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+extern dbus_bool_t (*dbus_bus_start_service_by_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, dbus_uint32_t, dbus_uint32_t*, DBusError*);
+extern void (*dbus_bus_add_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+extern void (*dbus_bus_remove_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
+extern char* (*dbus_get_local_machine_id_dylibloader_wrapper_dbus)( void);
+extern void (*dbus_get_version_dylibloader_wrapper_dbus)( int*, int*, int*);
+extern dbus_bool_t (*dbus_setenv_dylibloader_wrapper_dbus)(const char*,const char*);
+extern char* (*dbus_try_get_local_machine_id_dylibloader_wrapper_dbus)( DBusError*);
+extern DBusPendingCall* (*dbus_pending_call_ref_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern void (*dbus_pending_call_unref_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern dbus_bool_t (*dbus_pending_call_set_notify_dylibloader_wrapper_dbus)( DBusPendingCall*, DBusPendingCallNotifyFunction, void*, DBusFreeFunction);
+extern void (*dbus_pending_call_cancel_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern dbus_bool_t (*dbus_pending_call_get_completed_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern DBusMessage* (*dbus_pending_call_steal_reply_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern void (*dbus_pending_call_block_dylibloader_wrapper_dbus)( DBusPendingCall*);
+extern dbus_bool_t (*dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern void (*dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern dbus_bool_t (*dbus_pending_call_set_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t, void*, DBusFreeFunction);
+extern void* (*dbus_pending_call_get_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t);
+extern DBusServer* (*dbus_server_listen_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern DBusServer* (*dbus_server_ref_dylibloader_wrapper_dbus)( DBusServer*);
+extern void (*dbus_server_unref_dylibloader_wrapper_dbus)( DBusServer*);
+extern void (*dbus_server_disconnect_dylibloader_wrapper_dbus)( DBusServer*);
+extern dbus_bool_t (*dbus_server_get_is_connected_dylibloader_wrapper_dbus)( DBusServer*);
+extern char* (*dbus_server_get_address_dylibloader_wrapper_dbus)( DBusServer*);
+extern char* (*dbus_server_get_id_dylibloader_wrapper_dbus)( DBusServer*);
+extern void (*dbus_server_set_new_connection_function_dylibloader_wrapper_dbus)( DBusServer*, DBusNewConnectionFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_server_set_watch_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_server_set_timeout_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
+extern dbus_bool_t (*dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus)( DBusServer*,const char**);
+extern dbus_bool_t (*dbus_server_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern void (*dbus_server_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
+extern dbus_bool_t (*dbus_server_set_data_dylibloader_wrapper_dbus)( DBusServer*, int, void*, DBusFreeFunction);
+extern void* (*dbus_server_get_data_dylibloader_wrapper_dbus)( DBusServer*, int);
+extern void (*dbus_signature_iter_init_dylibloader_wrapper_dbus)( DBusSignatureIter*,const char*);
+extern int (*dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+extern char* (*dbus_signature_iter_get_signature_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+extern int (*dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
+extern dbus_bool_t (*dbus_signature_iter_next_dylibloader_wrapper_dbus)( DBusSignatureIter*);
+extern void (*dbus_signature_iter_recurse_dylibloader_wrapper_dbus)(const DBusSignatureIter*, DBusSignatureIter*);
+extern dbus_bool_t (*dbus_signature_validate_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_signature_validate_single_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_type_is_valid_dylibloader_wrapper_dbus)( int);
+extern dbus_bool_t (*dbus_type_is_basic_dylibloader_wrapper_dbus)( int);
+extern dbus_bool_t (*dbus_type_is_container_dylibloader_wrapper_dbus)( int);
+extern dbus_bool_t (*dbus_type_is_fixed_dylibloader_wrapper_dbus)( int);
+extern dbus_bool_t (*dbus_validate_path_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_validate_interface_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_validate_member_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_validate_error_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_validate_bus_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_validate_utf8_dylibloader_wrapper_dbus)(const char*, DBusError*);
+extern dbus_bool_t (*dbus_threads_init_dylibloader_wrapper_dbus)(const DBusThreadFunctions*);
+extern dbus_bool_t (*dbus_threads_init_default_dylibloader_wrapper_dbus)( void);
+int initialize_dbus(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 065250c40e..00e2b9e6eb 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -41,6 +41,7 @@ def get_opts():
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("dbus", "Detect and use D-Bus to handle screensaver", True),
BoolVariable("speechd", "Detect and use Speech Dispatcher for Text-to-Speech support", True),
+ BoolVariable("fontconfig", "Detect and use fontconfig for system fonts support", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("x11", "Enable X11 display", True),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
@@ -298,6 +299,14 @@ def configure(env):
## Flags
+ if env["fontconfig"]:
+ if os.system("pkg-config --exists fontconfig") == 0: # 0 means found
+ env.Append(CPPDEFINES=["FONTCONFIG_ENABLED"])
+ env.ParseConfig("pkg-config fontconfig --cflags") # Only cflags, we dlopen the library.
+ else:
+ env["fontconfig"] = False
+ print("Warning: fontconfig libraries not found. Disabling the system fonts support.")
+
if os.system("pkg-config --exists alsa") == 0: # 0 means found
env["alsa"] = True
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
@@ -316,8 +325,9 @@ def configure(env):
if env["dbus"]:
if os.system("pkg-config --exists dbus-1") == 0: # 0 means found
env.Append(CPPDEFINES=["DBUS_ENABLED"])
- env.ParseConfig("pkg-config dbus-1 --cflags --libs")
+ env.ParseConfig("pkg-config dbus-1 --cflags") # Only cflags, we dlopen the library.
else:
+ env["dbus"] = False
print("Warning: D-Bus development libraries not found. Disabling screensaver prevention.")
if env["speechd"]:
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index d4267d3c02..3409e43ba5 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -3147,7 +3147,7 @@ void DisplayServerX11::_window_changed(XEvent *event) {
Variant *rectp = &rect;
Variant ret;
Callable::CallError ce;
- wd.rect_changed_callback.call((const Variant **)&rectp, 1, ret, ce);
+ wd.rect_changed_callback.callp((const Variant **)&rectp, 1, ret, ce);
}
}
@@ -3168,7 +3168,7 @@ void DisplayServerX11::_dispatch_input_event(const Ref<InputEvent> &p_event) {
if (windows.has(E->get())) {
Callable callable = windows[E->get()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
return;
@@ -3181,7 +3181,7 @@ void DisplayServerX11::_dispatch_input_event(const Ref<InputEvent> &p_event) {
if (windows.has(event_from_window->get_window_id())) {
Callable callable = windows[event_from_window->get_window_id()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
} else {
@@ -3189,7 +3189,7 @@ void DisplayServerX11::_dispatch_input_event(const Ref<InputEvent> &p_event) {
for (KeyValue<WindowID, WindowData> &E : windows) {
Callable callable = E.value.input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
}
@@ -3201,7 +3201,7 @@ void DisplayServerX11::_send_window_event(const WindowData &wd, WindowEvent p_ev
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- wd.event_callback.call((const Variant **)&eventp, 1, ret, ce);
+ wd.event_callback.callp((const Variant **)&eventp, 1, ret, ce);
}
}
@@ -4068,7 +4068,7 @@ void DisplayServerX11::process_events() {
Variant *vp = &v;
Variant ret;
Callable::CallError ce;
- windows[window_id].drop_files_callback.call((const Variant **)&vp, 1, ret, ce);
+ windows[window_id].drop_files_callback.callp((const Variant **)&vp, 1, ret, ce);
}
//Reply that all is well.
diff --git a/platform/linuxbsd/export/export.cpp b/platform/linuxbsd/export/export.cpp
index 4240e9adc0..990351d13f 100644
--- a/platform/linuxbsd/export/export.cpp
+++ b/platform/linuxbsd/export/export.cpp
@@ -30,6 +30,7 @@
#include "export.h"
+#include "editor/export/editor_export.h"
#include "export_plugin.h"
void register_linuxbsd_exporter() {
@@ -37,8 +38,6 @@ void register_linuxbsd_exporter() {
platform.instantiate();
platform->set_logo(ImageTexture::create_from_image(memnew(Image(_linuxbsd_logo))));
platform->set_name("Linux/X11");
- platform->set_extension("x86_32");
- platform->set_extension("x86_64", "binary_format/64_bits");
platform->set_os_name("Linux");
platform->set_chmod_flags(0755);
diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp
index d54e07d8a5..4d45d3ba12 100644
--- a/platform/linuxbsd/export/export_plugin.cpp
+++ b/platform/linuxbsd/export/export_plugin.cpp
@@ -79,31 +79,21 @@ Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset>
return err;
}
-void EditorExportPlatformLinuxBSD::set_extension(const String &p_extension, const String &p_feature_key) {
- extensions[p_feature_key] = p_extension;
-}
-
String EditorExportPlatformLinuxBSD::get_template_file_name(const String &p_target, const String &p_arch) const {
return "linux_" + p_target + "." + p_arch;
}
List<String> EditorExportPlatformLinuxBSD::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
- for (const KeyValue<String, String> &E : extensions) {
- if (p_preset->get(E.key)) {
- list.push_back(extensions[E.key]);
- return list;
- }
- }
-
- if (extensions.has("default")) {
- list.push_back(extensions["default"]);
- return list;
- }
-
+ list.push_back(p_preset->get("binary_format/architecture"));
return list;
}
+void EditorExportPlatformLinuxBSD::get_export_options(List<ExportOption> *r_options) {
+ EditorExportPlatformPC::get_export_options(r_options);
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32,arm64,arm32,rv64,ppc64,ppc32"), "x86_64"));
+}
+
Error EditorExportPlatformLinuxBSD::fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
// Patch the header of the "pck" section in the ELF file so that it corresponds to the embedded data
diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h
index ccdf2ecc9f..4d6737498b 100644
--- a/platform/linuxbsd/export/export_plugin.h
+++ b/platform/linuxbsd/export/export_plugin.h
@@ -32,18 +32,18 @@
#define LINUXBSD_EXPORT_PLUGIN_H
#include "core/io/file_access.h"
-#include "editor/editor_export.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export_platform_pc.h"
#include "platform/linuxbsd/logo.gen.h"
#include "scene/resources/texture.h"
class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC {
- HashMap<String, String> extensions;
Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);
public:
void set_extension(const String &p_extension, const String &p_feature_key = "default");
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override;
+ virtual void get_export_options(List<ExportOption> *r_options) override;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;
virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) override;
diff --git a/platform/linuxbsd/fontconfig-so_wrap.c b/platform/linuxbsd/fontconfig-so_wrap.c
new file mode 100644
index 0000000000..1a915faf98
--- /dev/null
+++ b/platform/linuxbsd/fontconfig-so_wrap.c
@@ -0,0 +1,2091 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-07-29 05:40:07
+// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSet
+//
+#include <stdint.h>
+
+#define FcBlanksCreate FcBlanksCreate_dylibloader_orig_fontconfig
+#define FcBlanksDestroy FcBlanksDestroy_dylibloader_orig_fontconfig
+#define FcBlanksAdd FcBlanksAdd_dylibloader_orig_fontconfig
+#define FcBlanksIsMember FcBlanksIsMember_dylibloader_orig_fontconfig
+#define FcCacheDir FcCacheDir_dylibloader_orig_fontconfig
+#define FcCacheCopySet FcCacheCopySet_dylibloader_orig_fontconfig
+#define FcCacheSubdir FcCacheSubdir_dylibloader_orig_fontconfig
+#define FcCacheNumSubdir FcCacheNumSubdir_dylibloader_orig_fontconfig
+#define FcCacheNumFont FcCacheNumFont_dylibloader_orig_fontconfig
+#define FcDirCacheUnlink FcDirCacheUnlink_dylibloader_orig_fontconfig
+#define FcDirCacheValid FcDirCacheValid_dylibloader_orig_fontconfig
+#define FcDirCacheClean FcDirCacheClean_dylibloader_orig_fontconfig
+#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_orig_fontconfig
+#define FcConfigHome FcConfigHome_dylibloader_orig_fontconfig
+#define FcConfigEnableHome FcConfigEnableHome_dylibloader_orig_fontconfig
+#define FcConfigFilename FcConfigFilename_dylibloader_orig_fontconfig
+#define FcConfigCreate FcConfigCreate_dylibloader_orig_fontconfig
+#define FcConfigReference FcConfigReference_dylibloader_orig_fontconfig
+#define FcConfigDestroy FcConfigDestroy_dylibloader_orig_fontconfig
+#define FcConfigSetCurrent FcConfigSetCurrent_dylibloader_orig_fontconfig
+#define FcConfigGetCurrent FcConfigGetCurrent_dylibloader_orig_fontconfig
+#define FcConfigUptoDate FcConfigUptoDate_dylibloader_orig_fontconfig
+#define FcConfigBuildFonts FcConfigBuildFonts_dylibloader_orig_fontconfig
+#define FcConfigGetFontDirs FcConfigGetFontDirs_dylibloader_orig_fontconfig
+#define FcConfigGetConfigDirs FcConfigGetConfigDirs_dylibloader_orig_fontconfig
+#define FcConfigGetConfigFiles FcConfigGetConfigFiles_dylibloader_orig_fontconfig
+#define FcConfigGetCache FcConfigGetCache_dylibloader_orig_fontconfig
+#define FcConfigGetBlanks FcConfigGetBlanks_dylibloader_orig_fontconfig
+#define FcConfigGetCacheDirs FcConfigGetCacheDirs_dylibloader_orig_fontconfig
+#define FcConfigGetRescanInterval FcConfigGetRescanInterval_dylibloader_orig_fontconfig
+#define FcConfigSetRescanInterval FcConfigSetRescanInterval_dylibloader_orig_fontconfig
+#define FcConfigGetFonts FcConfigGetFonts_dylibloader_orig_fontconfig
+#define FcConfigAppFontAddFile FcConfigAppFontAddFile_dylibloader_orig_fontconfig
+#define FcConfigAppFontAddDir FcConfigAppFontAddDir_dylibloader_orig_fontconfig
+#define FcConfigAppFontClear FcConfigAppFontClear_dylibloader_orig_fontconfig
+#define FcConfigSubstituteWithPat FcConfigSubstituteWithPat_dylibloader_orig_fontconfig
+#define FcConfigSubstitute FcConfigSubstitute_dylibloader_orig_fontconfig
+#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_orig_fontconfig
+#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_orig_fontconfig
+#define FcValuePrint FcValuePrint_dylibloader_orig_fontconfig
+#define FcPatternPrint FcPatternPrint_dylibloader_orig_fontconfig
+#define FcFontSetPrint FcFontSetPrint_dylibloader_orig_fontconfig
+#define FcGetDefaultLangs FcGetDefaultLangs_dylibloader_orig_fontconfig
+#define FcDefaultSubstitute FcDefaultSubstitute_dylibloader_orig_fontconfig
+#define FcFileIsDir FcFileIsDir_dylibloader_orig_fontconfig
+#define FcFileScan FcFileScan_dylibloader_orig_fontconfig
+#define FcDirScan FcDirScan_dylibloader_orig_fontconfig
+#define FcDirSave FcDirSave_dylibloader_orig_fontconfig
+#define FcDirCacheLoad FcDirCacheLoad_dylibloader_orig_fontconfig
+#define FcDirCacheRescan FcDirCacheRescan_dylibloader_orig_fontconfig
+#define FcDirCacheRead FcDirCacheRead_dylibloader_orig_fontconfig
+#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_orig_fontconfig
+#define FcDirCacheUnload FcDirCacheUnload_dylibloader_orig_fontconfig
+#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_orig_fontconfig
+#define FcFontSetCreate FcFontSetCreate_dylibloader_orig_fontconfig
+#define FcFontSetDestroy FcFontSetDestroy_dylibloader_orig_fontconfig
+#define FcFontSetAdd FcFontSetAdd_dylibloader_orig_fontconfig
+#define FcInitLoadConfig FcInitLoadConfig_dylibloader_orig_fontconfig
+#define FcInitLoadConfigAndFonts FcInitLoadConfigAndFonts_dylibloader_orig_fontconfig
+#define FcInit FcInit_dylibloader_orig_fontconfig
+#define FcFini FcFini_dylibloader_orig_fontconfig
+#define FcGetVersion FcGetVersion_dylibloader_orig_fontconfig
+#define FcInitReinitialize FcInitReinitialize_dylibloader_orig_fontconfig
+#define FcInitBringUptoDate FcInitBringUptoDate_dylibloader_orig_fontconfig
+#define FcGetLangs FcGetLangs_dylibloader_orig_fontconfig
+#define FcLangNormalize FcLangNormalize_dylibloader_orig_fontconfig
+#define FcLangGetCharSet FcLangGetCharSet_dylibloader_orig_fontconfig
+#define FcLangSetCreate FcLangSetCreate_dylibloader_orig_fontconfig
+#define FcLangSetDestroy FcLangSetDestroy_dylibloader_orig_fontconfig
+#define FcLangSetCopy FcLangSetCopy_dylibloader_orig_fontconfig
+#define FcLangSetAdd FcLangSetAdd_dylibloader_orig_fontconfig
+#define FcLangSetDel FcLangSetDel_dylibloader_orig_fontconfig
+#define FcLangSetHasLang FcLangSetHasLang_dylibloader_orig_fontconfig
+#define FcLangSetCompare FcLangSetCompare_dylibloader_orig_fontconfig
+#define FcLangSetContains FcLangSetContains_dylibloader_orig_fontconfig
+#define FcLangSetEqual FcLangSetEqual_dylibloader_orig_fontconfig
+#define FcLangSetHash FcLangSetHash_dylibloader_orig_fontconfig
+#define FcLangSetGetLangs FcLangSetGetLangs_dylibloader_orig_fontconfig
+#define FcLangSetUnion FcLangSetUnion_dylibloader_orig_fontconfig
+#define FcLangSetSubtract FcLangSetSubtract_dylibloader_orig_fontconfig
+#define FcObjectSetCreate FcObjectSetCreate_dylibloader_orig_fontconfig
+#define FcObjectSetAdd FcObjectSetAdd_dylibloader_orig_fontconfig
+#define FcObjectSetDestroy FcObjectSetDestroy_dylibloader_orig_fontconfig
+#define FcObjectSetVaBuild FcObjectSetVaBuild_dylibloader_orig_fontconfig
+#define FcObjectSetBuild FcObjectSetBuild_dylibloader_orig_fontconfig
+#define FcFontSetList FcFontSetList_dylibloader_orig_fontconfig
+#define FcFontList FcFontList_dylibloader_orig_fontconfig
+#define FcAtomicCreate FcAtomicCreate_dylibloader_orig_fontconfig
+#define FcAtomicLock FcAtomicLock_dylibloader_orig_fontconfig
+#define FcAtomicNewFile FcAtomicNewFile_dylibloader_orig_fontconfig
+#define FcAtomicOrigFile FcAtomicOrigFile_dylibloader_orig_fontconfig
+#define FcAtomicReplaceOrig FcAtomicReplaceOrig_dylibloader_orig_fontconfig
+#define FcAtomicDeleteNew FcAtomicDeleteNew_dylibloader_orig_fontconfig
+#define FcAtomicUnlock FcAtomicUnlock_dylibloader_orig_fontconfig
+#define FcAtomicDestroy FcAtomicDestroy_dylibloader_orig_fontconfig
+#define FcFontSetMatch FcFontSetMatch_dylibloader_orig_fontconfig
+#define FcFontMatch FcFontMatch_dylibloader_orig_fontconfig
+#define FcFontRenderPrepare FcFontRenderPrepare_dylibloader_orig_fontconfig
+#define FcFontSetSort FcFontSetSort_dylibloader_orig_fontconfig
+#define FcFontSort FcFontSort_dylibloader_orig_fontconfig
+#define FcFontSetSortDestroy FcFontSetSortDestroy_dylibloader_orig_fontconfig
+#define FcMatrixCopy FcMatrixCopy_dylibloader_orig_fontconfig
+#define FcMatrixEqual FcMatrixEqual_dylibloader_orig_fontconfig
+#define FcMatrixMultiply FcMatrixMultiply_dylibloader_orig_fontconfig
+#define FcMatrixRotate FcMatrixRotate_dylibloader_orig_fontconfig
+#define FcMatrixScale FcMatrixScale_dylibloader_orig_fontconfig
+#define FcMatrixShear FcMatrixShear_dylibloader_orig_fontconfig
+#define FcNameRegisterObjectTypes FcNameRegisterObjectTypes_dylibloader_orig_fontconfig
+#define FcNameUnregisterObjectTypes FcNameUnregisterObjectTypes_dylibloader_orig_fontconfig
+#define FcNameGetObjectType FcNameGetObjectType_dylibloader_orig_fontconfig
+#define FcNameRegisterConstants FcNameRegisterConstants_dylibloader_orig_fontconfig
+#define FcNameUnregisterConstants FcNameUnregisterConstants_dylibloader_orig_fontconfig
+#define FcNameGetConstant FcNameGetConstant_dylibloader_orig_fontconfig
+#define FcNameConstant FcNameConstant_dylibloader_orig_fontconfig
+#define FcNameParse FcNameParse_dylibloader_orig_fontconfig
+#define FcNameUnparse FcNameUnparse_dylibloader_orig_fontconfig
+#define FcPatternCreate FcPatternCreate_dylibloader_orig_fontconfig
+#define FcPatternDuplicate FcPatternDuplicate_dylibloader_orig_fontconfig
+#define FcPatternReference FcPatternReference_dylibloader_orig_fontconfig
+#define FcPatternFilter FcPatternFilter_dylibloader_orig_fontconfig
+#define FcValueDestroy FcValueDestroy_dylibloader_orig_fontconfig
+#define FcValueEqual FcValueEqual_dylibloader_orig_fontconfig
+#define FcValueSave FcValueSave_dylibloader_orig_fontconfig
+#define FcPatternDestroy FcPatternDestroy_dylibloader_orig_fontconfig
+#define FcPatternEqual FcPatternEqual_dylibloader_orig_fontconfig
+#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_orig_fontconfig
+#define FcPatternHash FcPatternHash_dylibloader_orig_fontconfig
+#define FcPatternAdd FcPatternAdd_dylibloader_orig_fontconfig
+#define FcPatternAddWeak FcPatternAddWeak_dylibloader_orig_fontconfig
+#define FcPatternGet FcPatternGet_dylibloader_orig_fontconfig
+#define FcPatternGetWithBinding FcPatternGetWithBinding_dylibloader_orig_fontconfig
+#define FcPatternDel FcPatternDel_dylibloader_orig_fontconfig
+#define FcPatternRemove FcPatternRemove_dylibloader_orig_fontconfig
+#define FcPatternAddInteger FcPatternAddInteger_dylibloader_orig_fontconfig
+#define FcPatternAddDouble FcPatternAddDouble_dylibloader_orig_fontconfig
+#define FcPatternAddString FcPatternAddString_dylibloader_orig_fontconfig
+#define FcPatternAddMatrix FcPatternAddMatrix_dylibloader_orig_fontconfig
+#define FcPatternAddCharSet FcPatternAddCharSet_dylibloader_orig_fontconfig
+#define FcPatternAddBool FcPatternAddBool_dylibloader_orig_fontconfig
+#define FcPatternAddLangSet FcPatternAddLangSet_dylibloader_orig_fontconfig
+#define FcPatternAddRange FcPatternAddRange_dylibloader_orig_fontconfig
+#define FcPatternGetInteger FcPatternGetInteger_dylibloader_orig_fontconfig
+#define FcPatternGetDouble FcPatternGetDouble_dylibloader_orig_fontconfig
+#define FcPatternGetString FcPatternGetString_dylibloader_orig_fontconfig
+#define FcPatternGetMatrix FcPatternGetMatrix_dylibloader_orig_fontconfig
+#define FcPatternGetCharSet FcPatternGetCharSet_dylibloader_orig_fontconfig
+#define FcPatternGetBool FcPatternGetBool_dylibloader_orig_fontconfig
+#define FcPatternGetLangSet FcPatternGetLangSet_dylibloader_orig_fontconfig
+#define FcPatternGetRange FcPatternGetRange_dylibloader_orig_fontconfig
+#define FcPatternVaBuild FcPatternVaBuild_dylibloader_orig_fontconfig
+#define FcPatternBuild FcPatternBuild_dylibloader_orig_fontconfig
+#define FcPatternFormat FcPatternFormat_dylibloader_orig_fontconfig
+#define FcRangeCreateDouble FcRangeCreateDouble_dylibloader_orig_fontconfig
+#define FcRangeCreateInteger FcRangeCreateInteger_dylibloader_orig_fontconfig
+#define FcRangeDestroy FcRangeDestroy_dylibloader_orig_fontconfig
+#define FcRangeCopy FcRangeCopy_dylibloader_orig_fontconfig
+#define FcRangeGetDouble FcRangeGetDouble_dylibloader_orig_fontconfig
+#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_orig_fontconfig
+#define FcWeightToOpenType FcWeightToOpenType_dylibloader_orig_fontconfig
+#define FcStrCopy FcStrCopy_dylibloader_orig_fontconfig
+#define FcStrCopyFilename FcStrCopyFilename_dylibloader_orig_fontconfig
+#define FcStrPlus FcStrPlus_dylibloader_orig_fontconfig
+#define FcStrFree FcStrFree_dylibloader_orig_fontconfig
+#define FcStrDowncase FcStrDowncase_dylibloader_orig_fontconfig
+#define FcStrCmpIgnoreCase FcStrCmpIgnoreCase_dylibloader_orig_fontconfig
+#define FcStrCmp FcStrCmp_dylibloader_orig_fontconfig
+#define FcStrStrIgnoreCase FcStrStrIgnoreCase_dylibloader_orig_fontconfig
+#define FcStrStr FcStrStr_dylibloader_orig_fontconfig
+#define FcUtf8ToUcs4 FcUtf8ToUcs4_dylibloader_orig_fontconfig
+#define FcUtf8Len FcUtf8Len_dylibloader_orig_fontconfig
+#define FcUcs4ToUtf8 FcUcs4ToUtf8_dylibloader_orig_fontconfig
+#define FcUtf16ToUcs4 FcUtf16ToUcs4_dylibloader_orig_fontconfig
+#define FcUtf16Len FcUtf16Len_dylibloader_orig_fontconfig
+#define FcStrDirname FcStrDirname_dylibloader_orig_fontconfig
+#define FcStrBasename FcStrBasename_dylibloader_orig_fontconfig
+#define FcStrSetCreate FcStrSetCreate_dylibloader_orig_fontconfig
+#define FcStrSetMember FcStrSetMember_dylibloader_orig_fontconfig
+#define FcStrSetEqual FcStrSetEqual_dylibloader_orig_fontconfig
+#define FcStrSetAdd FcStrSetAdd_dylibloader_orig_fontconfig
+#define FcStrSetAddFilename FcStrSetAddFilename_dylibloader_orig_fontconfig
+#define FcStrSetDel FcStrSetDel_dylibloader_orig_fontconfig
+#define FcStrSetDestroy FcStrSetDestroy_dylibloader_orig_fontconfig
+#define FcStrListCreate FcStrListCreate_dylibloader_orig_fontconfig
+#define FcStrListFirst FcStrListFirst_dylibloader_orig_fontconfig
+#define FcStrListNext FcStrListNext_dylibloader_orig_fontconfig
+#define FcStrListDone FcStrListDone_dylibloader_orig_fontconfig
+#define FcConfigParseAndLoad FcConfigParseAndLoad_dylibloader_orig_fontconfig
+#define FcConfigParseAndLoadFromMemory FcConfigParseAndLoadFromMemory_dylibloader_orig_fontconfig
+#include <fontconfig/fontconfig.h>
+#undef FcBlanksCreate
+#undef FcBlanksDestroy
+#undef FcBlanksAdd
+#undef FcBlanksIsMember
+#undef FcCacheDir
+#undef FcCacheCopySet
+#undef FcCacheSubdir
+#undef FcCacheNumSubdir
+#undef FcCacheNumFont
+#undef FcDirCacheUnlink
+#undef FcDirCacheValid
+#undef FcDirCacheClean
+#undef FcCacheCreateTagFile
+#undef FcConfigHome
+#undef FcConfigEnableHome
+#undef FcConfigFilename
+#undef FcConfigCreate
+#undef FcConfigReference
+#undef FcConfigDestroy
+#undef FcConfigSetCurrent
+#undef FcConfigGetCurrent
+#undef FcConfigUptoDate
+#undef FcConfigBuildFonts
+#undef FcConfigGetFontDirs
+#undef FcConfigGetConfigDirs
+#undef FcConfigGetConfigFiles
+#undef FcConfigGetCache
+#undef FcConfigGetBlanks
+#undef FcConfigGetCacheDirs
+#undef FcConfigGetRescanInterval
+#undef FcConfigSetRescanInterval
+#undef FcConfigGetFonts
+#undef FcConfigAppFontAddFile
+#undef FcConfigAppFontAddDir
+#undef FcConfigAppFontClear
+#undef FcConfigSubstituteWithPat
+#undef FcConfigSubstitute
+#undef FcConfigGetSysRoot
+#undef FcConfigSetSysRoot
+#undef FcValuePrint
+#undef FcPatternPrint
+#undef FcFontSetPrint
+#undef FcGetDefaultLangs
+#undef FcDefaultSubstitute
+#undef FcFileIsDir
+#undef FcFileScan
+#undef FcDirScan
+#undef FcDirSave
+#undef FcDirCacheLoad
+#undef FcDirCacheRescan
+#undef FcDirCacheRead
+#undef FcDirCacheLoadFile
+#undef FcDirCacheUnload
+#undef FcFreeTypeQuery
+#undef FcFontSetCreate
+#undef FcFontSetDestroy
+#undef FcFontSetAdd
+#undef FcInitLoadConfig
+#undef FcInitLoadConfigAndFonts
+#undef FcInit
+#undef FcFini
+#undef FcGetVersion
+#undef FcInitReinitialize
+#undef FcInitBringUptoDate
+#undef FcGetLangs
+#undef FcLangNormalize
+#undef FcLangGetCharSet
+#undef FcLangSetCreate
+#undef FcLangSetDestroy
+#undef FcLangSetCopy
+#undef FcLangSetAdd
+#undef FcLangSetDel
+#undef FcLangSetHasLang
+#undef FcLangSetCompare
+#undef FcLangSetContains
+#undef FcLangSetEqual
+#undef FcLangSetHash
+#undef FcLangSetGetLangs
+#undef FcLangSetUnion
+#undef FcLangSetSubtract
+#undef FcObjectSetCreate
+#undef FcObjectSetAdd
+#undef FcObjectSetDestroy
+#undef FcObjectSetVaBuild
+#undef FcObjectSetBuild
+#undef FcFontSetList
+#undef FcFontList
+#undef FcAtomicCreate
+#undef FcAtomicLock
+#undef FcAtomicNewFile
+#undef FcAtomicOrigFile
+#undef FcAtomicReplaceOrig
+#undef FcAtomicDeleteNew
+#undef FcAtomicUnlock
+#undef FcAtomicDestroy
+#undef FcFontSetMatch
+#undef FcFontMatch
+#undef FcFontRenderPrepare
+#undef FcFontSetSort
+#undef FcFontSort
+#undef FcFontSetSortDestroy
+#undef FcMatrixCopy
+#undef FcMatrixEqual
+#undef FcMatrixMultiply
+#undef FcMatrixRotate
+#undef FcMatrixScale
+#undef FcMatrixShear
+#undef FcNameRegisterObjectTypes
+#undef FcNameUnregisterObjectTypes
+#undef FcNameGetObjectType
+#undef FcNameRegisterConstants
+#undef FcNameUnregisterConstants
+#undef FcNameGetConstant
+#undef FcNameConstant
+#undef FcNameParse
+#undef FcNameUnparse
+#undef FcPatternCreate
+#undef FcPatternDuplicate
+#undef FcPatternReference
+#undef FcPatternFilter
+#undef FcValueDestroy
+#undef FcValueEqual
+#undef FcValueSave
+#undef FcPatternDestroy
+#undef FcPatternEqual
+#undef FcPatternEqualSubset
+#undef FcPatternHash
+#undef FcPatternAdd
+#undef FcPatternAddWeak
+#undef FcPatternGet
+#undef FcPatternGetWithBinding
+#undef FcPatternDel
+#undef FcPatternRemove
+#undef FcPatternAddInteger
+#undef FcPatternAddDouble
+#undef FcPatternAddString
+#undef FcPatternAddMatrix
+#undef FcPatternAddCharSet
+#undef FcPatternAddBool
+#undef FcPatternAddLangSet
+#undef FcPatternAddRange
+#undef FcPatternGetInteger
+#undef FcPatternGetDouble
+#undef FcPatternGetString
+#undef FcPatternGetMatrix
+#undef FcPatternGetCharSet
+#undef FcPatternGetBool
+#undef FcPatternGetLangSet
+#undef FcPatternGetRange
+#undef FcPatternVaBuild
+#undef FcPatternBuild
+#undef FcPatternFormat
+#undef FcRangeCreateDouble
+#undef FcRangeCreateInteger
+#undef FcRangeDestroy
+#undef FcRangeCopy
+#undef FcRangeGetDouble
+#undef FcWeightFromOpenType
+#undef FcWeightToOpenType
+#undef FcStrCopy
+#undef FcStrCopyFilename
+#undef FcStrPlus
+#undef FcStrFree
+#undef FcStrDowncase
+#undef FcStrCmpIgnoreCase
+#undef FcStrCmp
+#undef FcStrStrIgnoreCase
+#undef FcStrStr
+#undef FcUtf8ToUcs4
+#undef FcUtf8Len
+#undef FcUcs4ToUtf8
+#undef FcUtf16ToUcs4
+#undef FcUtf16Len
+#undef FcStrDirname
+#undef FcStrBasename
+#undef FcStrSetCreate
+#undef FcStrSetMember
+#undef FcStrSetEqual
+#undef FcStrSetAdd
+#undef FcStrSetAddFilename
+#undef FcStrSetDel
+#undef FcStrSetDestroy
+#undef FcStrListCreate
+#undef FcStrListFirst
+#undef FcStrListNext
+#undef FcStrListDone
+#undef FcConfigParseAndLoad
+#undef FcConfigParseAndLoadFromMemory
+#include <dlfcn.h>
+#include <stdio.h>
+FcBlanks* (*FcBlanksCreate_dylibloader_wrapper_fontconfig)( void);
+void (*FcBlanksDestroy_dylibloader_wrapper_fontconfig)( FcBlanks*);
+FcBool (*FcBlanksAdd_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
+FcBool (*FcBlanksIsMember_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
+const FcChar8* (*FcCacheDir_dylibloader_wrapper_fontconfig)(const FcCache*);
+FcFontSet* (*FcCacheCopySet_dylibloader_wrapper_fontconfig)(const FcCache*);
+const FcChar8* (*FcCacheSubdir_dylibloader_wrapper_fontconfig)(const FcCache*, int);
+int (*FcCacheNumSubdir_dylibloader_wrapper_fontconfig)(const FcCache*);
+int (*FcCacheNumFont_dylibloader_wrapper_fontconfig)(const FcCache*);
+FcBool (*FcDirCacheUnlink_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
+FcBool (*FcDirCacheValid_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcBool (*FcDirCacheClean_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool);
+void (*FcCacheCreateTagFile_dylibloader_wrapper_fontconfig)(const FcConfig*);
+FcChar8* (*FcConfigHome_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcConfigEnableHome_dylibloader_wrapper_fontconfig)( FcBool);
+FcChar8* (*FcConfigFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcConfig* (*FcConfigCreate_dylibloader_wrapper_fontconfig)( void);
+FcConfig* (*FcConfigReference_dylibloader_wrapper_fontconfig)( FcConfig*);
+void (*FcConfigDestroy_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcBool (*FcConfigSetCurrent_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcConfig* (*FcConfigGetCurrent_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcConfigUptoDate_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcBool (*FcConfigBuildFonts_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcStrList* (*FcConfigGetFontDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcStrList* (*FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcStrList* (*FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcChar8* (*FcConfigGetCache_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcBlanks* (*FcConfigGetBlanks_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcStrList* (*FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig)(const FcConfig*);
+int (*FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcBool (*FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*, int);
+FcFontSet* (*FcConfigGetFonts_dylibloader_wrapper_fontconfig)( FcConfig*, FcSetName);
+FcBool (*FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+FcBool (*FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+void (*FcConfigAppFontClear_dylibloader_wrapper_fontconfig)( FcConfig*);
+FcBool (*FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*, FcMatchKind);
+FcBool (*FcConfigSubstitute_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcMatchKind);
+const FcChar8* (*FcConfigGetSysRoot_dylibloader_wrapper_fontconfig)(const FcConfig*);
+void (*FcConfigSetSysRoot_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+void (*FcValuePrint_dylibloader_wrapper_fontconfig)(const FcValue);
+void (*FcPatternPrint_dylibloader_wrapper_fontconfig)(const FcPattern*);
+void (*FcFontSetPrint_dylibloader_wrapper_fontconfig)(const FcFontSet*);
+FcStrSet* (*FcGetDefaultLangs_dylibloader_wrapper_fontconfig)( void);
+void (*FcDefaultSubstitute_dylibloader_wrapper_fontconfig)( FcPattern*);
+FcBool (*FcFileIsDir_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcBool (*FcFileScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
+FcBool (*FcDirScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
+FcBool (*FcDirSave_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*,const FcChar8*);
+FcCache* (*FcDirCacheLoad_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*, FcChar8**);
+FcCache* (*FcDirCacheRescan_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
+FcCache* (*FcDirCacheRead_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool, FcConfig*);
+FcCache* (*FcDirCacheLoadFile_dylibloader_wrapper_fontconfig)(const FcChar8*,struct stat*);
+void (*FcDirCacheUnload_dylibloader_wrapper_fontconfig)( FcCache*);
+FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, int, FcBlanks*, int*);
+FcFontSet* (*FcFontSetCreate_dylibloader_wrapper_fontconfig)( void);
+void (*FcFontSetDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
+FcBool (*FcFontSetAdd_dylibloader_wrapper_fontconfig)( FcFontSet*, FcPattern*);
+FcConfig* (*FcInitLoadConfig_dylibloader_wrapper_fontconfig)( void);
+FcConfig* (*FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcInit_dylibloader_wrapper_fontconfig)( void);
+void (*FcFini_dylibloader_wrapper_fontconfig)( void);
+int (*FcGetVersion_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcInitReinitialize_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcInitBringUptoDate_dylibloader_wrapper_fontconfig)( void);
+FcStrSet* (*FcGetLangs_dylibloader_wrapper_fontconfig)( void);
+FcChar8* (*FcLangNormalize_dylibloader_wrapper_fontconfig)(const FcChar8*);
+const FcCharSet* (*FcLangGetCharSet_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcLangSet* (*FcLangSetCreate_dylibloader_wrapper_fontconfig)( void);
+void (*FcLangSetDestroy_dylibloader_wrapper_fontconfig)( FcLangSet*);
+FcLangSet* (*FcLangSetCopy_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+FcBool (*FcLangSetAdd_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
+FcBool (*FcLangSetDel_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
+FcLangResult (*FcLangSetHasLang_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcChar8*);
+FcLangResult (*FcLangSetCompare_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+FcBool (*FcLangSetContains_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+FcBool (*FcLangSetEqual_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+FcChar32 (*FcLangSetHash_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+FcStrSet* (*FcLangSetGetLangs_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+FcLangSet* (*FcLangSetUnion_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+FcLangSet* (*FcLangSetSubtract_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+FcObjectSet* (*FcObjectSetCreate_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcObjectSetAdd_dylibloader_wrapper_fontconfig)( FcObjectSet*,const char*);
+void (*FcObjectSetDestroy_dylibloader_wrapper_fontconfig)( FcObjectSet*);
+FcObjectSet* (*FcObjectSetVaBuild_dylibloader_wrapper_fontconfig)(const char*, va_list);
+FcObjectSet* (*FcObjectSetBuild_dylibloader_wrapper_fontconfig)(const char*,...);
+FcFontSet* (*FcFontSetList_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcObjectSet*);
+FcFontSet* (*FcFontList_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcObjectSet*);
+FcAtomic* (*FcAtomicCreate_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcBool (*FcAtomicLock_dylibloader_wrapper_fontconfig)( FcAtomic*);
+FcChar8* (*FcAtomicNewFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
+FcChar8* (*FcAtomicOrigFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
+FcBool (*FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig)( FcAtomic*);
+void (*FcAtomicDeleteNew_dylibloader_wrapper_fontconfig)( FcAtomic*);
+void (*FcAtomicUnlock_dylibloader_wrapper_fontconfig)( FcAtomic*);
+void (*FcAtomicDestroy_dylibloader_wrapper_fontconfig)( FcAtomic*);
+FcPattern* (*FcFontSetMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcResult*);
+FcPattern* (*FcFontMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcResult*);
+FcPattern* (*FcFontRenderPrepare_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*);
+FcFontSet* (*FcFontSetSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcBool, FcCharSet**, FcResult*);
+FcFontSet* (*FcFontSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcBool, FcCharSet**, FcResult*);
+void (*FcFontSetSortDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
+FcMatrix* (*FcMatrixCopy_dylibloader_wrapper_fontconfig)(const FcMatrix*);
+FcBool (*FcMatrixEqual_dylibloader_wrapper_fontconfig)(const FcMatrix*,const FcMatrix*);
+void (*FcMatrixMultiply_dylibloader_wrapper_fontconfig)( FcMatrix*,const FcMatrix*,const FcMatrix*);
+void (*FcMatrixRotate_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+void (*FcMatrixScale_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+void (*FcMatrixShear_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+FcBool (*FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
+FcBool (*FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
+const FcObjectType* (*FcNameGetObjectType_dylibloader_wrapper_fontconfig)(const char*);
+FcBool (*FcNameRegisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
+FcBool (*FcNameUnregisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
+const FcConstant* (*FcNameGetConstant_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcBool (*FcNameConstant_dylibloader_wrapper_fontconfig)(const FcChar8*, int*);
+FcPattern* (*FcNameParse_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcChar8* (*FcNameUnparse_dylibloader_wrapper_fontconfig)( FcPattern*);
+FcPattern* (*FcPatternCreate_dylibloader_wrapper_fontconfig)( void);
+FcPattern* (*FcPatternDuplicate_dylibloader_wrapper_fontconfig)(const FcPattern*);
+void (*FcPatternReference_dylibloader_wrapper_fontconfig)( FcPattern*);
+FcPattern* (*FcPatternFilter_dylibloader_wrapper_fontconfig)( FcPattern*,const FcObjectSet*);
+void (*FcValueDestroy_dylibloader_wrapper_fontconfig)( FcValue);
+FcBool (*FcValueEqual_dylibloader_wrapper_fontconfig)( FcValue, FcValue);
+FcValue (*FcValueSave_dylibloader_wrapper_fontconfig)( FcValue);
+void (*FcPatternDestroy_dylibloader_wrapper_fontconfig)( FcPattern*);
+FcBool (*FcPatternEqual_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*);
+FcBool (*FcPatternEqualSubset_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*,const FcObjectSet*);
+FcChar32 (*FcPatternHash_dylibloader_wrapper_fontconfig)(const FcPattern*);
+FcBool (*FcPatternAdd_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
+FcBool (*FcPatternAddWeak_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
+FcResult (*FcPatternGet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*);
+FcResult (*FcPatternGetWithBinding_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*, FcValueBinding*);
+FcBool (*FcPatternDel_dylibloader_wrapper_fontconfig)( FcPattern*,const char*);
+FcBool (*FcPatternRemove_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
+FcBool (*FcPatternAddInteger_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
+FcBool (*FcPatternAddDouble_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, double);
+FcBool (*FcPatternAddString_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcChar8*);
+FcBool (*FcPatternAddMatrix_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcMatrix*);
+FcBool (*FcPatternAddCharSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcCharSet*);
+FcBool (*FcPatternAddBool_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcBool);
+FcBool (*FcPatternAddLangSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcLangSet*);
+FcBool (*FcPatternAddRange_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcRange*);
+FcResult (*FcPatternGetInteger_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, int*);
+FcResult (*FcPatternGetDouble_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, double*);
+FcResult (*FcPatternGetString_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcChar8**);
+FcResult (*FcPatternGetMatrix_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcMatrix**);
+FcResult (*FcPatternGetCharSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcCharSet**);
+FcResult (*FcPatternGetBool_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcBool*);
+FcResult (*FcPatternGetLangSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcLangSet**);
+FcResult (*FcPatternGetRange_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcRange**);
+FcPattern* (*FcPatternVaBuild_dylibloader_wrapper_fontconfig)( FcPattern*, va_list);
+FcPattern* (*FcPatternBuild_dylibloader_wrapper_fontconfig)( FcPattern*,...);
+FcChar8* (*FcPatternFormat_dylibloader_wrapper_fontconfig)( FcPattern*,const FcChar8*);
+FcRange* (*FcRangeCreateDouble_dylibloader_wrapper_fontconfig)( double, double);
+FcRange* (*FcRangeCreateInteger_dylibloader_wrapper_fontconfig)( FcChar32, FcChar32);
+void (*FcRangeDestroy_dylibloader_wrapper_fontconfig)( FcRange*);
+FcRange* (*FcRangeCopy_dylibloader_wrapper_fontconfig)(const FcRange*);
+FcBool (*FcRangeGetDouble_dylibloader_wrapper_fontconfig)(const FcRange*, double*, double*);
+int (*FcWeightFromOpenType_dylibloader_wrapper_fontconfig)( int);
+int (*FcWeightToOpenType_dylibloader_wrapper_fontconfig)( int);
+FcChar8* (*FcStrCopy_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcChar8* (*FcStrCopyFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcChar8* (*FcStrPlus_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+void (*FcStrFree_dylibloader_wrapper_fontconfig)( FcChar8*);
+FcChar8* (*FcStrDowncase_dylibloader_wrapper_fontconfig)(const FcChar8*);
+int (*FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+int (*FcStrCmp_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+const FcChar8* (*FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+const FcChar8* (*FcStrStr_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+int (*FcUtf8ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcChar32*, int);
+FcBool (*FcUtf8Len_dylibloader_wrapper_fontconfig)(const FcChar8*, int, int*, int*);
+int (*FcUcs4ToUtf8_dylibloader_wrapper_fontconfig)( FcChar32, FcChar8 [6]);
+int (*FcUtf16ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, FcChar32*, int);
+FcBool (*FcUtf16Len_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, int, int*, int*);
+FcChar8* (*FcStrDirname_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcChar8* (*FcStrBasename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+FcStrSet* (*FcStrSetCreate_dylibloader_wrapper_fontconfig)( void);
+FcBool (*FcStrSetMember_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+FcBool (*FcStrSetEqual_dylibloader_wrapper_fontconfig)( FcStrSet*, FcStrSet*);
+FcBool (*FcStrSetAdd_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+FcBool (*FcStrSetAddFilename_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+FcBool (*FcStrSetDel_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+void (*FcStrSetDestroy_dylibloader_wrapper_fontconfig)( FcStrSet*);
+FcStrList* (*FcStrListCreate_dylibloader_wrapper_fontconfig)( FcStrSet*);
+void (*FcStrListFirst_dylibloader_wrapper_fontconfig)( FcStrList*);
+FcChar8* (*FcStrListNext_dylibloader_wrapper_fontconfig)( FcStrList*);
+void (*FcStrListDone_dylibloader_wrapper_fontconfig)( FcStrList*);
+FcBool (*FcConfigParseAndLoad_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
+FcBool (*FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
+int initialize_fontconfig(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libfontconfig.so", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// FcBlanksCreate
+ *(void **) (&FcBlanksCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcBlanksCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcBlanksDestroy
+ *(void **) (&FcBlanksDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcBlanksDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcBlanksAdd
+ *(void **) (&FcBlanksAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcBlanksAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcBlanksIsMember
+ *(void **) (&FcBlanksIsMember_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcBlanksIsMember");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheDir
+ *(void **) (&FcCacheDir_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheDir");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheCopySet
+ *(void **) (&FcCacheCopySet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheCopySet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheSubdir
+ *(void **) (&FcCacheSubdir_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheSubdir");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheNumSubdir
+ *(void **) (&FcCacheNumSubdir_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheNumSubdir");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheNumFont
+ *(void **) (&FcCacheNumFont_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheNumFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheUnlink
+ *(void **) (&FcDirCacheUnlink_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheUnlink");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheValid
+ *(void **) (&FcDirCacheValid_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheValid");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheClean
+ *(void **) (&FcDirCacheClean_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheClean");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCacheCreateTagFile
+ *(void **) (&FcCacheCreateTagFile_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCacheCreateTagFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigHome
+ *(void **) (&FcConfigHome_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigHome");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigEnableHome
+ *(void **) (&FcConfigEnableHome_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigEnableHome");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigFilename
+ *(void **) (&FcConfigFilename_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigFilename");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigCreate
+ *(void **) (&FcConfigCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigReference
+ *(void **) (&FcConfigReference_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigReference");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigDestroy
+ *(void **) (&FcConfigDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigSetCurrent
+ *(void **) (&FcConfigSetCurrent_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigSetCurrent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetCurrent
+ *(void **) (&FcConfigGetCurrent_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetCurrent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigUptoDate
+ *(void **) (&FcConfigUptoDate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigUptoDate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigBuildFonts
+ *(void **) (&FcConfigBuildFonts_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigBuildFonts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetFontDirs
+ *(void **) (&FcConfigGetFontDirs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetFontDirs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetConfigDirs
+ *(void **) (&FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetConfigDirs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetConfigFiles
+ *(void **) (&FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetConfigFiles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetCache
+ *(void **) (&FcConfigGetCache_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetCache");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetBlanks
+ *(void **) (&FcConfigGetBlanks_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetBlanks");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetCacheDirs
+ *(void **) (&FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetCacheDirs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetRescanInterval
+ *(void **) (&FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetRescanInterval");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigSetRescanInterval
+ *(void **) (&FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigSetRescanInterval");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetFonts
+ *(void **) (&FcConfigGetFonts_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetFonts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigAppFontAddFile
+ *(void **) (&FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigAppFontAddFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigAppFontAddDir
+ *(void **) (&FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigAppFontAddDir");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigAppFontClear
+ *(void **) (&FcConfigAppFontClear_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigAppFontClear");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigSubstituteWithPat
+ *(void **) (&FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigSubstituteWithPat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigSubstitute
+ *(void **) (&FcConfigSubstitute_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigSubstitute");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigGetSysRoot
+ *(void **) (&FcConfigGetSysRoot_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigGetSysRoot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigSetSysRoot
+ *(void **) (&FcConfigSetSysRoot_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigSetSysRoot");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcValuePrint
+ *(void **) (&FcValuePrint_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcValuePrint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternPrint
+ *(void **) (&FcPatternPrint_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternPrint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetPrint
+ *(void **) (&FcFontSetPrint_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetPrint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcGetDefaultLangs
+ *(void **) (&FcGetDefaultLangs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcGetDefaultLangs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDefaultSubstitute
+ *(void **) (&FcDefaultSubstitute_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDefaultSubstitute");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFileIsDir
+ *(void **) (&FcFileIsDir_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFileIsDir");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFileScan
+ *(void **) (&FcFileScan_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFileScan");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirScan
+ *(void **) (&FcDirScan_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirScan");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirSave
+ *(void **) (&FcDirSave_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheLoad
+ *(void **) (&FcDirCacheLoad_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheRescan
+ *(void **) (&FcDirCacheRescan_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheRescan");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheRead
+ *(void **) (&FcDirCacheRead_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheRead");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheLoadFile
+ *(void **) (&FcDirCacheLoadFile_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheLoadFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheUnload
+ *(void **) (&FcDirCacheUnload_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheUnload");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFreeTypeQuery
+ *(void **) (&FcFreeTypeQuery_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFreeTypeQuery");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetCreate
+ *(void **) (&FcFontSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetDestroy
+ *(void **) (&FcFontSetDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetAdd
+ *(void **) (&FcFontSetAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcInitLoadConfig
+ *(void **) (&FcInitLoadConfig_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcInitLoadConfig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcInitLoadConfigAndFonts
+ *(void **) (&FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcInitLoadConfigAndFonts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcInit
+ *(void **) (&FcInit_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcInit");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFini
+ *(void **) (&FcFini_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFini");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcGetVersion
+ *(void **) (&FcGetVersion_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcGetVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcInitReinitialize
+ *(void **) (&FcInitReinitialize_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcInitReinitialize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcInitBringUptoDate
+ *(void **) (&FcInitBringUptoDate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcInitBringUptoDate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcGetLangs
+ *(void **) (&FcGetLangs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcGetLangs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangNormalize
+ *(void **) (&FcLangNormalize_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangNormalize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangGetCharSet
+ *(void **) (&FcLangGetCharSet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangGetCharSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetCreate
+ *(void **) (&FcLangSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetDestroy
+ *(void **) (&FcLangSetDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetCopy
+ *(void **) (&FcLangSetCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetCopy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetAdd
+ *(void **) (&FcLangSetAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetDel
+ *(void **) (&FcLangSetDel_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetDel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetHasLang
+ *(void **) (&FcLangSetHasLang_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetHasLang");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetCompare
+ *(void **) (&FcLangSetCompare_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetCompare");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetContains
+ *(void **) (&FcLangSetContains_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetContains");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetEqual
+ *(void **) (&FcLangSetEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetHash
+ *(void **) (&FcLangSetHash_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetHash");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetGetLangs
+ *(void **) (&FcLangSetGetLangs_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetGetLangs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetUnion
+ *(void **) (&FcLangSetUnion_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetUnion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcLangSetSubtract
+ *(void **) (&FcLangSetSubtract_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcLangSetSubtract");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcObjectSetCreate
+ *(void **) (&FcObjectSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcObjectSetCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcObjectSetAdd
+ *(void **) (&FcObjectSetAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcObjectSetAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcObjectSetDestroy
+ *(void **) (&FcObjectSetDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcObjectSetDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcObjectSetVaBuild
+ *(void **) (&FcObjectSetVaBuild_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcObjectSetVaBuild");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcObjectSetBuild
+ *(void **) (&FcObjectSetBuild_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcObjectSetBuild");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetList
+ *(void **) (&FcFontSetList_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontList
+ *(void **) (&FcFontList_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicCreate
+ *(void **) (&FcAtomicCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicLock
+ *(void **) (&FcAtomicLock_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicLock");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicNewFile
+ *(void **) (&FcAtomicNewFile_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicNewFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicOrigFile
+ *(void **) (&FcAtomicOrigFile_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicOrigFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicReplaceOrig
+ *(void **) (&FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicReplaceOrig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicDeleteNew
+ *(void **) (&FcAtomicDeleteNew_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicDeleteNew");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicUnlock
+ *(void **) (&FcAtomicUnlock_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicUnlock");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcAtomicDestroy
+ *(void **) (&FcAtomicDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcAtomicDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetMatch
+ *(void **) (&FcFontSetMatch_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetMatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontMatch
+ *(void **) (&FcFontMatch_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontMatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontRenderPrepare
+ *(void **) (&FcFontRenderPrepare_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontRenderPrepare");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetSort
+ *(void **) (&FcFontSetSort_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetSort");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSort
+ *(void **) (&FcFontSort_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSort");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcFontSetSortDestroy
+ *(void **) (&FcFontSetSortDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetSortDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixCopy
+ *(void **) (&FcMatrixCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixCopy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixEqual
+ *(void **) (&FcMatrixEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixMultiply
+ *(void **) (&FcMatrixMultiply_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixMultiply");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixRotate
+ *(void **) (&FcMatrixRotate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixRotate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixScale
+ *(void **) (&FcMatrixScale_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixScale");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcMatrixShear
+ *(void **) (&FcMatrixShear_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcMatrixShear");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameRegisterObjectTypes
+ *(void **) (&FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameRegisterObjectTypes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameUnregisterObjectTypes
+ *(void **) (&FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameUnregisterObjectTypes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameGetObjectType
+ *(void **) (&FcNameGetObjectType_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameGetObjectType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameRegisterConstants
+ *(void **) (&FcNameRegisterConstants_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameRegisterConstants");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameUnregisterConstants
+ *(void **) (&FcNameUnregisterConstants_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameUnregisterConstants");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameGetConstant
+ *(void **) (&FcNameGetConstant_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameGetConstant");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameConstant
+ *(void **) (&FcNameConstant_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameConstant");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameParse
+ *(void **) (&FcNameParse_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameParse");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcNameUnparse
+ *(void **) (&FcNameUnparse_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcNameUnparse");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternCreate
+ *(void **) (&FcPatternCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternDuplicate
+ *(void **) (&FcPatternDuplicate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternDuplicate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternReference
+ *(void **) (&FcPatternReference_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternReference");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternFilter
+ *(void **) (&FcPatternFilter_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternFilter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcValueDestroy
+ *(void **) (&FcValueDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcValueDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcValueEqual
+ *(void **) (&FcValueEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcValueEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcValueSave
+ *(void **) (&FcValueSave_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcValueSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternDestroy
+ *(void **) (&FcPatternDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternEqual
+ *(void **) (&FcPatternEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternEqualSubset
+ *(void **) (&FcPatternEqualSubset_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternEqualSubset");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternHash
+ *(void **) (&FcPatternHash_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternHash");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAdd
+ *(void **) (&FcPatternAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddWeak
+ *(void **) (&FcPatternAddWeak_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddWeak");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGet
+ *(void **) (&FcPatternGet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetWithBinding
+ *(void **) (&FcPatternGetWithBinding_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetWithBinding");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternDel
+ *(void **) (&FcPatternDel_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternDel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternRemove
+ *(void **) (&FcPatternRemove_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternRemove");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddInteger
+ *(void **) (&FcPatternAddInteger_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddInteger");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddDouble
+ *(void **) (&FcPatternAddDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddString
+ *(void **) (&FcPatternAddString_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddMatrix
+ *(void **) (&FcPatternAddMatrix_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddMatrix");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddCharSet
+ *(void **) (&FcPatternAddCharSet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddCharSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddBool
+ *(void **) (&FcPatternAddBool_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddBool");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddLangSet
+ *(void **) (&FcPatternAddLangSet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddLangSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternAddRange
+ *(void **) (&FcPatternAddRange_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternAddRange");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetInteger
+ *(void **) (&FcPatternGetInteger_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetInteger");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetDouble
+ *(void **) (&FcPatternGetDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetString
+ *(void **) (&FcPatternGetString_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetMatrix
+ *(void **) (&FcPatternGetMatrix_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetMatrix");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetCharSet
+ *(void **) (&FcPatternGetCharSet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetCharSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetBool
+ *(void **) (&FcPatternGetBool_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetBool");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetLangSet
+ *(void **) (&FcPatternGetLangSet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetLangSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternGetRange
+ *(void **) (&FcPatternGetRange_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternGetRange");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternVaBuild
+ *(void **) (&FcPatternVaBuild_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternVaBuild");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternBuild
+ *(void **) (&FcPatternBuild_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternBuild");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternFormat
+ *(void **) (&FcPatternFormat_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcRangeCreateDouble
+ *(void **) (&FcRangeCreateDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcRangeCreateDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcRangeCreateInteger
+ *(void **) (&FcRangeCreateInteger_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcRangeCreateInteger");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcRangeDestroy
+ *(void **) (&FcRangeDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcRangeDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcRangeCopy
+ *(void **) (&FcRangeCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcRangeCopy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcRangeGetDouble
+ *(void **) (&FcRangeGetDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcRangeGetDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcWeightFromOpenType
+ *(void **) (&FcWeightFromOpenType_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightFromOpenType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcWeightToOpenType
+ *(void **) (&FcWeightToOpenType_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightToOpenType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrCopy
+ *(void **) (&FcStrCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrCopy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrCopyFilename
+ *(void **) (&FcStrCopyFilename_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrCopyFilename");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrPlus
+ *(void **) (&FcStrPlus_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrPlus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrFree
+ *(void **) (&FcStrFree_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrFree");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrDowncase
+ *(void **) (&FcStrDowncase_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrDowncase");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrCmpIgnoreCase
+ *(void **) (&FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrCmpIgnoreCase");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrCmp
+ *(void **) (&FcStrCmp_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrCmp");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrStrIgnoreCase
+ *(void **) (&FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrStrIgnoreCase");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrStr
+ *(void **) (&FcStrStr_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrStr");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcUtf8ToUcs4
+ *(void **) (&FcUtf8ToUcs4_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcUtf8ToUcs4");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcUtf8Len
+ *(void **) (&FcUtf8Len_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcUtf8Len");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcUcs4ToUtf8
+ *(void **) (&FcUcs4ToUtf8_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcUcs4ToUtf8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcUtf16ToUcs4
+ *(void **) (&FcUtf16ToUcs4_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcUtf16ToUcs4");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcUtf16Len
+ *(void **) (&FcUtf16Len_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcUtf16Len");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrDirname
+ *(void **) (&FcStrDirname_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrDirname");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrBasename
+ *(void **) (&FcStrBasename_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrBasename");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetCreate
+ *(void **) (&FcStrSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetMember
+ *(void **) (&FcStrSetMember_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetMember");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetEqual
+ *(void **) (&FcStrSetEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetAdd
+ *(void **) (&FcStrSetAdd_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetAdd");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetAddFilename
+ *(void **) (&FcStrSetAddFilename_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetAddFilename");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetDel
+ *(void **) (&FcStrSetDel_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetDel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrSetDestroy
+ *(void **) (&FcStrSetDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrSetDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrListCreate
+ *(void **) (&FcStrListCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrListCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrListFirst
+ *(void **) (&FcStrListFirst_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrListFirst");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrListNext
+ *(void **) (&FcStrListNext_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrListNext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcStrListDone
+ *(void **) (&FcStrListDone_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrListDone");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigParseAndLoad
+ *(void **) (&FcConfigParseAndLoad_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigParseAndLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigParseAndLoadFromMemory
+ *(void **) (&FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigParseAndLoadFromMemory");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/fontconfig-so_wrap.h b/platform/linuxbsd/fontconfig-so_wrap.h
new file mode 100644
index 0000000000..f0794cce8b
--- /dev/null
+++ b/platform/linuxbsd/fontconfig-so_wrap.h
@@ -0,0 +1,770 @@
+#ifndef DYLIBLOAD_WRAPPER_FONTCONFIG
+#define DYLIBLOAD_WRAPPER_FONTCONFIG
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-07-29 05:40:07
+// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSet
+//
+#include <stdint.h>
+
+#define FcBlanksCreate FcBlanksCreate_dylibloader_orig_fontconfig
+#define FcBlanksDestroy FcBlanksDestroy_dylibloader_orig_fontconfig
+#define FcBlanksAdd FcBlanksAdd_dylibloader_orig_fontconfig
+#define FcBlanksIsMember FcBlanksIsMember_dylibloader_orig_fontconfig
+#define FcCacheDir FcCacheDir_dylibloader_orig_fontconfig
+#define FcCacheCopySet FcCacheCopySet_dylibloader_orig_fontconfig
+#define FcCacheSubdir FcCacheSubdir_dylibloader_orig_fontconfig
+#define FcCacheNumSubdir FcCacheNumSubdir_dylibloader_orig_fontconfig
+#define FcCacheNumFont FcCacheNumFont_dylibloader_orig_fontconfig
+#define FcDirCacheUnlink FcDirCacheUnlink_dylibloader_orig_fontconfig
+#define FcDirCacheValid FcDirCacheValid_dylibloader_orig_fontconfig
+#define FcDirCacheClean FcDirCacheClean_dylibloader_orig_fontconfig
+#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_orig_fontconfig
+#define FcConfigHome FcConfigHome_dylibloader_orig_fontconfig
+#define FcConfigEnableHome FcConfigEnableHome_dylibloader_orig_fontconfig
+#define FcConfigFilename FcConfigFilename_dylibloader_orig_fontconfig
+#define FcConfigCreate FcConfigCreate_dylibloader_orig_fontconfig
+#define FcConfigReference FcConfigReference_dylibloader_orig_fontconfig
+#define FcConfigDestroy FcConfigDestroy_dylibloader_orig_fontconfig
+#define FcConfigSetCurrent FcConfigSetCurrent_dylibloader_orig_fontconfig
+#define FcConfigGetCurrent FcConfigGetCurrent_dylibloader_orig_fontconfig
+#define FcConfigUptoDate FcConfigUptoDate_dylibloader_orig_fontconfig
+#define FcConfigBuildFonts FcConfigBuildFonts_dylibloader_orig_fontconfig
+#define FcConfigGetFontDirs FcConfigGetFontDirs_dylibloader_orig_fontconfig
+#define FcConfigGetConfigDirs FcConfigGetConfigDirs_dylibloader_orig_fontconfig
+#define FcConfigGetConfigFiles FcConfigGetConfigFiles_dylibloader_orig_fontconfig
+#define FcConfigGetCache FcConfigGetCache_dylibloader_orig_fontconfig
+#define FcConfigGetBlanks FcConfigGetBlanks_dylibloader_orig_fontconfig
+#define FcConfigGetCacheDirs FcConfigGetCacheDirs_dylibloader_orig_fontconfig
+#define FcConfigGetRescanInterval FcConfigGetRescanInterval_dylibloader_orig_fontconfig
+#define FcConfigSetRescanInterval FcConfigSetRescanInterval_dylibloader_orig_fontconfig
+#define FcConfigGetFonts FcConfigGetFonts_dylibloader_orig_fontconfig
+#define FcConfigAppFontAddFile FcConfigAppFontAddFile_dylibloader_orig_fontconfig
+#define FcConfigAppFontAddDir FcConfigAppFontAddDir_dylibloader_orig_fontconfig
+#define FcConfigAppFontClear FcConfigAppFontClear_dylibloader_orig_fontconfig
+#define FcConfigSubstituteWithPat FcConfigSubstituteWithPat_dylibloader_orig_fontconfig
+#define FcConfigSubstitute FcConfigSubstitute_dylibloader_orig_fontconfig
+#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_orig_fontconfig
+#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_orig_fontconfig
+#define FcValuePrint FcValuePrint_dylibloader_orig_fontconfig
+#define FcPatternPrint FcPatternPrint_dylibloader_orig_fontconfig
+#define FcFontSetPrint FcFontSetPrint_dylibloader_orig_fontconfig
+#define FcGetDefaultLangs FcGetDefaultLangs_dylibloader_orig_fontconfig
+#define FcDefaultSubstitute FcDefaultSubstitute_dylibloader_orig_fontconfig
+#define FcFileIsDir FcFileIsDir_dylibloader_orig_fontconfig
+#define FcFileScan FcFileScan_dylibloader_orig_fontconfig
+#define FcDirScan FcDirScan_dylibloader_orig_fontconfig
+#define FcDirSave FcDirSave_dylibloader_orig_fontconfig
+#define FcDirCacheLoad FcDirCacheLoad_dylibloader_orig_fontconfig
+#define FcDirCacheRescan FcDirCacheRescan_dylibloader_orig_fontconfig
+#define FcDirCacheRead FcDirCacheRead_dylibloader_orig_fontconfig
+#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_orig_fontconfig
+#define FcDirCacheUnload FcDirCacheUnload_dylibloader_orig_fontconfig
+#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_orig_fontconfig
+#define FcFontSetCreate FcFontSetCreate_dylibloader_orig_fontconfig
+#define FcFontSetDestroy FcFontSetDestroy_dylibloader_orig_fontconfig
+#define FcFontSetAdd FcFontSetAdd_dylibloader_orig_fontconfig
+#define FcInitLoadConfig FcInitLoadConfig_dylibloader_orig_fontconfig
+#define FcInitLoadConfigAndFonts FcInitLoadConfigAndFonts_dylibloader_orig_fontconfig
+#define FcInit FcInit_dylibloader_orig_fontconfig
+#define FcFini FcFini_dylibloader_orig_fontconfig
+#define FcGetVersion FcGetVersion_dylibloader_orig_fontconfig
+#define FcInitReinitialize FcInitReinitialize_dylibloader_orig_fontconfig
+#define FcInitBringUptoDate FcInitBringUptoDate_dylibloader_orig_fontconfig
+#define FcGetLangs FcGetLangs_dylibloader_orig_fontconfig
+#define FcLangNormalize FcLangNormalize_dylibloader_orig_fontconfig
+#define FcLangGetCharSet FcLangGetCharSet_dylibloader_orig_fontconfig
+#define FcLangSetCreate FcLangSetCreate_dylibloader_orig_fontconfig
+#define FcLangSetDestroy FcLangSetDestroy_dylibloader_orig_fontconfig
+#define FcLangSetCopy FcLangSetCopy_dylibloader_orig_fontconfig
+#define FcLangSetAdd FcLangSetAdd_dylibloader_orig_fontconfig
+#define FcLangSetDel FcLangSetDel_dylibloader_orig_fontconfig
+#define FcLangSetHasLang FcLangSetHasLang_dylibloader_orig_fontconfig
+#define FcLangSetCompare FcLangSetCompare_dylibloader_orig_fontconfig
+#define FcLangSetContains FcLangSetContains_dylibloader_orig_fontconfig
+#define FcLangSetEqual FcLangSetEqual_dylibloader_orig_fontconfig
+#define FcLangSetHash FcLangSetHash_dylibloader_orig_fontconfig
+#define FcLangSetGetLangs FcLangSetGetLangs_dylibloader_orig_fontconfig
+#define FcLangSetUnion FcLangSetUnion_dylibloader_orig_fontconfig
+#define FcLangSetSubtract FcLangSetSubtract_dylibloader_orig_fontconfig
+#define FcObjectSetCreate FcObjectSetCreate_dylibloader_orig_fontconfig
+#define FcObjectSetAdd FcObjectSetAdd_dylibloader_orig_fontconfig
+#define FcObjectSetDestroy FcObjectSetDestroy_dylibloader_orig_fontconfig
+#define FcObjectSetVaBuild FcObjectSetVaBuild_dylibloader_orig_fontconfig
+#define FcObjectSetBuild FcObjectSetBuild_dylibloader_orig_fontconfig
+#define FcFontSetList FcFontSetList_dylibloader_orig_fontconfig
+#define FcFontList FcFontList_dylibloader_orig_fontconfig
+#define FcAtomicCreate FcAtomicCreate_dylibloader_orig_fontconfig
+#define FcAtomicLock FcAtomicLock_dylibloader_orig_fontconfig
+#define FcAtomicNewFile FcAtomicNewFile_dylibloader_orig_fontconfig
+#define FcAtomicOrigFile FcAtomicOrigFile_dylibloader_orig_fontconfig
+#define FcAtomicReplaceOrig FcAtomicReplaceOrig_dylibloader_orig_fontconfig
+#define FcAtomicDeleteNew FcAtomicDeleteNew_dylibloader_orig_fontconfig
+#define FcAtomicUnlock FcAtomicUnlock_dylibloader_orig_fontconfig
+#define FcAtomicDestroy FcAtomicDestroy_dylibloader_orig_fontconfig
+#define FcFontSetMatch FcFontSetMatch_dylibloader_orig_fontconfig
+#define FcFontMatch FcFontMatch_dylibloader_orig_fontconfig
+#define FcFontRenderPrepare FcFontRenderPrepare_dylibloader_orig_fontconfig
+#define FcFontSetSort FcFontSetSort_dylibloader_orig_fontconfig
+#define FcFontSort FcFontSort_dylibloader_orig_fontconfig
+#define FcFontSetSortDestroy FcFontSetSortDestroy_dylibloader_orig_fontconfig
+#define FcMatrixCopy FcMatrixCopy_dylibloader_orig_fontconfig
+#define FcMatrixEqual FcMatrixEqual_dylibloader_orig_fontconfig
+#define FcMatrixMultiply FcMatrixMultiply_dylibloader_orig_fontconfig
+#define FcMatrixRotate FcMatrixRotate_dylibloader_orig_fontconfig
+#define FcMatrixScale FcMatrixScale_dylibloader_orig_fontconfig
+#define FcMatrixShear FcMatrixShear_dylibloader_orig_fontconfig
+#define FcNameRegisterObjectTypes FcNameRegisterObjectTypes_dylibloader_orig_fontconfig
+#define FcNameUnregisterObjectTypes FcNameUnregisterObjectTypes_dylibloader_orig_fontconfig
+#define FcNameGetObjectType FcNameGetObjectType_dylibloader_orig_fontconfig
+#define FcNameRegisterConstants FcNameRegisterConstants_dylibloader_orig_fontconfig
+#define FcNameUnregisterConstants FcNameUnregisterConstants_dylibloader_orig_fontconfig
+#define FcNameGetConstant FcNameGetConstant_dylibloader_orig_fontconfig
+#define FcNameConstant FcNameConstant_dylibloader_orig_fontconfig
+#define FcNameParse FcNameParse_dylibloader_orig_fontconfig
+#define FcNameUnparse FcNameUnparse_dylibloader_orig_fontconfig
+#define FcPatternCreate FcPatternCreate_dylibloader_orig_fontconfig
+#define FcPatternDuplicate FcPatternDuplicate_dylibloader_orig_fontconfig
+#define FcPatternReference FcPatternReference_dylibloader_orig_fontconfig
+#define FcPatternFilter FcPatternFilter_dylibloader_orig_fontconfig
+#define FcValueDestroy FcValueDestroy_dylibloader_orig_fontconfig
+#define FcValueEqual FcValueEqual_dylibloader_orig_fontconfig
+#define FcValueSave FcValueSave_dylibloader_orig_fontconfig
+#define FcPatternDestroy FcPatternDestroy_dylibloader_orig_fontconfig
+#define FcPatternEqual FcPatternEqual_dylibloader_orig_fontconfig
+#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_orig_fontconfig
+#define FcPatternHash FcPatternHash_dylibloader_orig_fontconfig
+#define FcPatternAdd FcPatternAdd_dylibloader_orig_fontconfig
+#define FcPatternAddWeak FcPatternAddWeak_dylibloader_orig_fontconfig
+#define FcPatternGet FcPatternGet_dylibloader_orig_fontconfig
+#define FcPatternGetWithBinding FcPatternGetWithBinding_dylibloader_orig_fontconfig
+#define FcPatternDel FcPatternDel_dylibloader_orig_fontconfig
+#define FcPatternRemove FcPatternRemove_dylibloader_orig_fontconfig
+#define FcPatternAddInteger FcPatternAddInteger_dylibloader_orig_fontconfig
+#define FcPatternAddDouble FcPatternAddDouble_dylibloader_orig_fontconfig
+#define FcPatternAddString FcPatternAddString_dylibloader_orig_fontconfig
+#define FcPatternAddMatrix FcPatternAddMatrix_dylibloader_orig_fontconfig
+#define FcPatternAddCharSet FcPatternAddCharSet_dylibloader_orig_fontconfig
+#define FcPatternAddBool FcPatternAddBool_dylibloader_orig_fontconfig
+#define FcPatternAddLangSet FcPatternAddLangSet_dylibloader_orig_fontconfig
+#define FcPatternAddRange FcPatternAddRange_dylibloader_orig_fontconfig
+#define FcPatternGetInteger FcPatternGetInteger_dylibloader_orig_fontconfig
+#define FcPatternGetDouble FcPatternGetDouble_dylibloader_orig_fontconfig
+#define FcPatternGetString FcPatternGetString_dylibloader_orig_fontconfig
+#define FcPatternGetMatrix FcPatternGetMatrix_dylibloader_orig_fontconfig
+#define FcPatternGetCharSet FcPatternGetCharSet_dylibloader_orig_fontconfig
+#define FcPatternGetBool FcPatternGetBool_dylibloader_orig_fontconfig
+#define FcPatternGetLangSet FcPatternGetLangSet_dylibloader_orig_fontconfig
+#define FcPatternGetRange FcPatternGetRange_dylibloader_orig_fontconfig
+#define FcPatternVaBuild FcPatternVaBuild_dylibloader_orig_fontconfig
+#define FcPatternBuild FcPatternBuild_dylibloader_orig_fontconfig
+#define FcPatternFormat FcPatternFormat_dylibloader_orig_fontconfig
+#define FcRangeCreateDouble FcRangeCreateDouble_dylibloader_orig_fontconfig
+#define FcRangeCreateInteger FcRangeCreateInteger_dylibloader_orig_fontconfig
+#define FcRangeDestroy FcRangeDestroy_dylibloader_orig_fontconfig
+#define FcRangeCopy FcRangeCopy_dylibloader_orig_fontconfig
+#define FcRangeGetDouble FcRangeGetDouble_dylibloader_orig_fontconfig
+#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_orig_fontconfig
+#define FcWeightToOpenType FcWeightToOpenType_dylibloader_orig_fontconfig
+#define FcStrCopy FcStrCopy_dylibloader_orig_fontconfig
+#define FcStrCopyFilename FcStrCopyFilename_dylibloader_orig_fontconfig
+#define FcStrPlus FcStrPlus_dylibloader_orig_fontconfig
+#define FcStrFree FcStrFree_dylibloader_orig_fontconfig
+#define FcStrDowncase FcStrDowncase_dylibloader_orig_fontconfig
+#define FcStrCmpIgnoreCase FcStrCmpIgnoreCase_dylibloader_orig_fontconfig
+#define FcStrCmp FcStrCmp_dylibloader_orig_fontconfig
+#define FcStrStrIgnoreCase FcStrStrIgnoreCase_dylibloader_orig_fontconfig
+#define FcStrStr FcStrStr_dylibloader_orig_fontconfig
+#define FcUtf8ToUcs4 FcUtf8ToUcs4_dylibloader_orig_fontconfig
+#define FcUtf8Len FcUtf8Len_dylibloader_orig_fontconfig
+#define FcUcs4ToUtf8 FcUcs4ToUtf8_dylibloader_orig_fontconfig
+#define FcUtf16ToUcs4 FcUtf16ToUcs4_dylibloader_orig_fontconfig
+#define FcUtf16Len FcUtf16Len_dylibloader_orig_fontconfig
+#define FcStrDirname FcStrDirname_dylibloader_orig_fontconfig
+#define FcStrBasename FcStrBasename_dylibloader_orig_fontconfig
+#define FcStrSetCreate FcStrSetCreate_dylibloader_orig_fontconfig
+#define FcStrSetMember FcStrSetMember_dylibloader_orig_fontconfig
+#define FcStrSetEqual FcStrSetEqual_dylibloader_orig_fontconfig
+#define FcStrSetAdd FcStrSetAdd_dylibloader_orig_fontconfig
+#define FcStrSetAddFilename FcStrSetAddFilename_dylibloader_orig_fontconfig
+#define FcStrSetDel FcStrSetDel_dylibloader_orig_fontconfig
+#define FcStrSetDestroy FcStrSetDestroy_dylibloader_orig_fontconfig
+#define FcStrListCreate FcStrListCreate_dylibloader_orig_fontconfig
+#define FcStrListFirst FcStrListFirst_dylibloader_orig_fontconfig
+#define FcStrListNext FcStrListNext_dylibloader_orig_fontconfig
+#define FcStrListDone FcStrListDone_dylibloader_orig_fontconfig
+#define FcConfigParseAndLoad FcConfigParseAndLoad_dylibloader_orig_fontconfig
+#define FcConfigParseAndLoadFromMemory FcConfigParseAndLoadFromMemory_dylibloader_orig_fontconfig
+#include <fontconfig/fontconfig.h>
+#undef FcBlanksCreate
+#undef FcBlanksDestroy
+#undef FcBlanksAdd
+#undef FcBlanksIsMember
+#undef FcCacheDir
+#undef FcCacheCopySet
+#undef FcCacheSubdir
+#undef FcCacheNumSubdir
+#undef FcCacheNumFont
+#undef FcDirCacheUnlink
+#undef FcDirCacheValid
+#undef FcDirCacheClean
+#undef FcCacheCreateTagFile
+#undef FcConfigHome
+#undef FcConfigEnableHome
+#undef FcConfigFilename
+#undef FcConfigCreate
+#undef FcConfigReference
+#undef FcConfigDestroy
+#undef FcConfigSetCurrent
+#undef FcConfigGetCurrent
+#undef FcConfigUptoDate
+#undef FcConfigBuildFonts
+#undef FcConfigGetFontDirs
+#undef FcConfigGetConfigDirs
+#undef FcConfigGetConfigFiles
+#undef FcConfigGetCache
+#undef FcConfigGetBlanks
+#undef FcConfigGetCacheDirs
+#undef FcConfigGetRescanInterval
+#undef FcConfigSetRescanInterval
+#undef FcConfigGetFonts
+#undef FcConfigAppFontAddFile
+#undef FcConfigAppFontAddDir
+#undef FcConfigAppFontClear
+#undef FcConfigSubstituteWithPat
+#undef FcConfigSubstitute
+#undef FcConfigGetSysRoot
+#undef FcConfigSetSysRoot
+#undef FcValuePrint
+#undef FcPatternPrint
+#undef FcFontSetPrint
+#undef FcGetDefaultLangs
+#undef FcDefaultSubstitute
+#undef FcFileIsDir
+#undef FcFileScan
+#undef FcDirScan
+#undef FcDirSave
+#undef FcDirCacheLoad
+#undef FcDirCacheRescan
+#undef FcDirCacheRead
+#undef FcDirCacheLoadFile
+#undef FcDirCacheUnload
+#undef FcFreeTypeQuery
+#undef FcFontSetCreate
+#undef FcFontSetDestroy
+#undef FcFontSetAdd
+#undef FcInitLoadConfig
+#undef FcInitLoadConfigAndFonts
+#undef FcInit
+#undef FcFini
+#undef FcGetVersion
+#undef FcInitReinitialize
+#undef FcInitBringUptoDate
+#undef FcGetLangs
+#undef FcLangNormalize
+#undef FcLangGetCharSet
+#undef FcLangSetCreate
+#undef FcLangSetDestroy
+#undef FcLangSetCopy
+#undef FcLangSetAdd
+#undef FcLangSetDel
+#undef FcLangSetHasLang
+#undef FcLangSetCompare
+#undef FcLangSetContains
+#undef FcLangSetEqual
+#undef FcLangSetHash
+#undef FcLangSetGetLangs
+#undef FcLangSetUnion
+#undef FcLangSetSubtract
+#undef FcObjectSetCreate
+#undef FcObjectSetAdd
+#undef FcObjectSetDestroy
+#undef FcObjectSetVaBuild
+#undef FcObjectSetBuild
+#undef FcFontSetList
+#undef FcFontList
+#undef FcAtomicCreate
+#undef FcAtomicLock
+#undef FcAtomicNewFile
+#undef FcAtomicOrigFile
+#undef FcAtomicReplaceOrig
+#undef FcAtomicDeleteNew
+#undef FcAtomicUnlock
+#undef FcAtomicDestroy
+#undef FcFontSetMatch
+#undef FcFontMatch
+#undef FcFontRenderPrepare
+#undef FcFontSetSort
+#undef FcFontSort
+#undef FcFontSetSortDestroy
+#undef FcMatrixCopy
+#undef FcMatrixEqual
+#undef FcMatrixMultiply
+#undef FcMatrixRotate
+#undef FcMatrixScale
+#undef FcMatrixShear
+#undef FcNameRegisterObjectTypes
+#undef FcNameUnregisterObjectTypes
+#undef FcNameGetObjectType
+#undef FcNameRegisterConstants
+#undef FcNameUnregisterConstants
+#undef FcNameGetConstant
+#undef FcNameConstant
+#undef FcNameParse
+#undef FcNameUnparse
+#undef FcPatternCreate
+#undef FcPatternDuplicate
+#undef FcPatternReference
+#undef FcPatternFilter
+#undef FcValueDestroy
+#undef FcValueEqual
+#undef FcValueSave
+#undef FcPatternDestroy
+#undef FcPatternEqual
+#undef FcPatternEqualSubset
+#undef FcPatternHash
+#undef FcPatternAdd
+#undef FcPatternAddWeak
+#undef FcPatternGet
+#undef FcPatternGetWithBinding
+#undef FcPatternDel
+#undef FcPatternRemove
+#undef FcPatternAddInteger
+#undef FcPatternAddDouble
+#undef FcPatternAddString
+#undef FcPatternAddMatrix
+#undef FcPatternAddCharSet
+#undef FcPatternAddBool
+#undef FcPatternAddLangSet
+#undef FcPatternAddRange
+#undef FcPatternGetInteger
+#undef FcPatternGetDouble
+#undef FcPatternGetString
+#undef FcPatternGetMatrix
+#undef FcPatternGetCharSet
+#undef FcPatternGetBool
+#undef FcPatternGetLangSet
+#undef FcPatternGetRange
+#undef FcPatternVaBuild
+#undef FcPatternBuild
+#undef FcPatternFormat
+#undef FcRangeCreateDouble
+#undef FcRangeCreateInteger
+#undef FcRangeDestroy
+#undef FcRangeCopy
+#undef FcRangeGetDouble
+#undef FcWeightFromOpenType
+#undef FcWeightToOpenType
+#undef FcStrCopy
+#undef FcStrCopyFilename
+#undef FcStrPlus
+#undef FcStrFree
+#undef FcStrDowncase
+#undef FcStrCmpIgnoreCase
+#undef FcStrCmp
+#undef FcStrStrIgnoreCase
+#undef FcStrStr
+#undef FcUtf8ToUcs4
+#undef FcUtf8Len
+#undef FcUcs4ToUtf8
+#undef FcUtf16ToUcs4
+#undef FcUtf16Len
+#undef FcStrDirname
+#undef FcStrBasename
+#undef FcStrSetCreate
+#undef FcStrSetMember
+#undef FcStrSetEqual
+#undef FcStrSetAdd
+#undef FcStrSetAddFilename
+#undef FcStrSetDel
+#undef FcStrSetDestroy
+#undef FcStrListCreate
+#undef FcStrListFirst
+#undef FcStrListNext
+#undef FcStrListDone
+#undef FcConfigParseAndLoad
+#undef FcConfigParseAndLoadFromMemory
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define FcBlanksCreate FcBlanksCreate_dylibloader_wrapper_fontconfig
+#define FcBlanksDestroy FcBlanksDestroy_dylibloader_wrapper_fontconfig
+#define FcBlanksAdd FcBlanksAdd_dylibloader_wrapper_fontconfig
+#define FcBlanksIsMember FcBlanksIsMember_dylibloader_wrapper_fontconfig
+#define FcCacheDir FcCacheDir_dylibloader_wrapper_fontconfig
+#define FcCacheCopySet FcCacheCopySet_dylibloader_wrapper_fontconfig
+#define FcCacheSubdir FcCacheSubdir_dylibloader_wrapper_fontconfig
+#define FcCacheNumSubdir FcCacheNumSubdir_dylibloader_wrapper_fontconfig
+#define FcCacheNumFont FcCacheNumFont_dylibloader_wrapper_fontconfig
+#define FcDirCacheUnlink FcDirCacheUnlink_dylibloader_wrapper_fontconfig
+#define FcDirCacheValid FcDirCacheValid_dylibloader_wrapper_fontconfig
+#define FcDirCacheClean FcDirCacheClean_dylibloader_wrapper_fontconfig
+#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_wrapper_fontconfig
+#define FcConfigHome FcConfigHome_dylibloader_wrapper_fontconfig
+#define FcConfigEnableHome FcConfigEnableHome_dylibloader_wrapper_fontconfig
+#define FcConfigFilename FcConfigFilename_dylibloader_wrapper_fontconfig
+#define FcConfigCreate FcConfigCreate_dylibloader_wrapper_fontconfig
+#define FcConfigReference FcConfigReference_dylibloader_wrapper_fontconfig
+#define FcConfigDestroy FcConfigDestroy_dylibloader_wrapper_fontconfig
+#define FcConfigSetCurrent FcConfigSetCurrent_dylibloader_wrapper_fontconfig
+#define FcConfigGetCurrent FcConfigGetCurrent_dylibloader_wrapper_fontconfig
+#define FcConfigUptoDate FcConfigUptoDate_dylibloader_wrapper_fontconfig
+#define FcConfigBuildFonts FcConfigBuildFonts_dylibloader_wrapper_fontconfig
+#define FcConfigGetFontDirs FcConfigGetFontDirs_dylibloader_wrapper_fontconfig
+#define FcConfigGetConfigDirs FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig
+#define FcConfigGetConfigFiles FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig
+#define FcConfigGetCache FcConfigGetCache_dylibloader_wrapper_fontconfig
+#define FcConfigGetBlanks FcConfigGetBlanks_dylibloader_wrapper_fontconfig
+#define FcConfigGetCacheDirs FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig
+#define FcConfigGetRescanInterval FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig
+#define FcConfigSetRescanInterval FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig
+#define FcConfigGetFonts FcConfigGetFonts_dylibloader_wrapper_fontconfig
+#define FcConfigAppFontAddFile FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig
+#define FcConfigAppFontAddDir FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig
+#define FcConfigAppFontClear FcConfigAppFontClear_dylibloader_wrapper_fontconfig
+#define FcConfigSubstituteWithPat FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig
+#define FcConfigSubstitute FcConfigSubstitute_dylibloader_wrapper_fontconfig
+#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_wrapper_fontconfig
+#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_wrapper_fontconfig
+#define FcValuePrint FcValuePrint_dylibloader_wrapper_fontconfig
+#define FcPatternPrint FcPatternPrint_dylibloader_wrapper_fontconfig
+#define FcFontSetPrint FcFontSetPrint_dylibloader_wrapper_fontconfig
+#define FcGetDefaultLangs FcGetDefaultLangs_dylibloader_wrapper_fontconfig
+#define FcDefaultSubstitute FcDefaultSubstitute_dylibloader_wrapper_fontconfig
+#define FcFileIsDir FcFileIsDir_dylibloader_wrapper_fontconfig
+#define FcFileScan FcFileScan_dylibloader_wrapper_fontconfig
+#define FcDirScan FcDirScan_dylibloader_wrapper_fontconfig
+#define FcDirSave FcDirSave_dylibloader_wrapper_fontconfig
+#define FcDirCacheLoad FcDirCacheLoad_dylibloader_wrapper_fontconfig
+#define FcDirCacheRescan FcDirCacheRescan_dylibloader_wrapper_fontconfig
+#define FcDirCacheRead FcDirCacheRead_dylibloader_wrapper_fontconfig
+#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_wrapper_fontconfig
+#define FcDirCacheUnload FcDirCacheUnload_dylibloader_wrapper_fontconfig
+#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_wrapper_fontconfig
+#define FcFontSetCreate FcFontSetCreate_dylibloader_wrapper_fontconfig
+#define FcFontSetDestroy FcFontSetDestroy_dylibloader_wrapper_fontconfig
+#define FcFontSetAdd FcFontSetAdd_dylibloader_wrapper_fontconfig
+#define FcInitLoadConfig FcInitLoadConfig_dylibloader_wrapper_fontconfig
+#define FcInitLoadConfigAndFonts FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig
+#define FcInit FcInit_dylibloader_wrapper_fontconfig
+#define FcFini FcFini_dylibloader_wrapper_fontconfig
+#define FcGetVersion FcGetVersion_dylibloader_wrapper_fontconfig
+#define FcInitReinitialize FcInitReinitialize_dylibloader_wrapper_fontconfig
+#define FcInitBringUptoDate FcInitBringUptoDate_dylibloader_wrapper_fontconfig
+#define FcGetLangs FcGetLangs_dylibloader_wrapper_fontconfig
+#define FcLangNormalize FcLangNormalize_dylibloader_wrapper_fontconfig
+#define FcLangGetCharSet FcLangGetCharSet_dylibloader_wrapper_fontconfig
+#define FcLangSetCreate FcLangSetCreate_dylibloader_wrapper_fontconfig
+#define FcLangSetDestroy FcLangSetDestroy_dylibloader_wrapper_fontconfig
+#define FcLangSetCopy FcLangSetCopy_dylibloader_wrapper_fontconfig
+#define FcLangSetAdd FcLangSetAdd_dylibloader_wrapper_fontconfig
+#define FcLangSetDel FcLangSetDel_dylibloader_wrapper_fontconfig
+#define FcLangSetHasLang FcLangSetHasLang_dylibloader_wrapper_fontconfig
+#define FcLangSetCompare FcLangSetCompare_dylibloader_wrapper_fontconfig
+#define FcLangSetContains FcLangSetContains_dylibloader_wrapper_fontconfig
+#define FcLangSetEqual FcLangSetEqual_dylibloader_wrapper_fontconfig
+#define FcLangSetHash FcLangSetHash_dylibloader_wrapper_fontconfig
+#define FcLangSetGetLangs FcLangSetGetLangs_dylibloader_wrapper_fontconfig
+#define FcLangSetUnion FcLangSetUnion_dylibloader_wrapper_fontconfig
+#define FcLangSetSubtract FcLangSetSubtract_dylibloader_wrapper_fontconfig
+#define FcObjectSetCreate FcObjectSetCreate_dylibloader_wrapper_fontconfig
+#define FcObjectSetAdd FcObjectSetAdd_dylibloader_wrapper_fontconfig
+#define FcObjectSetDestroy FcObjectSetDestroy_dylibloader_wrapper_fontconfig
+#define FcObjectSetVaBuild FcObjectSetVaBuild_dylibloader_wrapper_fontconfig
+#define FcObjectSetBuild FcObjectSetBuild_dylibloader_wrapper_fontconfig
+#define FcFontSetList FcFontSetList_dylibloader_wrapper_fontconfig
+#define FcFontList FcFontList_dylibloader_wrapper_fontconfig
+#define FcAtomicCreate FcAtomicCreate_dylibloader_wrapper_fontconfig
+#define FcAtomicLock FcAtomicLock_dylibloader_wrapper_fontconfig
+#define FcAtomicNewFile FcAtomicNewFile_dylibloader_wrapper_fontconfig
+#define FcAtomicOrigFile FcAtomicOrigFile_dylibloader_wrapper_fontconfig
+#define FcAtomicReplaceOrig FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig
+#define FcAtomicDeleteNew FcAtomicDeleteNew_dylibloader_wrapper_fontconfig
+#define FcAtomicUnlock FcAtomicUnlock_dylibloader_wrapper_fontconfig
+#define FcAtomicDestroy FcAtomicDestroy_dylibloader_wrapper_fontconfig
+#define FcFontSetMatch FcFontSetMatch_dylibloader_wrapper_fontconfig
+#define FcFontMatch FcFontMatch_dylibloader_wrapper_fontconfig
+#define FcFontRenderPrepare FcFontRenderPrepare_dylibloader_wrapper_fontconfig
+#define FcFontSetSort FcFontSetSort_dylibloader_wrapper_fontconfig
+#define FcFontSort FcFontSort_dylibloader_wrapper_fontconfig
+#define FcFontSetSortDestroy FcFontSetSortDestroy_dylibloader_wrapper_fontconfig
+#define FcMatrixCopy FcMatrixCopy_dylibloader_wrapper_fontconfig
+#define FcMatrixEqual FcMatrixEqual_dylibloader_wrapper_fontconfig
+#define FcMatrixMultiply FcMatrixMultiply_dylibloader_wrapper_fontconfig
+#define FcMatrixRotate FcMatrixRotate_dylibloader_wrapper_fontconfig
+#define FcMatrixScale FcMatrixScale_dylibloader_wrapper_fontconfig
+#define FcMatrixShear FcMatrixShear_dylibloader_wrapper_fontconfig
+#define FcNameRegisterObjectTypes FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig
+#define FcNameUnregisterObjectTypes FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig
+#define FcNameGetObjectType FcNameGetObjectType_dylibloader_wrapper_fontconfig
+#define FcNameRegisterConstants FcNameRegisterConstants_dylibloader_wrapper_fontconfig
+#define FcNameUnregisterConstants FcNameUnregisterConstants_dylibloader_wrapper_fontconfig
+#define FcNameGetConstant FcNameGetConstant_dylibloader_wrapper_fontconfig
+#define FcNameConstant FcNameConstant_dylibloader_wrapper_fontconfig
+#define FcNameParse FcNameParse_dylibloader_wrapper_fontconfig
+#define FcNameUnparse FcNameUnparse_dylibloader_wrapper_fontconfig
+#define FcPatternCreate FcPatternCreate_dylibloader_wrapper_fontconfig
+#define FcPatternDuplicate FcPatternDuplicate_dylibloader_wrapper_fontconfig
+#define FcPatternReference FcPatternReference_dylibloader_wrapper_fontconfig
+#define FcPatternFilter FcPatternFilter_dylibloader_wrapper_fontconfig
+#define FcValueDestroy FcValueDestroy_dylibloader_wrapper_fontconfig
+#define FcValueEqual FcValueEqual_dylibloader_wrapper_fontconfig
+#define FcValueSave FcValueSave_dylibloader_wrapper_fontconfig
+#define FcPatternDestroy FcPatternDestroy_dylibloader_wrapper_fontconfig
+#define FcPatternEqual FcPatternEqual_dylibloader_wrapper_fontconfig
+#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_wrapper_fontconfig
+#define FcPatternHash FcPatternHash_dylibloader_wrapper_fontconfig
+#define FcPatternAdd FcPatternAdd_dylibloader_wrapper_fontconfig
+#define FcPatternAddWeak FcPatternAddWeak_dylibloader_wrapper_fontconfig
+#define FcPatternGet FcPatternGet_dylibloader_wrapper_fontconfig
+#define FcPatternGetWithBinding FcPatternGetWithBinding_dylibloader_wrapper_fontconfig
+#define FcPatternDel FcPatternDel_dylibloader_wrapper_fontconfig
+#define FcPatternRemove FcPatternRemove_dylibloader_wrapper_fontconfig
+#define FcPatternAddInteger FcPatternAddInteger_dylibloader_wrapper_fontconfig
+#define FcPatternAddDouble FcPatternAddDouble_dylibloader_wrapper_fontconfig
+#define FcPatternAddString FcPatternAddString_dylibloader_wrapper_fontconfig
+#define FcPatternAddMatrix FcPatternAddMatrix_dylibloader_wrapper_fontconfig
+#define FcPatternAddCharSet FcPatternAddCharSet_dylibloader_wrapper_fontconfig
+#define FcPatternAddBool FcPatternAddBool_dylibloader_wrapper_fontconfig
+#define FcPatternAddLangSet FcPatternAddLangSet_dylibloader_wrapper_fontconfig
+#define FcPatternAddRange FcPatternAddRange_dylibloader_wrapper_fontconfig
+#define FcPatternGetInteger FcPatternGetInteger_dylibloader_wrapper_fontconfig
+#define FcPatternGetDouble FcPatternGetDouble_dylibloader_wrapper_fontconfig
+#define FcPatternGetString FcPatternGetString_dylibloader_wrapper_fontconfig
+#define FcPatternGetMatrix FcPatternGetMatrix_dylibloader_wrapper_fontconfig
+#define FcPatternGetCharSet FcPatternGetCharSet_dylibloader_wrapper_fontconfig
+#define FcPatternGetBool FcPatternGetBool_dylibloader_wrapper_fontconfig
+#define FcPatternGetLangSet FcPatternGetLangSet_dylibloader_wrapper_fontconfig
+#define FcPatternGetRange FcPatternGetRange_dylibloader_wrapper_fontconfig
+#define FcPatternVaBuild FcPatternVaBuild_dylibloader_wrapper_fontconfig
+#define FcPatternBuild FcPatternBuild_dylibloader_wrapper_fontconfig
+#define FcPatternFormat FcPatternFormat_dylibloader_wrapper_fontconfig
+#define FcRangeCreateDouble FcRangeCreateDouble_dylibloader_wrapper_fontconfig
+#define FcRangeCreateInteger FcRangeCreateInteger_dylibloader_wrapper_fontconfig
+#define FcRangeDestroy FcRangeDestroy_dylibloader_wrapper_fontconfig
+#define FcRangeCopy FcRangeCopy_dylibloader_wrapper_fontconfig
+#define FcRangeGetDouble FcRangeGetDouble_dylibloader_wrapper_fontconfig
+#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_wrapper_fontconfig
+#define FcWeightToOpenType FcWeightToOpenType_dylibloader_wrapper_fontconfig
+#define FcStrCopy FcStrCopy_dylibloader_wrapper_fontconfig
+#define FcStrCopyFilename FcStrCopyFilename_dylibloader_wrapper_fontconfig
+#define FcStrPlus FcStrPlus_dylibloader_wrapper_fontconfig
+#define FcStrFree FcStrFree_dylibloader_wrapper_fontconfig
+#define FcStrDowncase FcStrDowncase_dylibloader_wrapper_fontconfig
+#define FcStrCmpIgnoreCase FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig
+#define FcStrCmp FcStrCmp_dylibloader_wrapper_fontconfig
+#define FcStrStrIgnoreCase FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig
+#define FcStrStr FcStrStr_dylibloader_wrapper_fontconfig
+#define FcUtf8ToUcs4 FcUtf8ToUcs4_dylibloader_wrapper_fontconfig
+#define FcUtf8Len FcUtf8Len_dylibloader_wrapper_fontconfig
+#define FcUcs4ToUtf8 FcUcs4ToUtf8_dylibloader_wrapper_fontconfig
+#define FcUtf16ToUcs4 FcUtf16ToUcs4_dylibloader_wrapper_fontconfig
+#define FcUtf16Len FcUtf16Len_dylibloader_wrapper_fontconfig
+#define FcStrDirname FcStrDirname_dylibloader_wrapper_fontconfig
+#define FcStrBasename FcStrBasename_dylibloader_wrapper_fontconfig
+#define FcStrSetCreate FcStrSetCreate_dylibloader_wrapper_fontconfig
+#define FcStrSetMember FcStrSetMember_dylibloader_wrapper_fontconfig
+#define FcStrSetEqual FcStrSetEqual_dylibloader_wrapper_fontconfig
+#define FcStrSetAdd FcStrSetAdd_dylibloader_wrapper_fontconfig
+#define FcStrSetAddFilename FcStrSetAddFilename_dylibloader_wrapper_fontconfig
+#define FcStrSetDel FcStrSetDel_dylibloader_wrapper_fontconfig
+#define FcStrSetDestroy FcStrSetDestroy_dylibloader_wrapper_fontconfig
+#define FcStrListCreate FcStrListCreate_dylibloader_wrapper_fontconfig
+#define FcStrListFirst FcStrListFirst_dylibloader_wrapper_fontconfig
+#define FcStrListNext FcStrListNext_dylibloader_wrapper_fontconfig
+#define FcStrListDone FcStrListDone_dylibloader_wrapper_fontconfig
+#define FcConfigParseAndLoad FcConfigParseAndLoad_dylibloader_wrapper_fontconfig
+#define FcConfigParseAndLoadFromMemory FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig
+extern FcBlanks* (*FcBlanksCreate_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcBlanksDestroy_dylibloader_wrapper_fontconfig)( FcBlanks*);
+extern FcBool (*FcBlanksAdd_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
+extern FcBool (*FcBlanksIsMember_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
+extern const FcChar8* (*FcCacheDir_dylibloader_wrapper_fontconfig)(const FcCache*);
+extern FcFontSet* (*FcCacheCopySet_dylibloader_wrapper_fontconfig)(const FcCache*);
+extern const FcChar8* (*FcCacheSubdir_dylibloader_wrapper_fontconfig)(const FcCache*, int);
+extern int (*FcCacheNumSubdir_dylibloader_wrapper_fontconfig)(const FcCache*);
+extern int (*FcCacheNumFont_dylibloader_wrapper_fontconfig)(const FcCache*);
+extern FcBool (*FcDirCacheUnlink_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
+extern FcBool (*FcDirCacheValid_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcBool (*FcDirCacheClean_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool);
+extern void (*FcCacheCreateTagFile_dylibloader_wrapper_fontconfig)(const FcConfig*);
+extern FcChar8* (*FcConfigHome_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcConfigEnableHome_dylibloader_wrapper_fontconfig)( FcBool);
+extern FcChar8* (*FcConfigFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcConfig* (*FcConfigCreate_dylibloader_wrapper_fontconfig)( void);
+extern FcConfig* (*FcConfigReference_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern void (*FcConfigDestroy_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcBool (*FcConfigSetCurrent_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcConfig* (*FcConfigGetCurrent_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcConfigUptoDate_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcBool (*FcConfigBuildFonts_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcStrList* (*FcConfigGetFontDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcStrList* (*FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcStrList* (*FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcChar8* (*FcConfigGetCache_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcBlanks* (*FcConfigGetBlanks_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcStrList* (*FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig)(const FcConfig*);
+extern int (*FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcBool (*FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*, int);
+extern FcFontSet* (*FcConfigGetFonts_dylibloader_wrapper_fontconfig)( FcConfig*, FcSetName);
+extern FcBool (*FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+extern FcBool (*FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+extern void (*FcConfigAppFontClear_dylibloader_wrapper_fontconfig)( FcConfig*);
+extern FcBool (*FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*, FcMatchKind);
+extern FcBool (*FcConfigSubstitute_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcMatchKind);
+extern const FcChar8* (*FcConfigGetSysRoot_dylibloader_wrapper_fontconfig)(const FcConfig*);
+extern void (*FcConfigSetSysRoot_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+extern void (*FcValuePrint_dylibloader_wrapper_fontconfig)(const FcValue);
+extern void (*FcPatternPrint_dylibloader_wrapper_fontconfig)(const FcPattern*);
+extern void (*FcFontSetPrint_dylibloader_wrapper_fontconfig)(const FcFontSet*);
+extern FcStrSet* (*FcGetDefaultLangs_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcDefaultSubstitute_dylibloader_wrapper_fontconfig)( FcPattern*);
+extern FcBool (*FcFileIsDir_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcBool (*FcFileScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
+extern FcBool (*FcDirScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
+extern FcBool (*FcDirSave_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*,const FcChar8*);
+extern FcCache* (*FcDirCacheLoad_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*, FcChar8**);
+extern FcCache* (*FcDirCacheRescan_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
+extern FcCache* (*FcDirCacheRead_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool, FcConfig*);
+extern FcCache* (*FcDirCacheLoadFile_dylibloader_wrapper_fontconfig)(const FcChar8*,struct stat*);
+extern void (*FcDirCacheUnload_dylibloader_wrapper_fontconfig)( FcCache*);
+extern FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, int, FcBlanks*, int*);
+extern FcFontSet* (*FcFontSetCreate_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcFontSetDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
+extern FcBool (*FcFontSetAdd_dylibloader_wrapper_fontconfig)( FcFontSet*, FcPattern*);
+extern FcConfig* (*FcInitLoadConfig_dylibloader_wrapper_fontconfig)( void);
+extern FcConfig* (*FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcInit_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcFini_dylibloader_wrapper_fontconfig)( void);
+extern int (*FcGetVersion_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcInitReinitialize_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcInitBringUptoDate_dylibloader_wrapper_fontconfig)( void);
+extern FcStrSet* (*FcGetLangs_dylibloader_wrapper_fontconfig)( void);
+extern FcChar8* (*FcLangNormalize_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern const FcCharSet* (*FcLangGetCharSet_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcLangSet* (*FcLangSetCreate_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcLangSetDestroy_dylibloader_wrapper_fontconfig)( FcLangSet*);
+extern FcLangSet* (*FcLangSetCopy_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+extern FcBool (*FcLangSetAdd_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
+extern FcBool (*FcLangSetDel_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
+extern FcLangResult (*FcLangSetHasLang_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcChar8*);
+extern FcLangResult (*FcLangSetCompare_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+extern FcBool (*FcLangSetContains_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+extern FcBool (*FcLangSetEqual_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+extern FcChar32 (*FcLangSetHash_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+extern FcStrSet* (*FcLangSetGetLangs_dylibloader_wrapper_fontconfig)(const FcLangSet*);
+extern FcLangSet* (*FcLangSetUnion_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+extern FcLangSet* (*FcLangSetSubtract_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
+extern FcObjectSet* (*FcObjectSetCreate_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcObjectSetAdd_dylibloader_wrapper_fontconfig)( FcObjectSet*,const char*);
+extern void (*FcObjectSetDestroy_dylibloader_wrapper_fontconfig)( FcObjectSet*);
+extern FcObjectSet* (*FcObjectSetVaBuild_dylibloader_wrapper_fontconfig)(const char*, va_list);
+extern FcObjectSet* (*FcObjectSetBuild_dylibloader_wrapper_fontconfig)(const char*,...);
+extern FcFontSet* (*FcFontSetList_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcObjectSet*);
+extern FcFontSet* (*FcFontList_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcObjectSet*);
+extern FcAtomic* (*FcAtomicCreate_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcBool (*FcAtomicLock_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern FcChar8* (*FcAtomicNewFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern FcChar8* (*FcAtomicOrigFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern FcBool (*FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern void (*FcAtomicDeleteNew_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern void (*FcAtomicUnlock_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern void (*FcAtomicDestroy_dylibloader_wrapper_fontconfig)( FcAtomic*);
+extern FcPattern* (*FcFontSetMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcResult*);
+extern FcPattern* (*FcFontMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcResult*);
+extern FcPattern* (*FcFontRenderPrepare_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*);
+extern FcFontSet* (*FcFontSetSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcBool, FcCharSet**, FcResult*);
+extern FcFontSet* (*FcFontSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcBool, FcCharSet**, FcResult*);
+extern void (*FcFontSetSortDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
+extern FcMatrix* (*FcMatrixCopy_dylibloader_wrapper_fontconfig)(const FcMatrix*);
+extern FcBool (*FcMatrixEqual_dylibloader_wrapper_fontconfig)(const FcMatrix*,const FcMatrix*);
+extern void (*FcMatrixMultiply_dylibloader_wrapper_fontconfig)( FcMatrix*,const FcMatrix*,const FcMatrix*);
+extern void (*FcMatrixRotate_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+extern void (*FcMatrixScale_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+extern void (*FcMatrixShear_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
+extern FcBool (*FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
+extern FcBool (*FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
+extern const FcObjectType* (*FcNameGetObjectType_dylibloader_wrapper_fontconfig)(const char*);
+extern FcBool (*FcNameRegisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
+extern FcBool (*FcNameUnregisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
+extern const FcConstant* (*FcNameGetConstant_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcBool (*FcNameConstant_dylibloader_wrapper_fontconfig)(const FcChar8*, int*);
+extern FcPattern* (*FcNameParse_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcChar8* (*FcNameUnparse_dylibloader_wrapper_fontconfig)( FcPattern*);
+extern FcPattern* (*FcPatternCreate_dylibloader_wrapper_fontconfig)( void);
+extern FcPattern* (*FcPatternDuplicate_dylibloader_wrapper_fontconfig)(const FcPattern*);
+extern void (*FcPatternReference_dylibloader_wrapper_fontconfig)( FcPattern*);
+extern FcPattern* (*FcPatternFilter_dylibloader_wrapper_fontconfig)( FcPattern*,const FcObjectSet*);
+extern void (*FcValueDestroy_dylibloader_wrapper_fontconfig)( FcValue);
+extern FcBool (*FcValueEqual_dylibloader_wrapper_fontconfig)( FcValue, FcValue);
+extern FcValue (*FcValueSave_dylibloader_wrapper_fontconfig)( FcValue);
+extern void (*FcPatternDestroy_dylibloader_wrapper_fontconfig)( FcPattern*);
+extern FcBool (*FcPatternEqual_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*);
+extern FcBool (*FcPatternEqualSubset_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*,const FcObjectSet*);
+extern FcChar32 (*FcPatternHash_dylibloader_wrapper_fontconfig)(const FcPattern*);
+extern FcBool (*FcPatternAdd_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
+extern FcBool (*FcPatternAddWeak_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
+extern FcResult (*FcPatternGet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*);
+extern FcResult (*FcPatternGetWithBinding_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*, FcValueBinding*);
+extern FcBool (*FcPatternDel_dylibloader_wrapper_fontconfig)( FcPattern*,const char*);
+extern FcBool (*FcPatternRemove_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
+extern FcBool (*FcPatternAddInteger_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
+extern FcBool (*FcPatternAddDouble_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, double);
+extern FcBool (*FcPatternAddString_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcChar8*);
+extern FcBool (*FcPatternAddMatrix_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcMatrix*);
+extern FcBool (*FcPatternAddCharSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcCharSet*);
+extern FcBool (*FcPatternAddBool_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcBool);
+extern FcBool (*FcPatternAddLangSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcLangSet*);
+extern FcBool (*FcPatternAddRange_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcRange*);
+extern FcResult (*FcPatternGetInteger_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, int*);
+extern FcResult (*FcPatternGetDouble_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, double*);
+extern FcResult (*FcPatternGetString_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcChar8**);
+extern FcResult (*FcPatternGetMatrix_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcMatrix**);
+extern FcResult (*FcPatternGetCharSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcCharSet**);
+extern FcResult (*FcPatternGetBool_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcBool*);
+extern FcResult (*FcPatternGetLangSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcLangSet**);
+extern FcResult (*FcPatternGetRange_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcRange**);
+extern FcPattern* (*FcPatternVaBuild_dylibloader_wrapper_fontconfig)( FcPattern*, va_list);
+extern FcPattern* (*FcPatternBuild_dylibloader_wrapper_fontconfig)( FcPattern*,...);
+extern FcChar8* (*FcPatternFormat_dylibloader_wrapper_fontconfig)( FcPattern*,const FcChar8*);
+extern FcRange* (*FcRangeCreateDouble_dylibloader_wrapper_fontconfig)( double, double);
+extern FcRange* (*FcRangeCreateInteger_dylibloader_wrapper_fontconfig)( FcChar32, FcChar32);
+extern void (*FcRangeDestroy_dylibloader_wrapper_fontconfig)( FcRange*);
+extern FcRange* (*FcRangeCopy_dylibloader_wrapper_fontconfig)(const FcRange*);
+extern FcBool (*FcRangeGetDouble_dylibloader_wrapper_fontconfig)(const FcRange*, double*, double*);
+extern int (*FcWeightFromOpenType_dylibloader_wrapper_fontconfig)( int);
+extern int (*FcWeightToOpenType_dylibloader_wrapper_fontconfig)( int);
+extern FcChar8* (*FcStrCopy_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcChar8* (*FcStrCopyFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcChar8* (*FcStrPlus_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+extern void (*FcStrFree_dylibloader_wrapper_fontconfig)( FcChar8*);
+extern FcChar8* (*FcStrDowncase_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern int (*FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+extern int (*FcStrCmp_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+extern const FcChar8* (*FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+extern const FcChar8* (*FcStrStr_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
+extern int (*FcUtf8ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcChar32*, int);
+extern FcBool (*FcUtf8Len_dylibloader_wrapper_fontconfig)(const FcChar8*, int, int*, int*);
+extern int (*FcUcs4ToUtf8_dylibloader_wrapper_fontconfig)( FcChar32, FcChar8 [6]);
+extern int (*FcUtf16ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, FcChar32*, int);
+extern FcBool (*FcUtf16Len_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, int, int*, int*);
+extern FcChar8* (*FcStrDirname_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcChar8* (*FcStrBasename_dylibloader_wrapper_fontconfig)(const FcChar8*);
+extern FcStrSet* (*FcStrSetCreate_dylibloader_wrapper_fontconfig)( void);
+extern FcBool (*FcStrSetMember_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+extern FcBool (*FcStrSetEqual_dylibloader_wrapper_fontconfig)( FcStrSet*, FcStrSet*);
+extern FcBool (*FcStrSetAdd_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+extern FcBool (*FcStrSetAddFilename_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+extern FcBool (*FcStrSetDel_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
+extern void (*FcStrSetDestroy_dylibloader_wrapper_fontconfig)( FcStrSet*);
+extern FcStrList* (*FcStrListCreate_dylibloader_wrapper_fontconfig)( FcStrSet*);
+extern void (*FcStrListFirst_dylibloader_wrapper_fontconfig)( FcStrList*);
+extern FcChar8* (*FcStrListNext_dylibloader_wrapper_fontconfig)( FcStrList*);
+extern void (*FcStrListDone_dylibloader_wrapper_fontconfig)( FcStrList*);
+extern FcBool (*FcConfigParseAndLoad_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
+extern FcBool (*FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
+int initialize_fontconfig(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/freedesktop_screensaver.cpp b/platform/linuxbsd/freedesktop_screensaver.cpp
index 1e93334e40..fa3f7fbfea 100644
--- a/platform/linuxbsd/freedesktop_screensaver.cpp
+++ b/platform/linuxbsd/freedesktop_screensaver.cpp
@@ -34,7 +34,7 @@
#include "core/config/project_settings.h"
-#include <dbus/dbus.h>
+#include "dbus-so_wrap.h"
#define BUS_OBJECT_NAME "org.freedesktop.ScreenSaver"
#define BUS_OBJECT_PATH "/org/freedesktop/ScreenSaver"
@@ -126,4 +126,13 @@ void FreeDesktopScreenSaver::uninhibit() {
dbus_connection_unref(bus);
}
+FreeDesktopScreenSaver::FreeDesktopScreenSaver() {
+#ifdef DEBUG_ENABLED
+ int dylibloader_verbose = 1;
+#else
+ int dylibloader_verbose = 0;
+#endif
+ unsupported = (initialize_dbus(dylibloader_verbose) != 0);
+}
+
#endif // DBUS_ENABLED
diff --git a/platform/linuxbsd/freedesktop_screensaver.h b/platform/linuxbsd/freedesktop_screensaver.h
index 1b632b9103..1a8b010cd5 100644
--- a/platform/linuxbsd/freedesktop_screensaver.h
+++ b/platform/linuxbsd/freedesktop_screensaver.h
@@ -33,7 +33,6 @@
#ifdef DBUS_ENABLED
-#include <dbus/dbus.h>
#include <stdint.h>
class FreeDesktopScreenSaver {
@@ -42,7 +41,7 @@ private:
bool unsupported = false;
public:
- FreeDesktopScreenSaver() {}
+ FreeDesktopScreenSaver();
void inhibit();
void uninhibit();
};
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp
index b73d4dc626..e306c1054b 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -52,6 +52,10 @@
#include <sys/types.h>
#include <unistd.h>
+#ifdef FONTCONFIG_ENABLED
+#include "fontconfig-so_wrap.h"
+#endif
+
void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
const char *message_programs[] = { "zenity", "kdialog", "Xdialog", "xmessage" };
@@ -327,6 +331,98 @@ uint64_t OS_LinuxBSD::get_embedded_pck_offset() const {
return off;
}
+Vector<String> OS_LinuxBSD::get_system_fonts() const {
+#ifdef FONTCONFIG_ENABLED
+ if (!font_config_initialized) {
+ ERR_FAIL_V_MSG(Vector<String>(), "Unable to load fontconfig, system font support is disabled.");
+ }
+ HashSet<String> font_names;
+ Vector<String> ret;
+
+ FcConfig *config = FcInitLoadConfigAndFonts();
+ ERR_FAIL_COND_V(!config, ret);
+
+ FcObjectSet *object_set = FcObjectSetBuild(FC_FAMILY, nullptr);
+ ERR_FAIL_COND_V(!object_set, ret);
+
+ static const char *allowed_formats[] = { "TrueType", "CFF" };
+ for (size_t i = 0; i < sizeof(allowed_formats) / sizeof(const char *); i++) {
+ FcPattern *pattern = FcPatternCreate();
+ ERR_CONTINUE(!pattern);
+
+ FcPatternAddBool(pattern, FC_SCALABLE, FcTrue);
+ FcPatternAddString(pattern, FC_FONTFORMAT, reinterpret_cast<const FcChar8 *>(allowed_formats[i]));
+
+ FcFontSet *font_set = FcFontList(config, pattern, object_set);
+ if (font_set) {
+ for (int j = 0; j < font_set->nfont; j++) {
+ char *family_name = nullptr;
+ if (FcPatternGetString(font_set->fonts[j], FC_FAMILY, 0, reinterpret_cast<FcChar8 **>(&family_name)) == FcResultMatch) {
+ if (family_name) {
+ font_names.insert(String::utf8(family_name));
+ }
+ }
+ }
+ FcFontSetDestroy(font_set);
+ }
+ FcPatternDestroy(pattern);
+ }
+ FcObjectSetDestroy(object_set);
+
+ for (const String &E : font_names) {
+ ret.push_back(E);
+ }
+ return ret;
+#else
+ ERR_FAIL_V_MSG(Vector<String>(), "Godot was compiled without fontconfig, system font support is disabled.");
+#endif
+}
+
+String OS_LinuxBSD::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+#ifdef FONTCONFIG_ENABLED
+ if (!font_config_initialized) {
+ ERR_FAIL_V_MSG(String(), "Unable to load fontconfig, system font support is disabled.");
+ }
+
+ String ret;
+
+ FcConfig *config = FcInitLoadConfigAndFonts();
+ ERR_FAIL_COND_V(!config, ret);
+
+ FcObjectSet *object_set = FcObjectSetBuild(FC_FAMILY, FC_FILE, nullptr);
+ ERR_FAIL_COND_V(!object_set, ret);
+
+ FcPattern *pattern = FcPatternCreate();
+ if (pattern) {
+ FcPatternAddBool(pattern, FC_SCALABLE, FcTrue);
+ FcPatternAddString(pattern, FC_FAMILY, reinterpret_cast<const FcChar8 *>(p_font_name.utf8().get_data()));
+ FcPatternAddInteger(pattern, FC_WEIGHT, p_bold ? FC_WEIGHT_BOLD : FC_WEIGHT_NORMAL);
+ FcPatternAddInteger(pattern, FC_SLANT, p_italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN);
+
+ FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcDefaultSubstitute(pattern);
+
+ FcResult result;
+ FcPattern *match = FcFontMatch(0, pattern, &result);
+ if (match) {
+ char *file_name = nullptr;
+ if (FcPatternGetString(match, FC_FILE, 0, reinterpret_cast<FcChar8 **>(&file_name)) == FcResultMatch) {
+ if (file_name) {
+ ret = String::utf8(file_name);
+ }
+ }
+
+ FcPatternDestroy(match);
+ }
+ FcPatternDestroy(pattern);
+ }
+ FcObjectSetDestroy(object_set);
+ return ret;
+#else
+ ERR_FAIL_V_MSG(String(), "Godot was compiled without fontconfig, system font support is disabled.");
+#endif
+}
+
String OS_LinuxBSD::get_config_path() const {
if (has_environment("XDG_CONFIG_HOME")) {
if (get_environment("XDG_CONFIG_HOME").is_absolute_path()) {
@@ -644,4 +740,13 @@ OS_LinuxBSD::OS_LinuxBSD() {
#ifdef X11_ENABLED
DisplayServerX11::register_x11_driver();
#endif
+
+#ifdef FONTCONFIG_ENABLED
+#ifdef DEBUG_ENABLED
+ int dylibloader_verbose = 1;
+#else
+ int dylibloader_verbose = 0;
+#endif
+ font_config_initialized = (initialize_fontconfig(dylibloader_verbose) == 0);
+#endif // FONTCONFIG_ENABLED
}
diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h
index 13c07842fb..cc4e91e885 100644
--- a/platform/linuxbsd/os_linuxbsd.h
+++ b/platform/linuxbsd/os_linuxbsd.h
@@ -45,6 +45,10 @@ class OS_LinuxBSD : public OS_Unix {
bool force_quit;
+#ifdef FONTCONFIG_ENABLED
+ bool font_config_initialized = false;
+#endif
+
#ifdef JOYDEV_ENABLED
JoypadLinux *joypad = nullptr;
#endif
@@ -80,6 +84,9 @@ public:
virtual uint64_t get_embedded_pck_offset() const override;
+ virtual Vector<String> get_system_fonts() const override;
+ virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+
virtual String get_config_path() const override;
virtual String get_data_path() const override;
virtual String get_cache_path() const override;
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 07ba5d7497..b9bc182dde 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -334,7 +334,7 @@ void DisplayServerMacOS::_dispatch_input_event(const Ref<InputEvent> &p_event) {
if (windows.has(E->get())) {
Callable callable = windows[E->get()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
in_dispatch_input_event = false;
@@ -348,7 +348,7 @@ void DisplayServerMacOS::_dispatch_input_event(const Ref<InputEvent> &p_event) {
if (windows.has(event_from_window->get_window_id())) {
Callable callable = windows[event_from_window->get_window_id()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
} else {
@@ -356,7 +356,7 @@ void DisplayServerMacOS::_dispatch_input_event(const Ref<InputEvent> &p_event) {
for (KeyValue<WindowID, WindowData> &E : windows) {
Callable callable = E.value.input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
}
@@ -555,7 +555,7 @@ void DisplayServerMacOS::menu_callback(id p_sender) {
Variant *tagp = &tag;
Variant ret;
Callable::CallError ce;
- value->callback.call((const Variant **)&tagp, 1, ret, ce);
+ value->callback.callp((const Variant **)&tagp, 1, ret, ce);
}
}
}
@@ -596,7 +596,7 @@ void DisplayServerMacOS::send_window_event(const WindowData &wd, WindowEvent p_e
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- wd.event_callback.call((const Variant **)&eventp, 1, ret, ce);
+ wd.event_callback.callp((const Variant **)&eventp, 1, ret, ce);
}
}
@@ -1522,7 +1522,7 @@ Error DisplayServerMacOS::dialog_show(String p_title, String p_description, Vect
Variant *buttonp = &button;
Variant ret;
Callable::CallError ce;
- p_callback.call((const Variant **)&buttonp, 1, ret, ce);
+ p_callback.callp((const Variant **)&buttonp, 1, ret, ce);
}
return OK;
@@ -1554,7 +1554,7 @@ Error DisplayServerMacOS::dialog_input_text(String p_title, String p_description
Variant *textp = &text;
Variant ret;
Callable::CallError ce;
- p_callback.call((const Variant **)&textp, 1, ret, ce);
+ p_callback.callp((const Variant **)&textp, 1, ret, ce);
}
return OK;
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index fd0781ac50..bcc2636c07 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -32,12 +32,13 @@
#include "codesign.h"
+#include "core/string/translation.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "modules/modules_enabled.gen.h" // For regex.
-void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -47,8 +48,7 @@ void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset
if (p_preset->get("texture_format/etc2")) {
r_features->push_back("etc2");
}
-
- r_features->push_back("64");
+ r_features->push_back(p_preset->get("binary_format/architecture"));
}
bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const {
@@ -69,6 +69,7 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_opt
}
void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options) {
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "universal,x86_64,arm64", PROPERTY_USAGE_STORAGE), "universal"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
@@ -254,7 +255,7 @@ void EditorExportPlatformMacOS::_make_icon(const Ref<Image> &p_icon, Vector<uint
// Encode PNG icon.
it->set_image(copy);
String path = EditorPaths::get_singleton()->get_cache_dir().plus_file("icon.png");
- ResourceSaver::save(path, it);
+ ResourceSaver::save(it, path);
{
Ref<FileAccess> f = FileAccess::open(path, FileAccess::READ);
@@ -766,7 +767,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
int ret = unzGoToFirstFile(src_pkg_zip);
- String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + ".universal";
+ String architecture = p_preset->get("binary_format/architecture");
+ String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
String pkg_name;
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
@@ -1064,19 +1066,19 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
}
if (data.size() > 0) {
- if (file.find("/data.mono.macos.release_debug.universal/") != -1) {
+ if (file.find("/data.mono.macos.release_debug." + architecture + "/") != -1) {
if (!p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.macos.release_debug.universal/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.release_debug." + architecture + "/", "/GodotSharp/");
}
- if (file.find("/data.mono.macos.release.universal/") != -1) {
+ if (file.find("/data.mono.macos.release." + architecture + "/") != -1) {
if (p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.macos.release.universal/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.release." + architecture + "/", "/GodotSharp/");
}
if (file.ends_with(".dylib")) {
diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h
index e2e9cc3d22..21bc380d55 100644
--- a/platform/macos/export/export_plugin.h
+++ b/platform/macos/export/export_plugin.h
@@ -39,8 +39,8 @@
#include "core/io/zip_io.h"
#include "core/os/os.h"
#include "core/version.h"
-#include "editor/editor_export.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export.h"
#include "platform/macos/logo.gen.h"
#include <sys/stat.h>
@@ -99,7 +99,7 @@ class EditorExportPlatformMacOS : public EditorExportPlatform {
}
protected:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override;
@@ -121,7 +121,7 @@ public:
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("pc");
r_features->push_back("s3tc");
r_features->push_back("macos");
diff --git a/platform/macos/godot_content_view.mm b/platform/macos/godot_content_view.mm
index 9ca7498a15..dbed969901 100644
--- a/platform/macos/godot_content_view.mm
+++ b/platform/macos/godot_content_view.mm
@@ -267,7 +267,7 @@
Variant *vp = &v;
Variant ret;
Callable::CallError ce;
- wd.drop_files_callback.call((const Variant **)&vp, 1, ret, ce);
+ wd.drop_files_callback.callp((const Variant **)&vp, 1, ret, ce);
}
return NO;
diff --git a/platform/macos/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm
index e1e88274f0..2d9329ab3c 100644
--- a/platform/macos/godot_window_delegate.mm
+++ b/platform/macos/godot_window_delegate.mm
@@ -187,7 +187,7 @@
Variant *sizep = &size;
Variant ret;
Callable::CallError ce;
- wd.rect_changed_callback.call((const Variant **)&sizep, 1, ret, ce);
+ wd.rect_changed_callback.callp((const Variant **)&sizep, 1, ret, ce);
}
}
@@ -205,7 +205,7 @@
Variant *sizep = &size;
Variant ret;
Callable::CallError ce;
- wd.rect_changed_callback.call((const Variant **)&sizep, 1, ret, ce);
+ wd.rect_changed_callback.callp((const Variant **)&sizep, 1, ret, ce);
}
}
diff --git a/platform/macos/os_macos.h b/platform/macos/os_macos.h
index a6c23ab71e..a1eb0f7f69 100644
--- a/platform/macos/os_macos.h
+++ b/platform/macos/os_macos.h
@@ -97,6 +97,8 @@ public:
virtual String get_locale() const override;
+ virtual Vector<String> get_system_fonts() const override;
+ virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
virtual String get_executable_path() const override;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm
index 2c6cd7de0b..cc550043de 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -303,6 +303,80 @@ String OS_MacOS::get_locale() const {
return String([locale_code UTF8String]).replace("-", "_");
}
+Vector<String> OS_MacOS::get_system_fonts() const {
+ HashSet<String> font_names;
+ CFArrayRef fonts = CTFontManagerCopyAvailableFontFamilyNames();
+ if (fonts) {
+ for (CFIndex i = 0; i < CFArrayGetCount(fonts); i++) {
+ CFStringRef cf_name = (CFStringRef)CFArrayGetValueAtIndex(fonts, i);
+ if (cf_name && (CFStringGetLength(cf_name) > 0) && (CFStringCompare(cf_name, CFSTR("LastResort"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) && (CFStringGetCharacterAtIndex(cf_name, 0) != '.')) {
+ NSString *ns_name = (__bridge NSString *)cf_name;
+ font_names.insert(String::utf8([ns_name UTF8String]));
+ }
+ }
+ CFRelease(fonts);
+ }
+
+ Vector<String> ret;
+ for (const String &E : font_names) {
+ ret.push_back(E);
+ }
+ return ret;
+}
+
+String OS_MacOS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+ String ret;
+
+ String font_name = p_font_name;
+ if (font_name.to_lower() == "sans-serif") {
+ font_name = "Helvetica";
+ } else if (font_name.to_lower() == "serif") {
+ font_name = "Times";
+ } else if (font_name.to_lower() == "monospace") {
+ font_name = "Courier";
+ } else if (font_name.to_lower() == "fantasy") {
+ font_name = "Papyrus";
+ } else if (font_name.to_lower() == "cursive") {
+ font_name = "Apple Chancery";
+ };
+
+ CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
+
+ CTFontSymbolicTraits traits = 0;
+ if (p_bold) {
+ traits |= kCTFontBoldTrait;
+ }
+ if (p_italic) {
+ traits |= kCTFontItalicTrait;
+ }
+
+ CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
+ CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+
+ CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
+ CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
+
+ CTFontDescriptorRef font = CTFontDescriptorCreateWithAttributes(attributes);
+ if (font) {
+ CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(font, kCTFontURLAttribute);
+ if (url) {
+ NSString *font_path = [NSString stringWithString:[(__bridge NSURL *)url path]];
+ ret = String::utf8([font_path UTF8String]);
+ CFRelease(url);
+ }
+ CFRelease(font);
+ }
+
+ CFRelease(attributes);
+ CFRelease(traits_dict);
+ CFRelease(sym_traits);
+ CFRelease(name);
+
+ return ret;
+}
+
String OS_MacOS::get_executable_path() const {
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
int pid = getpid();
diff --git a/platform/uwp/export/app_packager.h b/platform/uwp/export/app_packager.h
index effe96ae67..18db3eb806 100644
--- a/platform/uwp/export/app_packager.h
+++ b/platform/uwp/export/app_packager.h
@@ -40,7 +40,7 @@
#include "core/io/zip_io.h"
#include "core/object/class_db.h"
#include "core/version.h"
-#include "editor/editor_export.h"
+#include "editor/export/editor_export_platform.h"
#include "thirdparty/minizip/unzip.h"
#include "thirdparty/minizip/zip.h"
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index efba006985..31105824a5 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -30,6 +30,7 @@
#include "export.h"
+#include "editor/editor_settings.h"
#include "export_plugin.h"
void register_uwp_exporter() {
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index 19b43d50be..070c46242f 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -30,6 +30,7 @@
#include "export_plugin.h"
+#include "editor/editor_settings.h"
#include "platform/uwp/logo.gen.h"
String EditorExportPlatformUWP::get_name() const {
@@ -49,27 +50,17 @@ Ref<Texture2D> EditorExportPlatformUWP::get_logo() const {
return logo;
}
-void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
r_features->push_back("s3tc");
r_features->push_back("etc");
- switch ((int)p_preset->get("architecture/target")) {
- case EditorExportPlatformUWP::ARM: {
- r_features->push_back("arm");
- } break;
- case EditorExportPlatformUWP::X86: {
- r_features->push_back("32");
- } break;
- case EditorExportPlatformUWP::X64: {
- r_features->push_back("64");
- } break;
- }
+ r_features->push_back(p_preset->get("binary_format/architecture"));
}
void EditorExportPlatformUWP::get_export_options(List<ExportOption> *r_options) {
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "architecture/target", PROPERTY_HINT_ENUM, "arm,x86,x64"), 1));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32,arm32"), "x86_64"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "command_line/extra_args"), ""));
@@ -143,23 +134,18 @@ bool EditorExportPlatformUWP::can_export(const Ref<EditorExportPreset> &p_preset
bool valid = false;
// Look for export templates (first official, and if defined custom templates).
-
- Platform arch = (Platform)(int)(p_preset->get("architecture/target"));
- String platform_infix;
- switch (arch) {
- case EditorExportPlatformUWP::ARM: {
- platform_infix = "arm";
- } break;
- case EditorExportPlatformUWP::X86: {
- platform_infix = "x86";
- } break;
- case EditorExportPlatformUWP::X64: {
- platform_infix = "x64";
- } break;
+ String arch = p_preset->get("binary_format/architecture");
+ String arch_infix;
+ if (arch == "arm32") {
+ arch_infix = "arm";
+ } else if (arch == "x86_32") {
+ arch_infix = "x86";
+ } else if (arch == "x86_64") {
+ arch_infix = "x64";
}
- bool dvalid = exists_export_template("uwp_" + platform_infix + "_debug.zip", &err);
- bool rvalid = exists_export_template("uwp_" + platform_infix + "_release.zip", &err);
+ bool dvalid = exists_export_template("uwp_" + arch_infix + "_debug.zip", &err);
+ bool rvalid = exists_export_template("uwp_" + arch_infix + "_release.zip", &err);
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -263,25 +249,21 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
src_appx = src_appx.strip_edges();
- Platform arch = (Platform)(int)p_preset->get("architecture/target");
+ String arch = p_preset->get("binary_format/architecture");
if (src_appx.is_empty()) {
- String err, infix;
- switch (arch) {
- case ARM: {
- infix = "_arm_";
- } break;
- case X86: {
- infix = "_x86_";
- } break;
- case X64: {
- infix = "_x64_";
- } break;
+ String err, arch_infix;
+ if (arch == "arm32") {
+ arch_infix = "arm";
+ } else if (arch == "x86_32") {
+ arch_infix = "x86";
+ } else if (arch == "x86_64") {
+ arch_infix = "x64";
}
if (p_debug) {
- src_appx = find_export_template("uwp" + infix + "debug.zip", &err);
+ src_appx = find_export_template("uwp_" + arch_infix + "_debug.zip", &err);
} else {
- src_appx = find_export_template("uwp" + infix + "release.zip", &err);
+ src_appx = find_export_template("uwp_" + arch_infix + "_release.zip", &err);
}
if (src_appx.is_empty()) {
EditorNode::add_io_error(err);
@@ -494,7 +476,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
return OK;
}
-void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) {
+void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) const {
r_features->push_back("pc");
r_features->push_back("uwp");
}
diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h
index 02dbcb726b..4a3c5db377 100644
--- a/platform/uwp/export/export_plugin.h
+++ b/platform/uwp/export/export_plugin.h
@@ -39,9 +39,9 @@
#include "core/io/zip_io.h"
#include "core/object/class_db.h"
#include "core/version.h"
-#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
+#include "editor/export/editor_export_platform.h"
#include "thirdparty/minizip/unzip.h"
#include "thirdparty/minizip/zip.h"
@@ -90,12 +90,6 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
Ref<ImageTexture> logo;
- enum Platform {
- ARM,
- X86,
- X64
- };
-
bool _valid_resource_name(const String &p_name) const {
if (p_name.is_empty()) {
return false;
@@ -215,8 +209,8 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
String version = itos(p_preset->get("version/major")) + "." + itos(p_preset->get("version/minor")) + "." + itos(p_preset->get("version/build")) + "." + itos(p_preset->get("version/revision"));
result = result.replace("$version_string$", version);
- Platform arch = (Platform)(int)p_preset->get("architecture/target");
- String architecture = arch == ARM ? "arm" : (arch == X86 ? "x86" : "x64");
+ String arch = p_preset->get("binary_format/architecture");
+ String architecture = arch == "arm32" ? "arm" : (arch == "x86_32" ? "x86" : "x64");
result = result.replace("$architecture$", architecture);
result = result.replace("$display_name$", String(p_preset->get("package/display_name")).is_empty() ? (String)ProjectSettings::get_singleton()->get("application/config/name") : String(p_preset->get("package/display_name")));
@@ -431,7 +425,7 @@ public:
virtual Ref<Texture2D> get_logo() const override;
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -439,7 +433,7 @@ public:
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
- virtual void get_platform_features(List<String> *r_features) override;
+ virtual void get_platform_features(List<String> *r_features) const override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 6a7caf4656..dd2df1f004 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -270,6 +270,7 @@ def configure_msvc(env, manual_msvc_config):
"bcrypt",
"Avrt",
"dwmapi",
+ "dwrite",
]
if env["vulkan"]:
@@ -441,6 +442,7 @@ def configure_mingw(env):
"avrt",
"uuid",
"dwmapi",
+ "dwrite",
]
)
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index f9988b23bc..f6baab1644 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2035,7 +2035,7 @@ void DisplayServerWindows::_send_window_event(const WindowData &wd, WindowEvent
Variant *eventp = &event;
Variant ret;
Callable::CallError ce;
- wd.event_callback.call((const Variant **)&eventp, 1, ret, ce);
+ wd.event_callback.callp((const Variant **)&eventp, 1, ret, ce);
}
}
@@ -2062,7 +2062,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
if (windows.has(E->get())) {
Callable callable = windows[E->get()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
in_dispatch_input_event = false;
@@ -2076,7 +2076,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
if (windows.has(event_from_window->get_window_id())) {
Callable callable = windows[event_from_window->get_window_id()].input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
} else {
@@ -2084,7 +2084,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
for (const KeyValue<WindowID, WindowData> &E : windows) {
const Callable callable = E.value.input_event_callback;
if (callable.is_valid()) {
- callable.call((const Variant **)&evp, 1, ret, ce);
+ callable.callp((const Variant **)&evp, 1, ret, ce);
}
}
}
@@ -3039,7 +3039,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
const Variant *args[] = { &size };
Variant ret;
Callable::CallError ce;
- window.rect_changed_callback.call(args, 1, ret, ce);
+ window.rect_changed_callback.callp(args, 1, ret, ce);
}
}
@@ -3199,7 +3199,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
Variant *vp = &v;
Variant ret;
Callable::CallError ce;
- windows[window_id].drop_files_callback.call((const Variant **)&vp, 1, ret, ce);
+ windows[window_id].drop_files_callback.callp((const Variant **)&vp, 1, ret, ce);
}
} break;
default: {
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index af19f24f09..20320470b8 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -30,6 +30,7 @@
#include "export.h"
+#include "editor/export/editor_export.h"
#include "export_plugin.h"
void register_windows_exporter() {
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index 45bfc761fe..febef5ad12 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -123,6 +123,7 @@ bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_o
void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_options) {
EditorExportPlatformPC::get_export_options(r_options);
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32"), "x86_64"));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/enable"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/identity_type", PROPERTY_HINT_ENUM, "Select automatically,Use PKCS12 file (specify *.PFX/*.P12 file),Use certificate store (specify SHA1 hash)"), 0));
@@ -230,13 +231,13 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
String str;
Error err = OS::get_singleton()->execute(rcedit_path, args, &str, nullptr, true);
if (err != OK || (str.find("not found") != -1) || (str.find("not recognized") != -1)) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), TTR("Could not start rcedit executable, configure rcedit path in the Editor Settings (Export > Windows > Rcedit)."));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), TTR("Could not start rcedit executable. Configure rcedit path in the Editor Settings (Export > Windows > Rcedit), or disable \"Application > Modify Resources\" in the export preset."));
return err;
}
print_line("rcedit (" + p_path + "): " + str);
if (str.find("Fatal error") != -1) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("rcedit failed to modify executable:\n%s"), str));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("rcedit failed to modify executable: %s."), str));
return FAILED;
}
@@ -378,7 +379,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
String str;
Error err = OS::get_singleton()->execute(signtool_path, args, &str, nullptr, true);
if (err != OK || (str.find("not found") != -1) || (str.find("not recognized") != -1)) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), TTR("Could not start signtool executable, configure signtool path in the Editor Settings (Export > Windows > Signtool)."));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), TTR("Could not start signtool executable. Configure signtool path in the Editor Settings (Export > Windows > Signtool), or disable \"Codesign\" in the export preset."));
return err;
}
@@ -388,7 +389,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
#else
if (str.find("Failed") != -1) {
#endif
- add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Signtool failed to sign executable:\n%s"), str));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Signtool failed to sign executable: %s."), str));
return FAILED;
}
diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h
index bb8d6a15f2..b9e59829a0 100644
--- a/platform/windows/export/export_plugin.h
+++ b/platform/windows/export/export_plugin.h
@@ -33,8 +33,8 @@
#include "core/io/file_access.h"
#include "core/os/os.h"
-#include "editor/editor_export.h"
#include "editor/editor_settings.h"
+#include "editor/export/editor_export_platform_pc.h"
#include "platform/windows/logo.gen.h"
class EditorExportPlatformWindows : public EditorExportPlatformPC {
diff --git a/platform/windows/godot.natvis b/platform/windows/godot.natvis
index 899956d65a..cdd1c14978 100644
--- a/platform/windows/godot.natvis
+++ b/platform/windows/godot.natvis
@@ -40,7 +40,7 @@
<DisplayString Condition="type == Variant::TRANSFORM2D">{_data._transform2d}</DisplayString>
<DisplayString Condition="type == Variant::AABB">{_data._aabb}</DisplayString>
<DisplayString Condition="type == Variant::BASIS">{_data._basis}</DisplayString>
- <DisplayString Condition="type == Variant::TRANSFORM3D">{_data._transform}</DisplayString>
+ <DisplayString Condition="type == Variant::TRANSFORM3D">{_data._transform3d}</DisplayString>
<DisplayString Condition="type == Variant::PROJECTION">{_data._projection}</DisplayString>
<DisplayString Condition="type == Variant::STRING">{*(String *)_data._mem}</DisplayString>
<DisplayString Condition="type == Variant::VECTOR2">{*(Vector2 *)_data._mem}</DisplayString>
@@ -74,7 +74,7 @@
<Item Name="[value]" Condition="type == Variant::TRANSFORM2D">_data._transform2d</Item>
<Item Name="[value]" Condition="type == Variant::AABB">_data._aabb</Item>
<Item Name="[value]" Condition="type == Variant::BASIS">_data._basis</Item>
- <Item Name="[value]" Condition="type == Variant::TRANSFORM3D">_data._transform</Item>
+ <Item Name="[value]" Condition="type == Variant::TRANSFORM3D">_data._transform3d</Item>
<Item Name="[value]" Condition="type == Variant::STRING">*(String *)_data._mem</Item>
<Item Name="[value]" Condition="type == Variant::VECTOR2">*(Vector2 *)_data._mem</Item>
<Item Name="[value]" Condition="type == Variant::RECT2">*(Rect2 *)_data._mem</Item>
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index b5423e62bf..ad4be950cc 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -48,6 +48,7 @@
#include <avrt.h>
#include <bcrypt.h>
#include <direct.h>
+#include <dwrite.h>
#include <knownfolders.h>
#include <process.h>
#include <regstr.h>
@@ -621,6 +622,135 @@ Error OS_Windows::set_cwd(const String &p_cwd) {
return OK;
}
+Vector<String> OS_Windows::get_system_fonts() const {
+ Vector<String> ret;
+ HashSet<String> font_names;
+
+ ComAutoreleaseRef<IDWriteFactory> dwrite_factory;
+ HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast<IUnknown **>(&dwrite_factory.reference));
+ ERR_FAIL_COND_V(FAILED(hr) || dwrite_factory.is_null(), ret);
+
+ ComAutoreleaseRef<IDWriteFontCollection> font_collection;
+ hr = dwrite_factory->GetSystemFontCollection(&font_collection.reference, false);
+ ERR_FAIL_COND_V(FAILED(hr) || font_collection.is_null(), ret);
+
+ UINT32 family_count = font_collection->GetFontFamilyCount();
+ for (UINT32 i = 0; i < family_count; i++) {
+ ComAutoreleaseRef<IDWriteFontFamily> family;
+ hr = font_collection->GetFontFamily(i, &family.reference);
+ ERR_CONTINUE(FAILED(hr) || family.is_null());
+
+ ComAutoreleaseRef<IDWriteLocalizedStrings> family_names;
+ hr = family->GetFamilyNames(&family_names.reference);
+ ERR_CONTINUE(FAILED(hr) || family_names.is_null());
+
+ UINT32 index = 0;
+ BOOL exists = false;
+ UINT32 length = 0;
+ Char16String name;
+
+ hr = family_names->FindLocaleName(L"en-us", &index, &exists);
+ ERR_CONTINUE(FAILED(hr));
+
+ hr = family_names->GetStringLength(index, &length);
+ ERR_CONTINUE(FAILED(hr));
+
+ name.resize(length + 1);
+ hr = family_names->GetString(index, (WCHAR *)name.ptrw(), length + 1);
+ ERR_CONTINUE(FAILED(hr));
+
+ font_names.insert(String::utf16(name.ptr(), length));
+ }
+
+ for (const String &E : font_names) {
+ ret.push_back(E);
+ }
+ return ret;
+}
+
+String OS_Windows::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+ String font_name = p_font_name;
+ if (font_name.to_lower() == "sans-serif") {
+ font_name = "Arial";
+ } else if (font_name.to_lower() == "serif") {
+ font_name = "Times New Roman";
+ } else if (font_name.to_lower() == "monospace") {
+ font_name = "Courier New";
+ } else if (font_name.to_lower() == "cursive") {
+ font_name = "Comic Sans MS";
+ } else if (font_name.to_lower() == "fantasy") {
+ font_name = "Gabriola";
+ }
+
+ ComAutoreleaseRef<IDWriteFactory> dwrite_factory;
+ HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast<IUnknown **>(&dwrite_factory.reference));
+ ERR_FAIL_COND_V(FAILED(hr) || dwrite_factory.is_null(), String());
+
+ ComAutoreleaseRef<IDWriteFontCollection> font_collection;
+ hr = dwrite_factory->GetSystemFontCollection(&font_collection.reference, false);
+ ERR_FAIL_COND_V(FAILED(hr) || font_collection.is_null(), String());
+
+ UINT32 index = 0;
+ BOOL exists = false;
+ font_collection->FindFamilyName((const WCHAR *)font_name.utf16().get_data(), &index, &exists);
+ if (FAILED(hr)) {
+ return String();
+ }
+
+ ComAutoreleaseRef<IDWriteFontFamily> family;
+ hr = font_collection->GetFontFamily(index, &family.reference);
+ if (FAILED(hr) || family.is_null()) {
+ return String();
+ }
+
+ ComAutoreleaseRef<IDWriteFont> dwrite_font;
+ hr = family->GetFirstMatchingFont(p_bold ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, p_italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL, &dwrite_font.reference);
+ if (FAILED(hr) || dwrite_font.is_null()) {
+ return String();
+ }
+
+ ComAutoreleaseRef<IDWriteFontFace> dwrite_face;
+ hr = dwrite_font->CreateFontFace(&dwrite_face.reference);
+ if (FAILED(hr) || dwrite_face.is_null()) {
+ return String();
+ }
+
+ UINT32 number_of_files = 0;
+ hr = dwrite_face->GetFiles(&number_of_files, nullptr);
+ if (FAILED(hr)) {
+ return String();
+ }
+ Vector<ComAutoreleaseRef<IDWriteFontFile>> files;
+ files.resize(number_of_files);
+ hr = dwrite_face->GetFiles(&number_of_files, (IDWriteFontFile **)files.ptrw());
+ if (FAILED(hr)) {
+ return String();
+ }
+
+ for (UINT32 i = 0; i < number_of_files; i++) {
+ void const *reference_key = nullptr;
+ UINT32 reference_key_size = 0;
+ ComAutoreleaseRef<IDWriteLocalFontFileLoader> loader;
+
+ hr = files.write[i]->GetLoader((IDWriteFontFileLoader **)&loader.reference);
+ if (FAILED(hr) || loader.is_null()) {
+ continue;
+ }
+ hr = files.write[i]->GetReferenceKey(&reference_key, &reference_key_size);
+ if (FAILED(hr)) {
+ continue;
+ }
+
+ WCHAR file_path[MAX_PATH];
+ hr = loader->GetFilePathFromKey(reference_key, reference_key_size, &file_path[0], MAX_PATH);
+ if (FAILED(hr)) {
+ continue;
+ }
+ return String::utf16((const char16_t *)&file_path[0]);
+ }
+ return String();
+}
+
String OS_Windows::get_executable_path() const {
WCHAR bufname[4096];
GetModuleFileNameW(nullptr, bufname, 4096);
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 7d2d4ae705..80fc860738 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -62,6 +62,26 @@
#define WINDOWS_DEBUG_OUTPUT_ENABLED
#endif
+template <class T>
+class ComAutoreleaseRef {
+public:
+ T *reference = nullptr;
+
+ _FORCE_INLINE_ T *operator->() { return reference; }
+ _FORCE_INLINE_ const T *operator->() const { return reference; }
+ _FORCE_INLINE_ T *operator*() { return reference; }
+ _FORCE_INLINE_ const T *operator*() const { return reference; }
+ _FORCE_INLINE_ bool is_valid() const { return reference != nullptr; }
+ _FORCE_INLINE_ bool is_null() const { return reference == nullptr; }
+ ComAutoreleaseRef() {}
+ ~ComAutoreleaseRef() {
+ if (reference != nullptr) {
+ reference->Release();
+ reference = nullptr;
+ }
+ }
+};
+
class JoypadWindows;
class OS_Windows : public OS {
#ifdef STDOUT_FILE
@@ -147,6 +167,9 @@ public:
virtual String get_environment(const String &p_var) const override;
virtual bool set_environment(const String &p_var, const String &p_value) const override;
+ virtual Vector<String> get_system_fonts() const override;
+ virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+
virtual String get_executable_path() const override;
virtual String get_locale() const override;
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index dfc1016c84..7890348314 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -184,8 +184,8 @@ void Area2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
E->value.rc = 0;
E->value.in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_body_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_body_exit_tree).bind(objid));
if (E->value.in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -277,8 +277,8 @@ void Area2D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
E->value.rc = 0;
E->value.in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area2D::_area_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area2D::_area_exit_tree).bind(objid));
if (E->value.in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_entered, node);
}
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 76b354805c..c43a796170 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -247,8 +247,8 @@ void Camera2D::_notification(int p_what) {
add_to_group(canvas_group_name);
_update_process_callback();
- _update_scroll();
first = true;
+ _update_scroll();
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -439,7 +439,9 @@ void Camera2D::clear_current() {
void Camera2D::set_limit(Side p_side, int p_limit) {
ERR_FAIL_INDEX((int)p_side, 4);
limit[p_side] = p_limit;
+ Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
+ smoothed_camera_pos = old_smoothed_camera_pos;
}
int Camera2D::get_limit(Side p_side) const {
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 6e8fd891cb..6f189a57e8 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -35,6 +35,7 @@
#include "core/os/mutex.h"
#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"
+#include "servers/navigation_server_3d.h"
#include "thirdparty/misc/polypartition.h"
@@ -371,9 +372,11 @@ void NavigationRegion2D::set_enabled(bool p_enabled) {
NavigationServer2D::get_singleton_mut()->connect("map_changed", callable_mp(this, &NavigationRegion2D::_map_changed));
}
- if (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) {
+#ifdef DEBUG_ENABLED
+ if (Engine::get_singleton()->is_editor_hint() || NavigationServer3D::get_singleton()->get_debug_enabled()) {
update();
}
+#endif // DEBUG_ENABLED
}
bool NavigationRegion2D::is_enabled() const {
@@ -462,7 +465,8 @@ void NavigationRegion2D::_notification(int p_what) {
} break;
case NOTIFICATION_DRAW: {
- if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) && navpoly.is_valid()) {
+#ifdef DEBUG_ENABLED
+ if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || NavigationServer3D::get_singleton()->get_debug_enabled()) && navpoly.is_valid()) {
Vector<Vector2> verts = navpoly->get_vertices();
if (verts.size() < 3) {
return;
@@ -470,11 +474,11 @@ void NavigationRegion2D::_notification(int p_what) {
Color color;
if (enabled) {
- color = get_tree()->get_debug_navigation_color();
+ color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
} else {
- color = get_tree()->get_debug_navigation_disabled_color();
+ color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_disabled_color();
}
- Color doors_color = color.lightened(0.2);
+ Color doors_color = NavigationServer3D::get_singleton()->get_debug_navigation_edge_connection_color();
RandomPCG rand;
@@ -516,6 +520,7 @@ void NavigationRegion2D::_notification(int p_what) {
draw_arc(b, radius, angle - Math_PI / 2.0, angle + Math_PI / 2.0, 10, doors_color);
}
}
+#endif // DEBUG_ENABLED
} break;
}
}
@@ -552,10 +557,13 @@ void NavigationRegion2D::_navpoly_changed() {
NavigationServer2D::get_singleton()->region_set_navpoly(region, navpoly);
}
}
+
void NavigationRegion2D::_map_changed(RID p_map) {
- if (enabled && get_world_2d()->get_navigation_map() == p_map) {
+#ifdef DEBUG_ENABLED
+ if (is_inside_tree() && get_world_2d()->get_navigation_map() == p_map) {
update();
}
+#endif // DEBUG_ENABLED
}
TypedArray<String> NavigationRegion2D::get_configuration_warnings() const {
@@ -605,8 +613,18 @@ NavigationRegion2D::NavigationRegion2D() {
region = NavigationServer2D::get_singleton()->region_create();
NavigationServer2D::get_singleton()->region_set_enter_cost(region, get_enter_cost());
NavigationServer2D::get_singleton()->region_set_travel_cost(region, get_travel_cost());
+
+#ifdef DEBUG_ENABLED
+ NavigationServer3D::get_singleton_mut()->connect("map_changed", callable_mp(this, &NavigationRegion2D::_map_changed));
+ NavigationServer3D::get_singleton_mut()->connect("navigation_debug_changed", callable_mp(this, &NavigationRegion2D::_map_changed));
+#endif // DEBUG_ENABLED
}
NavigationRegion2D::~NavigationRegion2D() {
NavigationServer2D::get_singleton()->free(region);
+
+#ifdef DEBUG_ENABLED
+ NavigationServer3D::get_singleton_mut()->disconnect("map_changed", callable_mp(this, &NavigationRegion2D::_map_changed));
+ NavigationServer3D::get_singleton_mut()->disconnect("navigation_debug_changed", callable_mp(this, &NavigationRegion2D::_map_changed));
+#endif // DEBUG_ENABLED
}
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index e60a5ed034..ce22f32b01 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -387,8 +387,8 @@ void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p
//E->value.rc=0;
E->value.in_scene = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree).bind(objid));
if (E->value.in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 8953813452..68e5ffdcf9 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -240,7 +240,7 @@ void RayCast2D::_draw_debug_shape() {
Transform2D xf;
xf.rotate(target_position.angle());
- xf.translate(Vector2(no_line ? 0 : target_position.length() - arrow_size, 0));
+ xf.translate_local(Vector2(no_line ? 0 : target_position.length() - arrow_size, 0));
Vector<Vector2> pts = {
xf.xform(Vector2(arrow_size, 0)),
diff --git a/scene/2d/shape_cast_2d.cpp b/scene/2d/shape_cast_2d.cpp
index ae810156a2..7589af0924 100644
--- a/scene/2d/shape_cast_2d.cpp
+++ b/scene/2d/shape_cast_2d.cpp
@@ -237,7 +237,7 @@ void ShapeCast2D::_notification(int p_what) {
if (target_position != Vector2()) {
Transform2D xf;
xf.rotate(target_position.angle());
- xf.translate(Vector2(target_position.length(), 0));
+ xf.translate_local(Vector2(target_position.length(), 0));
draw_line(Vector2(), target_position, draw_col, 2);
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 4a4a2a1da0..9dea69cd64 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -131,7 +131,7 @@ void TouchScreenButton::_notification(int p_what) {
pos = texture_normal->get_size() * 0.5;
}
- draw_set_transform_matrix(get_canvas_transform().translated(pos));
+ draw_set_transform_matrix(get_canvas_transform().translated_local(pos));
shape->draw(get_canvas_item(), draw_col);
}
} break;
@@ -258,7 +258,7 @@ bool TouchScreenButton::_is_point_inside(const Point2 &p_point) {
pos = texture_normal->get_size() * 0.5;
}
- touched = shape->collide(Transform2D().translated(pos), unit_rect, Transform2D(0, coord + Vector2(0.5, 0.5)));
+ touched = shape->collide(Transform2D().translated_local(pos), unit_rect, Transform2D(0, coord + Vector2(0.5, 0.5)));
}
if (bitmask.is_valid()) {
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp
index fb0c59daa1..e9e19488e9 100644
--- a/scene/3d/area_3d.cpp
+++ b/scene/3d/area_3d.cpp
@@ -239,8 +239,8 @@ void Area3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, i
E->value.rc = 0;
E->value.in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_body_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_body_exit_tree).bind(objid));
if (E->value.in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -426,8 +426,8 @@ void Area3D::_area_inout(int p_status, const RID &p_area, ObjectID p_instance, i
E->value.rc = 0;
E->value.in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &Area3D::_area_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &Area3D::_area_exit_tree).bind(objid));
if (E->value.in_tree) {
emit_signal(SceneStringNames::get_singleton()->area_entered, node);
}
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index a36357555a..9a5d4f5480 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -319,7 +319,7 @@ bool CollisionObject3D::_are_collision_shapes_visible() {
void CollisionObject3D::_update_shape_data(uint32_t p_owner) {
if (_are_collision_shapes_visible()) {
if (debug_shapes_to_update.is_empty()) {
- callable_mp(this, &CollisionObject3D::_update_debug_shapes).call_deferred({}, 0);
+ callable_mp(this, &CollisionObject3D::_update_debug_shapes).call_deferredp({}, 0);
}
debug_shapes_to_update.insert(p_owner);
}
@@ -365,8 +365,7 @@ void CollisionObject3D::_update_debug_shapes() {
RS::get_singleton()->instance_set_scenario(s.debug_shape, get_world_3d()->get_scenario());
if (!s.shape->is_connected("changed", callable_mp(this, &CollisionObject3D::_shape_changed))) {
- s.shape->connect("changed", callable_mp(this, &CollisionObject3D::_shape_changed),
- varray(s.shape), CONNECT_DEFERRED);
+ s.shape->connect("changed", callable_mp(this, &CollisionObject3D::_shape_changed).bind(s.shape), CONNECT_DEFERRED);
}
++debug_shapes_count;
@@ -404,6 +403,9 @@ void CollisionObject3D::_on_transform_changed() {
debug_shape_old_transform = get_global_transform();
for (KeyValue<uint32_t, ShapeData> &E : shapes) {
ShapeData &shapedata = E.value;
+ if (shapedata.disabled) {
+ continue; // If disabled then there are no debug shapes to update.
+ }
const ShapeData::ShapeBase *shapes = shapedata.shapes.ptr();
for (int i = 0; i < shapedata.shapes.size(); i++) {
RS::get_singleton()->instance_set_transform(shapes[i].debug_shape, debug_shape_old_transform * shapedata.xform);
diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp
index 01cab493ec..0112f24e0c 100644
--- a/scene/3d/decal.cpp
+++ b/scene/3d/decal.cpp
@@ -215,11 +215,13 @@ void Decal::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cull_mask"), &Decal::get_cull_mask);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents", PROPERTY_HINT_RANGE, "0,1024,0.001,or_greater,suffix:m"), "set_extents", "get_extents");
+
ADD_GROUP("Textures", "texture_");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_albedo", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_ALBEDO);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_normal", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_NORMAL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_orm", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_ORM);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_emission", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TEXTURE_EMISSION);
+
ADD_GROUP("Parameters", "");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_energy", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_emission_energy", "get_emission_energy");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate");
@@ -227,13 +229,16 @@ void Decal::_bind_methods() {
// A Normal Fade of 1.0 causes the decal to be invisible even if fully perpendicular to a surface.
// Due to this, limit Normal Fade to 0.999.
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_fade", PROPERTY_HINT_RANGE, "0,0.999,0.001"), "set_normal_fade", "get_normal_fade");
+
ADD_GROUP("Vertical Fade", "");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "upper_fade", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_upper_fade", "get_upper_fade");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lower_fade", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_lower_fade", "get_lower_fade");
+
ADD_GROUP("Distance Fade", "distance_fade_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_fade_enabled"), "set_enable_distance_fade", "is_distance_fade_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_begin", PROPERTY_HINT_NONE, "suffix:m"), "set_distance_fade_begin", "get_distance_fade_begin");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_length", PROPERTY_HINT_NONE, "suffix:m"), "set_distance_fade_length", "get_distance_fade_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_begin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_distance_fade_begin", "get_distance_fade_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_length", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_distance_fade_length", "get_distance_fade_length");
+
ADD_GROUP("Cull Mask", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
diff --git a/scene/3d/decal.h b/scene/3d/decal.h
index d5990272c6..38da4c14e3 100644
--- a/scene/3d/decal.h
+++ b/scene/3d/decal.h
@@ -57,8 +57,8 @@ private:
real_t upper_fade = 0.3;
real_t lower_fade = 0.3;
bool distance_fade_enabled = false;
- real_t distance_fade_begin = 10.0;
- real_t distance_fade_length = 1.0;
+ real_t distance_fade_begin = 40.0;
+ real_t distance_fade_length = 10.0;
protected:
static void _bind_methods();
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp
index b352114c7f..01aff32954 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -222,7 +222,7 @@ void GPUParticles3D::set_draw_pass_mesh(int p_pass, const Ref<Mesh> &p_mesh) {
draw_passes.write[p_pass] = p_mesh;
if (Engine::get_singleton()->is_editor_hint() && draw_passes.write[p_pass].is_valid()) {
- draw_passes.write[p_pass]->connect("changed", callable_mp((Node *)this, &Node::update_configuration_warnings), varray(), CONNECT_DEFERRED);
+ draw_passes.write[p_pass]->connect("changed", callable_mp((Node *)this, &Node::update_configuration_warnings), CONNECT_DEFERRED);
}
RID mesh_rid;
diff --git a/scene/3d/joint_3d.cpp b/scene/3d/joint_3d.cpp
index 0b824ef28b..b0509475a7 100644
--- a/scene/3d/joint_3d.cpp
+++ b/scene/3d/joint_3d.cpp
@@ -737,7 +737,8 @@ void Generic6DOFJoint3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_flag_z", "flag", "value"), &Generic6DOFJoint3D::set_flag_z);
ClassDB::bind_method(D_METHOD("get_flag_z", "flag"), &Generic6DOFJoint3D::get_flag_z);
- // X
+ ADD_GROUP("Linear Limit", "linear_limit_");
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT);
@@ -745,15 +746,53 @@ void Generic6DOFJoint3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
+
+ ADD_GROUP("Linear Motor", "linear_motor_");
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_MOTOR);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/target_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_MOTOR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/target_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_MOTOR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/target_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+
+ ADD_GROUP("Linear Spring", "linear_spring_");
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_SPRING);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_SPRING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+
+ ADD_GROUP("Angular Limit", "angular_limit_");
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_LIMIT);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_x", "_get_angular_hi_limit_x");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x");
@@ -763,68 +802,15 @@ void Generic6DOFJoint3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP);
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
-
- // Y
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/target_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
-
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_LIMIT);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_y", "_get_angular_hi_limit_y");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_y", "_get_angular_lo_limit_y");
-
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP);
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
-
- // Z
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/target_velocity", PROPERTY_HINT_NONE, "suffix:m/s"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
-
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
-
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_LIMIT);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_z", "_get_angular_hi_limit_z");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z");
@@ -834,10 +820,32 @@ void Generic6DOFJoint3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP);
+ ADD_GROUP("Angular Motor", "angular_motor_");
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_MOTOR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_MOTOR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_MOTOR);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_GROUP("Angular Spring", "angular_spring_");
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_SPRING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_SPRING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_SPRING);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING);
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index e805d28ed3..6b6a2eff9e 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -1219,7 +1219,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa
}
data->set_path(p_image_data_path);
- Error err = ResourceSaver::save(p_image_data_path, data);
+ Error err = ResourceSaver::save(data);
if (err != OK) {
return BAKE_ERROR_CANT_CREATE_IMAGE;
diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp
index 2a8149c6f6..0abb0e8dea 100644
--- a/scene/3d/navigation_region_3d.cpp
+++ b/scene/3d/navigation_region_3d.cpp
@@ -49,14 +49,29 @@ void NavigationRegion3D::set_enabled(bool p_enabled) {
NavigationServer3D::get_singleton()->region_set_map(region, get_world_3d()->get_navigation_map());
}
- if (debug_view) {
- MeshInstance3D *dm = Object::cast_to<MeshInstance3D>(debug_view);
- if (is_enabled()) {
- dm->set_material_override(get_tree()->get_debug_navigation_material());
+#ifdef DEBUG_ENABLED
+ if (debug_instance.is_valid()) {
+ if (!is_enabled()) {
+ if (debug_mesh.is_valid()) {
+ if (debug_mesh->get_surface_count() > 0) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 0, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_disabled_material()->get_rid());
+ }
+ if (debug_mesh->get_surface_count() > 1) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 1, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_disabled_material()->get_rid());
+ }
+ }
} else {
- dm->set_material_override(get_tree()->get_debug_navigation_disabled_material());
+ if (debug_mesh.is_valid()) {
+ if (debug_mesh->get_surface_count() > 0) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 0, RID());
+ }
+ if (debug_mesh->get_surface_count() > 1) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 1, RID());
+ }
+ }
}
}
+#endif // DEBUG_ENABLED
update_gizmos();
}
@@ -124,30 +139,36 @@ void NavigationRegion3D::_notification(int p_what) {
NavigationServer3D::get_singleton()->region_set_map(region, get_world_3d()->get_navigation_map());
}
- if (navmesh.is_valid() && get_tree()->is_debugging_navigation_hint()) {
- MeshInstance3D *dm = memnew(MeshInstance3D);
- dm->set_mesh(navmesh->get_debug_mesh());
- if (is_enabled()) {
- dm->set_material_override(get_tree()->get_debug_navigation_material());
- } else {
- dm->set_material_override(get_tree()->get_debug_navigation_disabled_material());
- }
- add_child(dm);
- debug_view = dm;
+#ifdef DEBUG_ENABLED
+ if (NavigationServer3D::get_singleton()->get_debug_enabled()) {
+ _update_debug_mesh();
}
+#endif // DEBUG_ENABLED
+
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
NavigationServer3D::get_singleton()->region_set_transform(region, get_global_transform());
+
+#ifdef DEBUG_ENABLED
+ if (is_inside_tree() && debug_instance.is_valid()) {
+ RS::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
+ }
+#endif // DEBUG_ENABLED
+
} break;
case NOTIFICATION_EXIT_TREE: {
NavigationServer3D::get_singleton()->region_set_map(region, RID());
- if (debug_view) {
- debug_view->queue_delete();
- debug_view = nullptr;
+#ifdef DEBUG_ENABLED
+ if (debug_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_instance, false);
+ }
+ if (debug_edge_connections_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
}
+#endif // DEBUG_ENABLED
} break;
}
}
@@ -169,20 +190,21 @@ void NavigationRegion3D::set_navigation_mesh(const Ref<NavigationMesh> &p_navmes
NavigationServer3D::get_singleton()->region_set_navmesh(region, p_navmesh);
- if (debug_view == nullptr && is_inside_tree() && navmesh.is_valid() && get_tree()->is_debugging_navigation_hint()) {
- MeshInstance3D *dm = memnew(MeshInstance3D);
- dm->set_mesh(navmesh->get_debug_mesh());
- if (is_enabled()) {
- dm->set_material_override(get_tree()->get_debug_navigation_material());
+#ifdef DEBUG_ENABLED
+ if (is_inside_tree() && NavigationServer3D::get_singleton()->get_debug_enabled()) {
+ if (navmesh.is_valid()) {
+ _update_debug_mesh();
+ _update_debug_edge_connections_mesh();
} else {
- dm->set_material_override(get_tree()->get_debug_navigation_disabled_material());
+ if (debug_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_instance, false);
+ }
+ if (debug_edge_connections_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
+ }
}
- add_child(dm);
- debug_view = dm;
- }
- if (debug_view && navmesh.is_valid()) {
- Object::cast_to<MeshInstance3D>(debug_view)->set_mesh(navmesh->get_debug_mesh());
}
+#endif // DEBUG_ENABLED
emit_signal(SNAME("navigation_mesh_changed"));
@@ -287,13 +309,31 @@ void NavigationRegion3D::_bind_methods() {
void NavigationRegion3D::_navigation_changed() {
update_gizmos();
update_configuration_warnings();
+
+#ifdef DEBUG_ENABLED
+ _update_debug_edge_connections_mesh();
+#endif // DEBUG_ENABLED
+}
+
+#ifdef DEBUG_ENABLED
+void NavigationRegion3D::_navigation_map_changed(RID p_map) {
+ if (is_inside_tree() && p_map == get_world_3d()->get_navigation_map()) {
+ _update_debug_edge_connections_mesh();
+ }
}
+#endif // DEBUG_ENABLED
NavigationRegion3D::NavigationRegion3D() {
set_notify_transform(true);
region = NavigationServer3D::get_singleton()->region_create();
NavigationServer3D::get_singleton()->region_set_enter_cost(region, get_enter_cost());
NavigationServer3D::get_singleton()->region_set_travel_cost(region, get_travel_cost());
+
+#ifdef DEBUG_ENABLED
+ NavigationServer3D::get_singleton_mut()->connect("map_changed", callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
+ NavigationServer3D::get_singleton_mut()->connect("navigation_debug_changed", callable_mp(this, &NavigationRegion3D::_update_debug_mesh));
+ NavigationServer3D::get_singleton_mut()->connect("navigation_debug_changed", callable_mp(this, &NavigationRegion3D::_update_debug_edge_connections_mesh));
+#endif // DEBUG_ENABLED
}
NavigationRegion3D::~NavigationRegion3D() {
@@ -301,4 +341,245 @@ NavigationRegion3D::~NavigationRegion3D() {
navmesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed));
}
NavigationServer3D::get_singleton()->free(region);
+
+#ifdef DEBUG_ENABLED
+ NavigationServer3D::get_singleton_mut()->disconnect("map_changed", callable_mp(this, &NavigationRegion3D::_navigation_map_changed));
+ NavigationServer3D::get_singleton_mut()->disconnect("navigation_debug_changed", callable_mp(this, &NavigationRegion3D::_update_debug_mesh));
+ NavigationServer3D::get_singleton_mut()->disconnect("navigation_debug_changed", callable_mp(this, &NavigationRegion3D::_update_debug_edge_connections_mesh));
+ if (debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_instance);
+ }
+ if (debug_mesh.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_mesh->get_rid());
+ }
+ if (debug_edge_connections_instance.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_edge_connections_instance);
+ }
+ if (debug_edge_connections_mesh.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_edge_connections_mesh->get_rid());
+ }
+#endif // DEBUG_ENABLED
+}
+
+#ifdef DEBUG_ENABLED
+void NavigationRegion3D::_update_debug_mesh() {
+ if (!NavigationServer3D::get_singleton()->get_debug_enabled()) {
+ if (debug_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_instance, false);
+ }
+ return;
+ }
+
+ if (!navmesh.is_valid()) {
+ if (debug_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_instance, false);
+ }
+ return;
+ }
+
+ if (!debug_instance.is_valid()) {
+ debug_instance = RenderingServer::get_singleton()->instance_create();
+ }
+
+ if (!debug_mesh.is_valid()) {
+ debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ }
+
+ debug_mesh->clear_surfaces();
+
+ bool enabled_geometry_face_random_color = NavigationServer3D::get_singleton()->get_debug_navigation_enable_geometry_face_random_color();
+ bool enabled_edge_lines = NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_lines();
+
+ Vector<Vector3> vertices = navmesh->get_vertices();
+ if (vertices.size() == 0) {
+ return;
+ }
+
+ int polygon_count = navmesh->get_polygon_count();
+ if (polygon_count == 0) {
+ return;
+ }
+
+ Vector<Vector3> face_vertex_array;
+ face_vertex_array.resize(polygon_count * 3);
+
+ Vector<Color> face_color_array;
+ if (enabled_geometry_face_random_color) {
+ face_color_array.resize(polygon_count * 3);
+ }
+
+ Vector<Vector3> line_vertex_array;
+ if (enabled_edge_lines) {
+ line_vertex_array.resize(polygon_count * 6);
+ }
+
+ Color debug_navigation_geometry_face_color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
+
+ Ref<StandardMaterial3D> face_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_material();
+ Ref<StandardMaterial3D> line_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_material();
+
+ Color polygon_color = debug_navigation_geometry_face_color;
+
+ for (int i = 0; i < polygon_count; i++) {
+ if (enabled_geometry_face_random_color) {
+ polygon_color = debug_navigation_geometry_face_color * (Color(Math::randf(), Math::randf(), Math::randf()));
+ }
+
+ Vector<int> polygon = navmesh->get_polygon(i);
+
+ face_vertex_array.push_back(vertices[polygon[0]]);
+ face_vertex_array.push_back(vertices[polygon[1]]);
+ face_vertex_array.push_back(vertices[polygon[2]]);
+ if (enabled_geometry_face_random_color) {
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ }
+
+ if (enabled_edge_lines) {
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ }
+ }
+
+ Array face_mesh_array;
+ face_mesh_array.resize(Mesh::ARRAY_MAX);
+ face_mesh_array[Mesh::ARRAY_VERTEX] = face_vertex_array;
+ if (enabled_geometry_face_random_color) {
+ face_mesh_array[Mesh::ARRAY_COLOR] = face_color_array;
+ }
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, face_mesh_array);
+ debug_mesh->surface_set_material(0, face_material);
+
+ if (enabled_edge_lines) {
+ Array line_mesh_array;
+ line_mesh_array.resize(Mesh::ARRAY_MAX);
+ line_mesh_array[Mesh::ARRAY_VERTEX] = line_vertex_array;
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, line_mesh_array);
+ debug_mesh->surface_set_material(1, line_material);
+ }
+
+ RS::get_singleton()->instance_set_base(debug_instance, debug_mesh->get_rid());
+ if (is_inside_tree()) {
+ RS::get_singleton()->instance_set_scenario(debug_instance, get_world_3d()->get_scenario());
+ RS::get_singleton()->instance_set_visible(debug_instance, is_visible_in_tree());
+ }
+ if (!is_enabled()) {
+ if (debug_mesh.is_valid()) {
+ if (debug_mesh->get_surface_count() > 0) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 0, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_disabled_material()->get_rid());
+ }
+ if (debug_mesh->get_surface_count() > 1) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 1, NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_disabled_material()->get_rid());
+ }
+ }
+ } else {
+ if (debug_mesh.is_valid()) {
+ if (debug_mesh->get_surface_count() > 0) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 0, RID());
+ }
+ if (debug_mesh->get_surface_count() > 1) {
+ RS::get_singleton()->instance_set_surface_override_material(debug_instance, 1, RID());
+ }
+ }
+ }
+}
+#endif // DEBUG_ENABLED
+
+#ifdef DEBUG_ENABLED
+void NavigationRegion3D::_update_debug_edge_connections_mesh() {
+ if (!NavigationServer3D::get_singleton()->get_debug_enabled()) {
+ if (debug_edge_connections_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
+ }
+ return;
+ }
+
+ if (!is_inside_tree()) {
+ return;
+ }
+
+ if (!navmesh.is_valid()) {
+ if (debug_edge_connections_instance.is_valid()) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
+ }
+ return;
+ }
+
+ if (!debug_edge_connections_instance.is_valid()) {
+ debug_edge_connections_instance = RenderingServer::get_singleton()->instance_create();
+ }
+
+ if (!debug_edge_connections_mesh.is_valid()) {
+ debug_edge_connections_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ }
+
+ debug_edge_connections_mesh->clear_surfaces();
+
+ float edge_connection_margin = NavigationServer3D::get_singleton()->map_get_edge_connection_margin(get_world_3d()->get_navigation_map());
+ float half_edge_connection_margin = edge_connection_margin * 0.5;
+ int connections_count = NavigationServer3D::get_singleton()->region_get_connections_count(region);
+
+ if (connections_count == 0) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
+ return;
+ }
+
+ Vector<Vector3> vertex_array;
+
+ for (int i = 0; i < connections_count; i++) {
+ Vector3 connection_pathway_start = NavigationServer3D::get_singleton()->region_get_connection_pathway_start(region, i);
+ Vector3 connection_pathway_end = NavigationServer3D::get_singleton()->region_get_connection_pathway_end(region, i);
+
+ Vector3 direction_start_end = connection_pathway_start.direction_to(connection_pathway_end);
+ Vector3 direction_end_start = connection_pathway_end.direction_to(connection_pathway_start);
+
+ Vector3 start_right_dir = direction_start_end.cross(Vector3(0, 1, 0));
+ Vector3 start_left_dir = -start_right_dir;
+
+ Vector3 end_right_dir = direction_end_start.cross(Vector3(0, 1, 0));
+ Vector3 end_left_dir = -end_right_dir;
+
+ Vector3 left_start_pos = connection_pathway_start + (start_left_dir * half_edge_connection_margin);
+ Vector3 right_start_pos = connection_pathway_start + (start_right_dir * half_edge_connection_margin);
+ Vector3 left_end_pos = connection_pathway_end + (end_right_dir * half_edge_connection_margin);
+ Vector3 right_end_pos = connection_pathway_end + (end_left_dir * half_edge_connection_margin);
+
+ vertex_array.push_back(right_end_pos);
+ vertex_array.push_back(left_start_pos);
+ vertex_array.push_back(right_start_pos);
+
+ vertex_array.push_back(left_end_pos);
+ vertex_array.push_back(right_end_pos);
+ vertex_array.push_back(right_start_pos);
+ }
+
+ if (vertex_array.size() == 0) {
+ return;
+ }
+
+ Ref<StandardMaterial3D> edge_connections_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_edge_connections_material();
+
+ Array mesh_array;
+ mesh_array.resize(Mesh::ARRAY_MAX);
+ mesh_array[Mesh::ARRAY_VERTEX] = vertex_array;
+
+ debug_edge_connections_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, mesh_array);
+ debug_edge_connections_mesh->surface_set_material(0, edge_connections_material);
+
+ RS::get_singleton()->instance_set_base(debug_edge_connections_instance, debug_edge_connections_mesh->get_rid());
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, is_visible_in_tree());
+ if (is_inside_tree()) {
+ RS::get_singleton()->instance_set_scenario(debug_edge_connections_instance, get_world_3d()->get_scenario());
+ }
+
+ bool enable_edge_connections = NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_connections();
+ if (!enable_edge_connections) {
+ RS::get_singleton()->instance_set_visible(debug_edge_connections_instance, false);
+ }
}
+#endif // DEBUG_ENABLED
diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h
index b15e97de6a..ba326abb46 100644
--- a/scene/3d/navigation_region_3d.h
+++ b/scene/3d/navigation_region_3d.h
@@ -44,11 +44,22 @@ class NavigationRegion3D : public Node3D {
real_t enter_cost = 0.0;
real_t travel_cost = 1.0;
- Node *debug_view = nullptr;
Thread bake_thread;
void _navigation_changed();
+#ifdef DEBUG_ENABLED
+ RID debug_instance;
+ RID debug_edge_connections_instance;
+ Ref<ArrayMesh> debug_mesh;
+ Ref<ArrayMesh> debug_edge_connections_mesh;
+
+private:
+ void _update_debug_mesh();
+ void _update_debug_edge_connections_mesh();
+ void _navigation_map_changed(RID p_map);
+#endif // DEBUG_ENABLED
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index 04b1081516..1de85d57a3 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -733,7 +733,7 @@ void Node3D::rotate_z(real_t p_angle) {
void Node3D::translate(const Vector3 &p_offset) {
Transform3D t = get_transform();
- t.translate(p_offset);
+ t.translate_local(p_offset);
set_transform(t);
}
@@ -741,7 +741,7 @@ void Node3D::translate_object_local(const Vector3 &p_offset) {
Transform3D t = get_transform();
Transform3D s;
- s.translate(p_offset);
+ s.translate_local(p_offset);
set_transform(t * s);
}
diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp
index 66d0a8c4e2..c1c309fdbe 100644
--- a/scene/3d/occluder_instance_3d.cpp
+++ b/scene/3d/occluder_instance_3d.cpp
@@ -670,7 +670,7 @@ OccluderInstance3D::BakeError OccluderInstance3D::bake_scene(Node *p_from_node,
occ->set_arrays(vertices, indices);
- Error err = ResourceSaver::save(p_occluder_path, occ);
+ Error err = ResourceSaver::save(occ, p_occluder_path);
if (err != OK) {
return BAKE_ERROR_CANT_SAVE;
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index 1f10337b4c..25226ad384 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -296,7 +296,7 @@ void PathFollow3D::_update_transform(bool p_update_xyz_rot) {
}
}
- t.translate(Vector3(h_offset, v_offset, 0));
+ t.translate_local(Vector3(h_offset, v_offset, 0));
} else {
t.origin = pos + Vector3(h_offset, v_offset, 0);
}
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index 30f7a025fa..993608c306 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -439,8 +439,8 @@ void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p
//E->value.rc=0;
E->value.in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree).bind(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree).bind(objid));
if (E->value.in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
diff --git a/scene/3d/shape_cast_3d.cpp b/scene/3d/shape_cast_3d.cpp
new file mode 100644
index 0000000000..d324e09df5
--- /dev/null
+++ b/scene/3d/shape_cast_3d.cpp
@@ -0,0 +1,634 @@
+/*************************************************************************/
+/* shape_cast_3d.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 "shape_cast_3d.h"
+
+#include "collision_object_3d.h"
+#include "mesh_instance_3d.h"
+#include "scene/resources/concave_polygon_shape_3d.h"
+
+void ShapeCast3D::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ if (Engine::get_singleton()->is_editor_hint()) {
+ _update_debug_shape_vertices();
+ }
+ if (enabled && !Engine::get_singleton()->is_editor_hint()) {
+ set_physics_process_internal(true);
+ } else {
+ set_physics_process_internal(false);
+ }
+
+ if (get_tree()->is_debugging_collisions_hint()) {
+ _update_debug_shape();
+ }
+
+ if (Object::cast_to<CollisionObject3D>(get_parent())) {
+ if (exclude_parent_body) {
+ exclude.insert(Object::cast_to<CollisionObject3D>(get_parent())->get_rid());
+ } else {
+ exclude.erase(Object::cast_to<CollisionObject3D>(get_parent())->get_rid());
+ }
+ }
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ if (enabled) {
+ set_physics_process_internal(false);
+ }
+
+ if (debug_shape) {
+ _clear_debug_shape();
+ }
+ } break;
+
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
+ if (!enabled) {
+ break;
+ }
+
+ bool prev_collision_state = collided;
+ _update_shapecast_state();
+ if (get_tree()->is_debugging_collisions_hint()) {
+ if (prev_collision_state != collided) {
+ _update_debug_shape_material(true);
+ }
+ if (collided) {
+ _update_debug_shape();
+ }
+ if (prev_collision_state == collided && !collided) {
+ _update_debug_shape();
+ }
+ }
+ } break;
+ }
+}
+
+void ShapeCast3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("resource_changed", "resource"), &ShapeCast3D::resource_changed);
+
+ ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &ShapeCast3D::set_enabled);
+ ClassDB::bind_method(D_METHOD("is_enabled"), &ShapeCast3D::is_enabled);
+
+ ClassDB::bind_method(D_METHOD("set_shape", "shape"), &ShapeCast3D::set_shape);
+ ClassDB::bind_method(D_METHOD("get_shape"), &ShapeCast3D::get_shape);
+
+ ClassDB::bind_method(D_METHOD("set_target_position", "local_point"), &ShapeCast3D::set_target_position);
+ ClassDB::bind_method(D_METHOD("get_target_position"), &ShapeCast3D::get_target_position);
+
+ ClassDB::bind_method(D_METHOD("set_margin", "margin"), &ShapeCast3D::set_margin);
+ ClassDB::bind_method(D_METHOD("get_margin"), &ShapeCast3D::get_margin);
+
+ ClassDB::bind_method(D_METHOD("set_max_results", "max_results"), &ShapeCast3D::set_max_results);
+ ClassDB::bind_method(D_METHOD("get_max_results"), &ShapeCast3D::get_max_results);
+
+ ClassDB::bind_method(D_METHOD("is_colliding"), &ShapeCast3D::is_colliding);
+ ClassDB::bind_method(D_METHOD("get_collision_count"), &ShapeCast3D::get_collision_count);
+
+ ClassDB::bind_method(D_METHOD("force_shapecast_update"), &ShapeCast3D::force_shapecast_update);
+
+ ClassDB::bind_method(D_METHOD("get_collider", "index"), &ShapeCast3D::get_collider);
+ ClassDB::bind_method(D_METHOD("get_collider_shape", "index"), &ShapeCast3D::get_collider_shape);
+ ClassDB::bind_method(D_METHOD("get_collision_point", "index"), &ShapeCast3D::get_collision_point);
+ ClassDB::bind_method(D_METHOD("get_collision_normal", "index"), &ShapeCast3D::get_collision_normal);
+
+ ClassDB::bind_method(D_METHOD("get_closest_collision_safe_fraction"), &ShapeCast3D::get_closest_collision_safe_fraction);
+ ClassDB::bind_method(D_METHOD("get_closest_collision_unsafe_fraction"), &ShapeCast3D::get_closest_collision_unsafe_fraction);
+
+ ClassDB::bind_method(D_METHOD("add_exception_rid", "rid"), &ShapeCast3D::add_exception_rid);
+ ClassDB::bind_method(D_METHOD("add_exception", "node"), &ShapeCast3D::add_exception);
+
+ ClassDB::bind_method(D_METHOD("remove_exception_rid", "rid"), &ShapeCast3D::remove_exception_rid);
+ ClassDB::bind_method(D_METHOD("remove_exception", "node"), &ShapeCast3D::remove_exception);
+
+ ClassDB::bind_method(D_METHOD("clear_exceptions"), &ShapeCast3D::clear_exceptions);
+
+ ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &ShapeCast3D::set_collision_mask);
+ ClassDB::bind_method(D_METHOD("get_collision_mask"), &ShapeCast3D::get_collision_mask);
+
+ ClassDB::bind_method(D_METHOD("set_collision_mask_value", "layer_number", "value"), &ShapeCast3D::set_collision_mask_value);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_value", "layer_number"), &ShapeCast3D::get_collision_mask_value);
+
+ ClassDB::bind_method(D_METHOD("set_exclude_parent_body", "mask"), &ShapeCast3D::set_exclude_parent_body);
+ ClassDB::bind_method(D_METHOD("get_exclude_parent_body"), &ShapeCast3D::get_exclude_parent_body);
+
+ ClassDB::bind_method(D_METHOD("set_collide_with_areas", "enable"), &ShapeCast3D::set_collide_with_areas);
+ ClassDB::bind_method(D_METHOD("is_collide_with_areas_enabled"), &ShapeCast3D::is_collide_with_areas_enabled);
+
+ ClassDB::bind_method(D_METHOD("set_collide_with_bodies", "enable"), &ShapeCast3D::set_collide_with_bodies);
+ ClassDB::bind_method(D_METHOD("is_collide_with_bodies_enabled"), &ShapeCast3D::is_collide_with_bodies_enabled);
+
+ ClassDB::bind_method(D_METHOD("_get_collision_result"), &ShapeCast3D::_get_collision_result);
+
+ ClassDB::bind_method(D_METHOD("set_debug_shape_custom_color", "debug_shape_custom_color"), &ShapeCast3D::set_debug_shape_custom_color);
+ ClassDB::bind_method(D_METHOD("get_debug_shape_custom_color"), &ShapeCast3D::get_debug_shape_custom_color);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape3D"), "set_shape", "get_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exclude_parent"), "set_exclude_parent_body", "get_exclude_parent_body");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "target_position", PROPERTY_HINT_NONE, "suffix:m"), "set_target_position", "get_target_position");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01,suffix:m"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_results"), "set_max_results", "get_max_results");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "collision_result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "", "_get_collision_result");
+
+ ADD_GROUP("Collide With", "collide_with");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_with_areas", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collide_with_areas", "is_collide_with_areas_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_with_bodies", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collide_with_bodies", "is_collide_with_bodies_enabled");
+
+ ADD_GROUP("Debug Shape", "debug_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "debug_shape_custom_color"), "set_debug_shape_custom_color", "get_debug_shape_custom_color");
+}
+
+TypedArray<String> ShapeCast3D::get_configuration_warnings() const {
+ TypedArray<String> warnings = Node3D::get_configuration_warnings();
+
+ if (shape.is_null()) {
+ warnings.push_back(RTR("This node cannot interact with other objects unless a Shape3D is assigned."));
+ }
+ if (shape.is_valid() && Object::cast_to<ConcavePolygonShape3D>(*shape)) {
+ warnings.push_back(RTR("ShapeCast3D does not support ConcavePolygonShape3Ds. Collisions will not be reported."));
+ }
+ return warnings;
+}
+
+void ShapeCast3D::set_enabled(bool p_enabled) {
+ enabled = p_enabled;
+ update_gizmos();
+
+ if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) {
+ set_physics_process_internal(p_enabled);
+ }
+ if (!p_enabled) {
+ collided = false;
+ }
+
+ if (is_inside_tree() && get_tree()->is_debugging_collisions_hint()) {
+ if (p_enabled) {
+ _update_debug_shape();
+ } else {
+ _clear_debug_shape();
+ }
+ }
+}
+
+bool ShapeCast3D::is_enabled() const {
+ return enabled;
+}
+
+void ShapeCast3D::set_target_position(const Vector3 &p_point) {
+ target_position = p_point;
+ if (is_inside_tree()) {
+ _update_debug_shape();
+ }
+ update_gizmos();
+
+ if (Engine::get_singleton()->is_editor_hint()) {
+ if (is_inside_tree()) {
+ _update_debug_shape_vertices();
+ }
+ } else if (debug_shape) {
+ _update_debug_shape();
+ }
+}
+
+Vector3 ShapeCast3D::get_target_position() const {
+ return target_position;
+}
+
+void ShapeCast3D::set_margin(real_t p_margin) {
+ margin = p_margin;
+}
+
+real_t ShapeCast3D::get_margin() const {
+ return margin;
+}
+
+void ShapeCast3D::set_max_results(int p_max_results) {
+ max_results = p_max_results;
+}
+
+int ShapeCast3D::get_max_results() const {
+ return max_results;
+}
+
+void ShapeCast3D::set_collision_mask(uint32_t p_mask) {
+ collision_mask = p_mask;
+}
+
+uint32_t ShapeCast3D::get_collision_mask() const {
+ return collision_mask;
+}
+
+void ShapeCast3D::set_collision_mask_value(int p_layer_number, bool p_value) {
+ ERR_FAIL_COND_MSG(p_layer_number < 1, "Collision layer number must be between 1 and 32 inclusive.");
+ ERR_FAIL_COND_MSG(p_layer_number > 32, "Collision layer number must be between 1 and 32 inclusive.");
+ uint32_t mask = get_collision_mask();
+ if (p_value) {
+ mask |= 1 << (p_layer_number - 1);
+ } else {
+ mask &= ~(1 << (p_layer_number - 1));
+ }
+ set_collision_mask(mask);
+}
+
+bool ShapeCast3D::get_collision_mask_value(int p_layer_number) const {
+ ERR_FAIL_COND_V_MSG(p_layer_number < 1, false, "Collision layer number must be between 1 and 32 inclusive.");
+ ERR_FAIL_COND_V_MSG(p_layer_number > 32, false, "Collision layer number must be between 1 and 32 inclusive.");
+ return get_collision_mask() & (1 << (p_layer_number - 1));
+}
+
+int ShapeCast3D::get_collision_count() const {
+ return result.size();
+}
+
+bool ShapeCast3D::is_colliding() const {
+ return collided;
+}
+
+Object *ShapeCast3D::get_collider(int p_idx) const {
+ ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), nullptr, "No collider found.");
+
+ if (result[p_idx].collider_id.is_null()) {
+ return nullptr;
+ }
+ return ObjectDB::get_instance(result[p_idx].collider_id);
+}
+
+int ShapeCast3D::get_collider_shape(int p_idx) const {
+ ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), -1, "No collider shape found.");
+ return result[p_idx].shape;
+}
+
+Vector3 ShapeCast3D::get_collision_point(int p_idx) const {
+ ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), Vector3(), "No collision point found.");
+ return result[p_idx].point;
+}
+
+Vector3 ShapeCast3D::get_collision_normal(int p_idx) const {
+ ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), Vector3(), "No collision normal found.");
+ return result[p_idx].normal;
+}
+
+real_t ShapeCast3D::get_closest_collision_safe_fraction() const {
+ return collision_safe_fraction;
+}
+
+real_t ShapeCast3D::get_closest_collision_unsafe_fraction() const {
+ return collision_unsafe_fraction;
+}
+
+void ShapeCast3D::resource_changed(Ref<Resource> p_res) {
+ if (is_inside_tree()) {
+ _update_debug_shape();
+ }
+ update_gizmos();
+}
+
+void ShapeCast3D::set_shape(const Ref<Shape3D> &p_shape) {
+ if (p_shape == shape) {
+ return;
+ }
+ if (!shape.is_null()) {
+ shape->unregister_owner(this);
+ }
+ shape = p_shape;
+ if (!shape.is_null()) {
+ shape->register_owner(this);
+ }
+ if (p_shape.is_valid()) {
+ shape_rid = shape->get_rid();
+ }
+
+ if (is_inside_tree()) {
+ _update_debug_shape();
+ }
+
+ update_gizmos();
+ update_configuration_warnings();
+}
+
+Ref<Shape3D> ShapeCast3D::get_shape() const {
+ return shape;
+}
+
+void ShapeCast3D::set_exclude_parent_body(bool p_exclude_parent_body) {
+ if (exclude_parent_body == p_exclude_parent_body) {
+ return;
+ }
+ exclude_parent_body = p_exclude_parent_body;
+
+ if (!is_inside_tree()) {
+ return;
+ }
+ if (Object::cast_to<CollisionObject3D>(get_parent())) {
+ if (exclude_parent_body) {
+ exclude.insert(Object::cast_to<CollisionObject3D>(get_parent())->get_rid());
+ } else {
+ exclude.erase(Object::cast_to<CollisionObject3D>(get_parent())->get_rid());
+ }
+ }
+}
+
+bool ShapeCast3D::get_exclude_parent_body() const {
+ return exclude_parent_body;
+}
+
+void ShapeCast3D::_update_shapecast_state() {
+ result.clear();
+
+ ERR_FAIL_COND_MSG(shape.is_null(), "Null reference to shape. ShapeCast3D requires a Shape3D to sweep for collisions.");
+
+ Ref<World3D> w3d = get_world_3d();
+ ERR_FAIL_COND(w3d.is_null());
+
+ PhysicsDirectSpaceState3D *dss = PhysicsServer3D::get_singleton()->space_get_direct_state(w3d->get_space());
+ ERR_FAIL_COND(!dss);
+
+ Transform3D gt = get_global_transform();
+
+ PhysicsDirectSpaceState3D::ShapeParameters params;
+ params.shape_rid = shape_rid;
+ params.transform = gt;
+ params.motion = gt.basis.xform(target_position);
+ params.margin = margin;
+ params.exclude = exclude;
+ params.collision_mask = collision_mask;
+ params.collide_with_bodies = collide_with_bodies;
+ params.collide_with_areas = collide_with_areas;
+
+ collision_safe_fraction = 0.0;
+ collision_unsafe_fraction = 0.0;
+
+ if (target_position != Vector3()) {
+ dss->cast_motion(params, collision_safe_fraction, collision_unsafe_fraction);
+ if (collision_unsafe_fraction < 1.0) {
+ // Move shape transform to the point of impact,
+ // so we can collect contact info at that point.
+ gt.set_origin(gt.get_origin() + params.motion * (collision_unsafe_fraction + CMP_EPSILON));
+ params.transform = gt;
+ }
+ }
+ // Regardless of whether the shape is stuck or it's moved along
+ // the motion vector, we'll only consider static collisions from now on.
+ params.motion = Vector3();
+
+ bool intersected = true;
+ while (intersected && result.size() < max_results) {
+ PhysicsDirectSpaceState3D::ShapeRestInfo info;
+ intersected = dss->rest_info(params, &info);
+ if (intersected) {
+ result.push_back(info);
+ params.exclude.insert(info.rid);
+ }
+ }
+ collided = !result.is_empty();
+}
+
+void ShapeCast3D::force_shapecast_update() {
+ _update_shapecast_state();
+}
+
+void ShapeCast3D::add_exception_rid(const RID &p_rid) {
+ exclude.insert(p_rid);
+}
+
+void ShapeCast3D::add_exception(const Object *p_object) {
+ ERR_FAIL_NULL(p_object);
+ const CollisionObject3D *co = Object::cast_to<CollisionObject3D>(p_object);
+ if (!co) {
+ return;
+ }
+ add_exception_rid(co->get_rid());
+}
+
+void ShapeCast3D::remove_exception_rid(const RID &p_rid) {
+ exclude.erase(p_rid);
+}
+
+void ShapeCast3D::remove_exception(const Object *p_object) {
+ ERR_FAIL_NULL(p_object);
+ const CollisionObject3D *co = Object::cast_to<CollisionObject3D>(p_object);
+ if (!co) {
+ return;
+ }
+ remove_exception_rid(co->get_rid());
+}
+
+void ShapeCast3D::clear_exceptions() {
+ exclude.clear();
+}
+
+void ShapeCast3D::set_collide_with_areas(bool p_clip) {
+ collide_with_areas = p_clip;
+}
+
+bool ShapeCast3D::is_collide_with_areas_enabled() const {
+ return collide_with_areas;
+}
+
+void ShapeCast3D::set_collide_with_bodies(bool p_clip) {
+ collide_with_bodies = p_clip;
+}
+
+bool ShapeCast3D::is_collide_with_bodies_enabled() const {
+ return collide_with_bodies;
+}
+
+Array ShapeCast3D::_get_collision_result() const {
+ Array ret;
+
+ for (int i = 0; i < result.size(); ++i) {
+ const PhysicsDirectSpaceState3D::ShapeRestInfo &sri = result[i];
+
+ Dictionary col;
+ col["point"] = sri.point;
+ col["normal"] = sri.normal;
+ col["rid"] = sri.rid;
+ col["collider"] = ObjectDB::get_instance(sri.collider_id);
+ col["collider_id"] = sri.collider_id;
+ col["shape"] = sri.shape;
+ col["linear_velocity"] = sri.linear_velocity;
+
+ ret.push_back(col);
+ }
+ return ret;
+}
+
+void ShapeCast3D::_update_debug_shape_vertices() {
+ debug_shape_vertices.clear();
+ debug_line_vertices.clear();
+
+ if (!shape.is_null()) {
+ debug_shape_vertices.append_array(shape->get_debug_mesh_lines());
+ for (int i = 0; i < debug_shape_vertices.size(); i++) {
+ debug_shape_vertices.set(i, debug_shape_vertices[i] + Vector3(target_position * get_closest_collision_safe_fraction()));
+ }
+ }
+
+ if (target_position == Vector3()) {
+ return;
+ }
+
+ debug_line_vertices.push_back(Vector3());
+ debug_line_vertices.push_back(target_position);
+}
+
+const Vector<Vector3> &ShapeCast3D::get_debug_shape_vertices() const {
+ return debug_shape_vertices;
+}
+
+const Vector<Vector3> &ShapeCast3D::get_debug_line_vertices() const {
+ return debug_line_vertices;
+}
+
+void ShapeCast3D::set_debug_shape_custom_color(const Color &p_color) {
+ debug_shape_custom_color = p_color;
+ if (debug_material.is_valid()) {
+ _update_debug_shape_material();
+ }
+}
+
+Ref<StandardMaterial3D> ShapeCast3D::get_debug_material() {
+ _update_debug_shape_material();
+ return debug_material;
+}
+
+const Color &ShapeCast3D::get_debug_shape_custom_color() const {
+ return debug_shape_custom_color;
+}
+
+void ShapeCast3D::_create_debug_shape() {
+ _update_debug_shape_material();
+
+ Ref<ArrayMesh> mesh = memnew(ArrayMesh);
+
+ MeshInstance3D *mi = memnew(MeshInstance3D);
+ mi->set_mesh(mesh);
+
+ add_child(mi);
+ debug_shape = mi;
+}
+
+void ShapeCast3D::_update_debug_shape_material(bool p_check_collision) {
+ if (!debug_material.is_valid()) {
+ Ref<StandardMaterial3D> material = memnew(StandardMaterial3D);
+ debug_material = material;
+
+ material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ // Use double-sided rendering so that the RayCast can be seen if the camera is inside.
+ material->set_cull_mode(BaseMaterial3D::CULL_DISABLED);
+ material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
+ }
+
+ Color color = debug_shape_custom_color;
+ if (color == Color(0.0, 0.0, 0.0)) {
+ // Use the default debug shape color defined in the Project Settings.
+ color = get_tree()->get_debug_collisions_color();
+ }
+
+ if (p_check_collision && collided) {
+ if ((color.get_h() < 0.055 || color.get_h() > 0.945) && color.get_s() > 0.5 && color.get_v() > 0.5) {
+ // If base color is already quite reddish, highlight collision with green color
+ color = Color(0.0, 1.0, 0.0, color.a);
+ } else {
+ // Else, highlight collision with red color
+ color = Color(1.0, 0, 0, color.a);
+ }
+ }
+
+ Ref<StandardMaterial3D> material = static_cast<Ref<StandardMaterial3D>>(debug_material);
+ material->set_albedo(color);
+}
+
+void ShapeCast3D::_update_debug_shape() {
+ if (!enabled) {
+ return;
+ }
+
+ if (!debug_shape) {
+ _create_debug_shape();
+ }
+
+ _update_debug_shape_vertices();
+
+ if (Engine::get_singleton()->is_editor_hint()) {
+ return;
+ }
+
+ MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
+ Ref<ArrayMesh> mesh = mi->get_mesh();
+ if (!mesh.is_valid()) {
+ return;
+ }
+
+ mesh->clear_surfaces();
+
+ Array a;
+ a.resize(Mesh::ARRAY_MAX);
+
+ uint32_t flags = 0;
+ int surface_count = 0;
+
+ if (!debug_shape_vertices.is_empty()) {
+ a[Mesh::ARRAY_VERTEX] = debug_shape_vertices;
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
+ mesh->surface_set_material(surface_count, debug_material);
+ ++surface_count;
+ }
+
+ if (!debug_line_vertices.is_empty()) {
+ a[Mesh::ARRAY_VERTEX] = debug_line_vertices;
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
+ mesh->surface_set_material(surface_count, debug_material);
+ ++surface_count;
+ }
+}
+
+void ShapeCast3D::_clear_debug_shape() {
+ if (!debug_shape) {
+ return;
+ }
+
+ MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
+ if (mi->is_inside_tree()) {
+ mi->queue_delete();
+ } else {
+ memdelete(mi);
+ }
+
+ debug_shape = nullptr;
+}
+
+ShapeCast3D::~ShapeCast3D() {
+ if (!shape.is_null()) {
+ shape->unregister_owner(this);
+ }
+}
diff --git a/scene/3d/shape_cast_3d.h b/scene/3d/shape_cast_3d.h
new file mode 100644
index 0000000000..5bda15e4b0
--- /dev/null
+++ b/scene/3d/shape_cast_3d.h
@@ -0,0 +1,142 @@
+/*************************************************************************/
+/* shape_cast_3d.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 SHAPE_CAST_3D_H
+#define SHAPE_CAST_3D_H
+
+#include "scene/3d/node_3d.h"
+#include "scene/resources/shape_3d.h"
+
+class ShapeCast3D : public Node3D {
+ GDCLASS(ShapeCast3D, Node3D);
+
+ bool enabled = true;
+ void resource_changed(Ref<Resource> p_res);
+
+ Ref<Shape3D> shape;
+ RID shape_rid;
+ Vector3 target_position = Vector3(0, -1, 0);
+
+ HashSet<RID> exclude;
+ real_t margin = 0.0;
+ uint32_t collision_mask = 1;
+ bool exclude_parent_body = true;
+ bool collide_with_areas = false;
+ bool collide_with_bodies = true;
+
+ Node *debug_shape = nullptr;
+ Ref<Material> debug_material;
+ Color debug_shape_custom_color = Color(0.0, 0.0, 0.0);
+ Vector<Vector3> debug_shape_vertices;
+ Vector<Vector3> debug_line_vertices;
+
+ void _create_debug_shape();
+ void _update_debug_shape();
+ void _update_debug_shape_material(bool p_check_collision = false);
+ void _update_debug_shape_vertices();
+ void _clear_debug_shape();
+
+ // Result
+ int max_results = 32;
+ Vector<PhysicsDirectSpaceState3D::ShapeRestInfo> result;
+ bool collided = false;
+ real_t collision_safe_fraction = 1.0;
+ real_t collision_unsafe_fraction = 1.0;
+
+ Array _get_collision_result() const;
+
+ ~ShapeCast3D();
+
+protected:
+ void _notification(int p_what);
+ void _update_shapecast_state();
+ static void _bind_methods();
+
+public:
+ void set_collide_with_areas(bool p_clip);
+ bool is_collide_with_areas_enabled() const;
+
+ void set_collide_with_bodies(bool p_clip);
+ bool is_collide_with_bodies_enabled() const;
+
+ void set_enabled(bool p_enabled);
+ bool is_enabled() const;
+
+ void set_shape(const Ref<Shape3D> &p_shape);
+ Ref<Shape3D> get_shape() const;
+
+ void set_target_position(const Vector3 &p_point);
+ Vector3 get_target_position() const;
+
+ void set_margin(real_t p_margin);
+ real_t get_margin() const;
+
+ void set_max_results(int p_max_results);
+ int get_max_results() const;
+
+ void set_collision_mask(uint32_t p_mask);
+ uint32_t get_collision_mask() const;
+
+ void set_collision_mask_value(int p_layer_number, bool p_value);
+ bool get_collision_mask_value(int p_layer_number) const;
+
+ void set_exclude_parent_body(bool p_exclude_parent_body);
+ bool get_exclude_parent_body() const;
+
+ const Color &get_debug_shape_custom_color() const;
+ void set_debug_shape_custom_color(const Color &p_color);
+
+ const Vector<Vector3> &get_debug_shape_vertices() const;
+ const Vector<Vector3> &get_debug_line_vertices() const;
+
+ Ref<StandardMaterial3D> get_debug_material();
+
+ int get_collision_count() const;
+ Object *get_collider(int p_idx) const;
+ int get_collider_shape(int p_idx) const;
+ Vector3 get_collision_point(int p_idx) const;
+ Vector3 get_collision_normal(int p_idx) const;
+
+ real_t get_closest_collision_safe_fraction() const;
+ real_t get_closest_collision_unsafe_fraction() const;
+
+ void force_shapecast_update();
+ bool is_colliding() const;
+
+ void add_exception_rid(const RID &p_rid);
+ void add_exception(const Object *p_object);
+ void remove_exception_rid(const RID &p_rid);
+ void remove_exception(const Object *p_object);
+ void clear_exceptions();
+
+ virtual TypedArray<String> get_configuration_warnings() const override;
+};
+
+#endif // SHAPE_CAST_3D_H
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index b342660b85..4c38fccc8b 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -493,6 +493,19 @@ int Skeleton3D::get_bone_axis_forward_enum(int p_bone) {
return bones[p_bone].rest_bone_forward_axis;
}
+void Skeleton3D::set_motion_scale(float p_motion_scale) {
+ if (p_motion_scale <= 0) {
+ motion_scale = 1;
+ ERR_FAIL_MSG("Motion scale must be larger than 0.");
+ }
+ motion_scale = p_motion_scale;
+}
+
+float Skeleton3D::get_motion_scale() const {
+ ERR_FAIL_COND_V(motion_scale <= 0, 1);
+ return motion_scale;
+}
+
// Skeleton creation api
void Skeleton3D::add_bone(const String &p_name) {
@@ -1255,6 +1268,9 @@ void Skeleton3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("force_update_all_bone_transforms"), &Skeleton3D::force_update_all_bone_transforms);
ClassDB::bind_method(D_METHOD("force_update_bone_child_transform", "bone_idx"), &Skeleton3D::force_update_bone_children_transforms);
+ ClassDB::bind_method(D_METHOD("set_motion_scale", "motion_scale"), &Skeleton3D::set_motion_scale);
+ ClassDB::bind_method(D_METHOD("get_motion_scale"), &Skeleton3D::get_motion_scale);
+
// Helper functions
ClassDB::bind_method(D_METHOD("global_pose_to_world_transform", "global_pose"), &Skeleton3D::global_pose_to_world_transform);
ClassDB::bind_method(D_METHOD("world_transform_to_global_pose", "world_transform"), &Skeleton3D::world_transform_to_global_pose);
@@ -1278,15 +1294,13 @@ void Skeleton3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_modification_stack"), &Skeleton3D::get_modification_stack);
ClassDB::bind_method(D_METHOD("execute_modifications", "delta", "execution_mode"), &Skeleton3D::execute_modifications);
-#ifndef _3D_DISABLED
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "motion_scale", PROPERTY_HINT_RANGE, "0.001,10,0.001,or_greater"), "set_motion_scale", "get_motion_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_rest_only"), "set_show_rest_only", "is_show_rest_only");
+#ifndef _3D_DISABLED
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "animate_physical_bones"), "set_animate_physical_bones", "get_animate_physical_bones");
#endif // _3D_DISABLED
-#ifdef TOOLS_ENABLED
ADD_SIGNAL(MethodInfo("pose_updated"));
-#endif // TOOLS_ENABLED
-
ADD_SIGNAL(MethodInfo("bone_pose_changed", PropertyInfo(Variant::INT, "bone_idx")));
ADD_SIGNAL(MethodInfo("bone_enabled_changed", PropertyInfo(Variant::INT, "bone_idx")));
ADD_SIGNAL(MethodInfo("show_rest_only_changed"));
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index fcb8774c3d..8b69410a39 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -146,6 +146,7 @@ private:
bool rest_dirty = false;
bool show_rest_only = false;
+ float motion_scale = 1.0;
uint64_t version = 1;
@@ -211,6 +212,9 @@ public:
bool is_show_rest_only() const;
void clear_bones();
+ void set_motion_scale(float p_motion_scale);
+ float get_motion_scale() const;
+
// posing api
void set_bone_pose_position(int p_bone, const Vector3 &p_position);
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp
index 69917f6992..e76e85cfef 100644
--- a/scene/3d/visual_instance_3d.cpp
+++ b/scene/3d/visual_instance_3d.cpp
@@ -461,15 +461,16 @@ void GeometryInstance3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01,suffix:m"), "set_extra_cull_margin", "get_extra_cull_margin");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lod_bias", PROPERTY_HINT_RANGE, "0.001,128,0.001"), "set_lod_bias", "get_lod_bias");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_occlusion_culling"), "set_ignore_occlusion_culling", "is_ignoring_occlusion_culling");
+
ADD_GROUP("Global Illumination", "gi_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "gi_mode", PROPERTY_HINT_ENUM, "Disabled,Static (VoxelGI/SDFGI/LightmapGI),Dynamic (VoxelGI only)"), "set_gi_mode", "get_gi_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "gi_lightmap_scale", PROPERTY_HINT_ENUM, String::utf8("1×,2×,4×,8×")), "set_lightmap_scale", "get_lightmap_scale");
ADD_GROUP("Visibility Range", "visibility_range_");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_begin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,suffix:m"), "set_visibility_range_begin", "get_visibility_range_begin");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_begin_margin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,suffix:m"), "set_visibility_range_begin_margin", "get_visibility_range_begin_margin");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_end", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,suffix:m"), "set_visibility_range_end", "get_visibility_range_end");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_end_margin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,suffix:m"), "set_visibility_range_end_margin", "get_visibility_range_end_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_begin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_visibility_range_begin", "get_visibility_range_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_begin_margin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_visibility_range_begin_margin", "get_visibility_range_begin_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_end", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_visibility_range_end", "get_visibility_range_end");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "visibility_range_end_margin", PROPERTY_HINT_RANGE, "0.0,4096.0,0.01,or_greater,suffix:m"), "set_visibility_range_end_margin", "get_visibility_range_end_margin");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visibility_range_fade_mode", PROPERTY_HINT_ENUM, "Disabled,Self,Dependencies"), "set_visibility_range_fade_mode", "get_visibility_range_fade_mode");
BIND_ENUM_CONSTANT(SHADOW_CASTING_SETTING_OFF);
diff --git a/scene/3d/voxel_gi.h b/scene/3d/voxel_gi.h
index e1a38dd7a0..6d173dea87 100644
--- a/scene/3d/voxel_gi.h
+++ b/scene/3d/voxel_gi.h
@@ -49,9 +49,9 @@ class VoxelGIData : public Resource {
float energy = 1.0;
float bias = 1.5;
float normal_bias = 0.0;
- float propagation = 0.7;
+ float propagation = 0.5;
bool interior = false;
- bool use_two_bounces = false;
+ bool use_two_bounces = true;
protected:
static void _bind_methods();
diff --git a/scene/SCsub b/scene/SCsub
index a7b23af598..92288211bb 100644
--- a/scene/SCsub
+++ b/scene/SCsub
@@ -9,7 +9,6 @@ env.add_source_files(env.scene_sources, "*.cpp")
# Chain load SCsubs
SConscript("main/SCsub")
-SConscript("multiplayer/SCsub")
SConscript("gui/SCsub")
if not env["disable_3d"]:
SConscript("3d/SCsub")
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index d9a5adc883..b42e426f51 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -121,7 +121,7 @@ void AnimationNodeBlendSpace1D::add_blend_point(const Ref<AnimationRootNode> &p_
blend_points[p_at_index].node = p_node;
blend_points[p_at_index].position = p_position;
- blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), CONNECT_REFERENCE_COUNTED);
blend_points_used++;
emit_signal(SNAME("tree_changed"));
@@ -142,7 +142,7 @@ void AnimationNodeBlendSpace1D::set_blend_point_node(int p_point, const Ref<Anim
}
blend_points[p_point].node = p_node;
- blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace1D::_tree_changed), CONNECT_REFERENCE_COUNTED);
emit_signal(SNAME("tree_changed"));
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index 0f77befd9d..6b5851a977 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -80,7 +80,7 @@ void AnimationNodeBlendSpace2D::add_blend_point(const Ref<AnimationRootNode> &p_
blend_points[p_at_index].node = p_node;
blend_points[p_at_index].position = p_position;
- blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_at_index].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), CONNECT_REFERENCE_COUNTED);
blend_points_used++;
_queue_auto_triangles();
@@ -102,7 +102,7 @@ void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<Anim
blend_points[p_point].node->disconnect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed));
}
blend_points[p_point].node = p_node;
- blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ blend_points[p_point].node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendSpace2D::_tree_changed), CONNECT_REFERENCE_COUNTED);
emit_signal(SNAME("tree_changed"));
}
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index d0aac931c0..fe2fb1b7a1 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -844,8 +844,8 @@ void AnimationNodeBlendTree::add_node(const StringName &p_name, Ref<AnimationNod
emit_changed();
emit_signal(SNAME("tree_changed"));
- p_node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendTree::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
- p_node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed), varray(p_name), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("tree_changed", callable_mp(this, &AnimationNodeBlendTree::_tree_changed), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed).bind(p_name), CONNECT_REFERENCE_COUNTED);
}
Ref<AnimationNode> AnimationNodeBlendTree::get_node(const StringName &p_name) const {
@@ -945,7 +945,7 @@ void AnimationNodeBlendTree::rename_node(const StringName &p_name, const StringN
}
}
//connection must be done with new name
- nodes[p_new_name].node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed), varray(p_new_name), CONNECT_REFERENCE_COUNTED);
+ nodes[p_new_name].node->connect("changed", callable_mp(this, &AnimationNodeBlendTree::_node_changed).bind(p_new_name), CONNECT_REFERENCE_COUNTED);
emit_signal(SNAME("tree_changed"));
}
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index fbe23bedad..793967d9ad 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -723,7 +723,7 @@ void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<Animation
emit_changed();
emit_signal(SNAME("tree_changed"));
- p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), CONNECT_REFERENCE_COUNTED);
}
void AnimationNodeStateMachine::replace_node(const StringName &p_name, Ref<AnimationNode> p_node) {
@@ -743,7 +743,7 @@ void AnimationNodeStateMachine::replace_node(const StringName &p_name, Ref<Anima
emit_changed();
emit_signal(SNAME("tree_changed"));
- p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), CONNECT_REFERENCE_COUNTED);
}
bool AnimationNodeStateMachine::can_edit_node(const StringName &p_name) const {
@@ -830,20 +830,12 @@ void AnimationNodeStateMachine::rename_node(const StringName &p_name, const Stri
anodesm->state_machine_name = p_new_name;
}
- for (int i = 0; i < transitions.size(); i++) {
- if (transitions[i].local_from == p_name) {
- _rename_transition(transitions[i].from, String(transitions[i].from).replace_first(p_name, p_new_name));
- }
-
- if (transitions[i].local_to == p_name) {
- _rename_transition(transitions[i].to, String(transitions[i].to).replace_first(p_name, p_new_name));
- }
- }
+ _rename_transitions(p_name, p_new_name);
emit_signal("tree_changed");
}
-void AnimationNodeStateMachine::_rename_transition(const StringName &p_name, const StringName &p_new_name) {
+void AnimationNodeStateMachine::_rename_transitions(const StringName &p_name, const StringName &p_new_name) {
if (updating_transitions) {
return;
}
@@ -854,12 +846,16 @@ void AnimationNodeStateMachine::_rename_transition(const StringName &p_name, con
Vector<String> path = String(transitions[i].to).split("/");
if (path.size() > 1) {
if (path[0] == "..") {
- prev_state_machine->_rename_transition(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name);
+ prev_state_machine->_rename_transitions(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name);
} else {
- ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_to].node)->_rename_transition("../" + p_name, "../" + p_new_name);
+ ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_to].node)->_rename_transitions("../" + p_name, "../" + p_new_name);
}
}
+ if (transitions[i].local_from == p_name) {
+ transitions.write[i].local_from = p_new_name;
+ }
+
transitions.write[i].from = p_new_name;
}
@@ -867,12 +863,16 @@ void AnimationNodeStateMachine::_rename_transition(const StringName &p_name, con
Vector<String> path = String(transitions[i].from).split("/");
if (path.size() > 1) {
if (path[0] == "..") {
- prev_state_machine->_rename_transition(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name);
+ prev_state_machine->_rename_transitions(String(state_machine_name) + "/" + p_name, String(state_machine_name) + "/" + p_new_name);
} else {
- ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_from].node)->_rename_transition("../" + p_name, "../" + p_new_name);
+ ((Ref<AnimationNodeStateMachine>)states[transitions[i].local_from].node)->_rename_transitions("../" + p_name, "../" + p_new_name);
}
}
+ if (transitions[i].local_to == p_name) {
+ transitions.write[i].local_to = p_new_name;
+ }
+
transitions.write[i].to = p_new_name;
}
@@ -1032,7 +1032,7 @@ void AnimationNodeStateMachine::add_transition(const StringName &p_from, const S
tr.local_to = local_to;
tr.transition = p_transition;
- tr.transition->connect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ tr.transition->connect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), CONNECT_REFERENCE_COUNTED);
transitions.push_back(tr);
diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h
index d4e58ca3d3..ead914db7a 100644
--- a/scene/animation/animation_node_state_machine.h
+++ b/scene/animation/animation_node_state_machine.h
@@ -185,7 +185,7 @@ private:
void _tree_changed();
void _remove_transition(const Ref<AnimationNodeStateMachineTransition> p_transition);
- void _rename_transition(const StringName &p_name, const StringName &p_new_name);
+ void _rename_transitions(const StringName &p_name, const StringName &p_new_name);
bool _can_connect(const StringName &p_name, Vector<AnimationNodeStateMachine *> p_parents = Vector<AnimationNodeStateMachine *>());
StringName _get_shortest_path(const StringName &p_path) const;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index df6ef16b4f..636c9e26a5 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -325,7 +325,7 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov
{
if (!child->is_connected("tree_exiting", callable_mp(this, &AnimationPlayer::_node_removed))) {
- child->connect("tree_exiting", callable_mp(this, &AnimationPlayer::_node_removed), make_binds(child), CONNECT_ONESHOT);
+ child->connect("tree_exiting", callable_mp(this, &AnimationPlayer::_node_removed).bind(child), CONNECT_ONESHOT);
}
}
@@ -454,6 +454,23 @@ static void _call_object(Object *p_object, const StringName &p_method, const Vec
}
}
+Variant AnimationPlayer::_post_process_key_value(const Ref<Animation> &p_anim, int p_track, Variant p_value, const Object *p_object, int p_object_idx) {
+ switch (p_anim->track_get_type(p_track)) {
+#ifndef _3D_DISABLED
+ case Animation::TYPE_POSITION_3D: {
+ if (p_object_idx >= 0) {
+ const Skeleton3D *skel = Object::cast_to<Skeleton3D>(p_object);
+ return Vector3(p_value) * skel->get_motion_scale();
+ }
+ return p_value;
+ } break;
+#endif // _3D_DISABLED
+ default: {
+ } break;
+ }
+ return p_value;
+}
+
void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double p_time, double p_delta, float p_interp, bool p_is_current, bool p_seeked, bool p_started, int p_pingponged) {
_ensure_node_caches(p_anim);
ERR_FAIL_COND(p_anim->node_cache.size() != p_anim->animation->get_track_count());
@@ -498,6 +515,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (err != OK) {
continue;
}
+ loc = _post_process_key_value(a, i, loc, nc->node_3d, nc->bone_idx);
if (nc->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_size >= NODE_CACHE_UPDATE_MAX);
@@ -525,6 +543,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (err != OK) {
continue;
}
+ rot = _post_process_key_value(a, i, rot, nc->node_3d, nc->bone_idx);
if (nc->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_size >= NODE_CACHE_UPDATE_MAX);
@@ -552,6 +571,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (err != OK) {
continue;
}
+ scale = _post_process_key_value(a, i, scale, nc->node_3d, nc->bone_idx);
if (nc->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_size >= NODE_CACHE_UPDATE_MAX);
@@ -579,6 +599,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (err != OK) {
continue;
}
+ blend = _post_process_key_value(a, i, blend, nc->node_blend_shape, nc->blend_shape_idx);
if (nc->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_size >= NODE_CACHE_UPDATE_MAX);
@@ -631,9 +652,9 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (p_time < first_key_time) {
double c = Math::ease(p_time / first_key_time, transition);
Variant first_value = a->track_get_key_value(i, first_key);
+ first_value = _post_process_key_value(a, i, first_value, nc->node);
Variant interp_value;
Variant::interpolate(pa->capture, first_value, c, interp_value);
-
if (pa->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_prop_size >= NODE_CACHE_UPDATE_MAX);
cache_update_prop[cache_update_prop_size++] = pa;
@@ -653,6 +674,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (value == Variant()) {
continue;
}
+ value = _post_process_key_value(a, i, value, nc->node);
if (pa->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_prop_size >= NODE_CACHE_UPDATE_MAX);
@@ -669,6 +691,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
for (int &F : indices) {
Variant value = a->track_get_key_value(i, F);
+ value = _post_process_key_value(a, i, value, nc->node);
switch (pa->special) {
case SP_NONE: {
bool valid;
@@ -753,6 +776,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
TrackNodeCache::BezierAnim *ba = &E->value;
real_t bezier = a->bezier_track_interpolate(i, p_time);
+ bezier = _post_process_key_value(a, i, bezier, nc->node);
if (ba->accum_pass != accum_pass) {
ERR_CONTINUE(cache_update_bezier_size >= NODE_CACHE_UPDATE_MAX);
cache_update_bezier[cache_update_bezier_size++] = ba;
@@ -1177,11 +1201,15 @@ void AnimationPlayer::_animation_process(double p_delta) {
emit_signal(SceneStringNames::get_singleton()->animation_changed, old, new_name);
}
} else {
- //stop();
playing = false;
_set_process(false);
if (end_notify) {
emit_signal(SceneStringNames::get_singleton()->animation_finished, playback.assigned);
+
+ if (movie_quit_on_finish && OS::get_singleton()->has_feature("movie")) {
+ print_line(vformat("Movie Maker mode is enabled. Quitting on animation finish as requested by: %s", get_path()));
+ get_tree()->quit();
+ }
}
}
end_reached = false;
@@ -1349,9 +1377,9 @@ Error AnimationPlayer::add_animation_library(const StringName &p_name, const Ref
animation_libraries.insert(insert_pos, ald);
- ald.library->connect(SNAME("animation_added"), callable_mp(this, &AnimationPlayer::_animation_added), varray(p_name));
- ald.library->connect(SNAME("animation_removed"), callable_mp(this, &AnimationPlayer::_animation_added), varray(p_name));
- ald.library->connect(SNAME("animation_renamed"), callable_mp(this, &AnimationPlayer::_animation_renamed), varray(p_name));
+ ald.library->connect(SNAME("animation_added"), callable_mp(this, &AnimationPlayer::_animation_added).bind(p_name));
+ ald.library->connect(SNAME("animation_removed"), callable_mp(this, &AnimationPlayer::_animation_added).bind(p_name));
+ ald.library->connect(SNAME("animation_renamed"), callable_mp(this, &AnimationPlayer::_animation_renamed).bind(p_name));
_animation_set_cache_update();
@@ -1389,7 +1417,7 @@ void AnimationPlayer::remove_animation_library(const StringName &p_name) {
}
void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) {
- Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, callable_mp(this, &AnimationPlayer::_animation_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ Ref<Animation>(p_anim)->connect(SceneStringNames::get_singleton()->tracks_changed, callable_mp(this, &AnimationPlayer::_animation_changed), CONNECT_REFERENCE_COUNTED);
}
void AnimationPlayer::_unref_anim(const Ref<Animation> &p_anim) {
@@ -1415,9 +1443,9 @@ void AnimationPlayer::rename_animation_library(const StringName &p_name, const S
animation_libraries[i].library->disconnect(SNAME("animation_removed"), callable_mp(this, &AnimationPlayer::_animation_added));
animation_libraries[i].library->disconnect(SNAME("animation_renamed"), callable_mp(this, &AnimationPlayer::_animation_renamed));
- animation_libraries[i].library->connect(SNAME("animation_added"), callable_mp(this, &AnimationPlayer::_animation_added), varray(p_new_name));
- animation_libraries[i].library->connect(SNAME("animation_removed"), callable_mp(this, &AnimationPlayer::_animation_added), varray(p_new_name));
- animation_libraries[i].library->connect(SNAME("animation_renamed"), callable_mp(this, &AnimationPlayer::_animation_renamed), varray(p_new_name));
+ animation_libraries[i].library->connect(SNAME("animation_added"), callable_mp(this, &AnimationPlayer::_animation_added).bind(p_new_name));
+ animation_libraries[i].library->connect(SNAME("animation_removed"), callable_mp(this, &AnimationPlayer::_animation_added).bind(p_new_name));
+ animation_libraries[i].library->connect(SNAME("animation_renamed"), callable_mp(this, &AnimationPlayer::_animation_renamed).bind(p_new_name));
for (const KeyValue<StringName, Ref<Animation>> &K : animation_libraries[i].library->animations) {
StringName old_name = p_name == StringName() ? K.key : StringName(String(p_name) + "/" + String(K.key));
@@ -1868,6 +1896,14 @@ AnimationPlayer::AnimationMethodCallMode AnimationPlayer::get_method_call_mode()
return method_call_mode;
}
+void AnimationPlayer::set_movie_quit_on_finish_enabled(bool p_enabled) {
+ movie_quit_on_finish = p_enabled;
+}
+
+bool AnimationPlayer::is_movie_quit_on_finish_enabled() const {
+ return movie_quit_on_finish;
+}
+
void AnimationPlayer::_set_process(bool p_process, bool p_force) {
if (processing == p_process && !p_force) {
return;
@@ -2088,6 +2124,9 @@ void AnimationPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_method_call_mode", "mode"), &AnimationPlayer::set_method_call_mode);
ClassDB::bind_method(D_METHOD("get_method_call_mode"), &AnimationPlayer::get_method_call_mode);
+ ClassDB::bind_method(D_METHOD("set_movie_quit_on_finish_enabled"), &AnimationPlayer::set_movie_quit_on_finish_enabled);
+ ClassDB::bind_method(D_METHOD("is_movie_quit_on_finish_enabled"), &AnimationPlayer::is_movie_quit_on_finish_enabled);
+
ClassDB::bind_method(D_METHOD("get_current_animation_position"), &AnimationPlayer::get_current_animation_position);
ClassDB::bind_method(D_METHOD("get_current_animation_length"), &AnimationPlayer::get_current_animation_length);
@@ -2109,6 +2148,8 @@ void AnimationPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::INT, "method_call_mode", PROPERTY_HINT_ENUM, "Deferred,Immediate"), "set_method_call_mode", "get_method_call_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "movie_quit_on_finish"), "set_movie_quit_on_finish_enabled", "is_movie_quit_on_finish_enabled");
+
ADD_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING_NAME, "anim_name")));
ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING_NAME, "old_name"), PropertyInfo(Variant::STRING_NAME, "new_name")));
ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING_NAME, "anim_name")));
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 0d3ce5977e..b6d8dab1ed 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -262,6 +262,7 @@ private:
bool reset_on_save = true;
AnimationProcessCallback process_callback = ANIMATION_PROCESS_IDLE;
AnimationMethodCallMode method_call_mode = ANIMATION_METHOD_CALL_DEFERRED;
+ bool movie_quit_on_finish = false;
bool processing = false;
bool active = true;
@@ -316,6 +317,8 @@ protected:
static void _bind_methods();
+ virtual Variant _post_process_key_value(const Ref<Animation> &p_anim, int p_track, Variant p_value, const Object *p_object, int p_object_idx = -1);
+
public:
StringName find_animation(const Ref<Animation> &p_animation) const;
StringName find_animation_library(const Ref<Animation> &p_animation) const;
@@ -371,6 +374,9 @@ public:
void set_method_call_mode(AnimationMethodCallMode p_mode);
AnimationMethodCallMode get_method_call_mode() const;
+ void set_movie_quit_on_finish_enabled(bool p_enabled);
+ bool is_movie_quit_on_finish_enabled() const;
+
void seek(double p_time, bool p_update = false);
void seek_delta(double p_time, float p_delta);
float get_current_animation_position() const;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 4b80f571ae..14cf64afad 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -589,7 +589,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
}
if (!child->is_connected("tree_exited", callable_mp(this, &AnimationTree::_node_removed))) {
- child->connect("tree_exited", callable_mp(this, &AnimationTree::_node_removed), varray(child));
+ child->connect("tree_exited", callable_mp(this, &AnimationTree::_node_removed).bind(child));
}
switch (track_type) {
@@ -1054,7 +1054,9 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ loc[0] = _post_process_key_value(a, i, loc[0], t->object, t->bone_idx);
a->position_track_interpolate(i, (double)a->get_length(), &loc[1]);
+ loc[1] = _post_process_key_value(a, i, loc[1], t->object, t->bone_idx);
t->loc += (loc[1] - loc[0]) * blend;
prev_time = 0;
}
@@ -1064,7 +1066,9 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ loc[0] = _post_process_key_value(a, i, loc[0], t->object, t->bone_idx);
a->position_track_interpolate(i, 0, &loc[1]);
+ loc[1] = _post_process_key_value(a, i, loc[1], t->object, t->bone_idx);
t->loc += (loc[1] - loc[0]) * blend;
prev_time = (double)a->get_length();
}
@@ -1074,8 +1078,10 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ loc[0] = _post_process_key_value(a, i, loc[0], t->object, t->bone_idx);
a->position_track_interpolate(i, time, &loc[1]);
+ loc[1] = _post_process_key_value(a, i, loc[1], t->object, t->bone_idx);
t->loc += (loc[1] - loc[0]) * blend;
prev_time = !backward ? 0 : (double)a->get_length();
@@ -1092,6 +1098,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ loc = _post_process_key_value(a, i, loc, t->object, t->bone_idx);
t->loc += (loc - t->init_loc) * blend;
}
@@ -1150,7 +1157,9 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ rot[0] = _post_process_key_value(a, i, rot[0], t->object, t->bone_idx);
a->rotation_track_interpolate(i, (double)a->get_length(), &rot[1]);
+ rot[1] = _post_process_key_value(a, i, rot[1], t->object, t->bone_idx);
t->rot = (t->rot * Quaternion().slerp(rot[0].inverse() * rot[1], blend)).normalized();
prev_time = 0;
}
@@ -1160,6 +1169,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ rot[0] = _post_process_key_value(a, i, rot[0], t->object, t->bone_idx);
a->rotation_track_interpolate(i, 0, &rot[1]);
t->rot = (t->rot * Quaternion().slerp(rot[0].inverse() * rot[1], blend)).normalized();
prev_time = (double)a->get_length();
@@ -1170,8 +1180,10 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ rot[0] = _post_process_key_value(a, i, rot[0], t->object, t->bone_idx);
a->rotation_track_interpolate(i, time, &rot[1]);
+ rot[1] = _post_process_key_value(a, i, rot[1], t->object, t->bone_idx);
t->rot = (t->rot * Quaternion().slerp(rot[0].inverse() * rot[1], blend)).normalized();
prev_time = !backward ? 0 : (double)a->get_length();
@@ -1188,6 +1200,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ rot = _post_process_key_value(a, i, rot, t->object, t->bone_idx);
t->rot = (t->rot * Quaternion().slerp(t->init_rot.inverse() * rot, blend)).normalized();
}
@@ -1246,8 +1259,10 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ scale[0] = _post_process_key_value(a, i, scale[0], t->object, t->bone_idx);
a->scale_track_interpolate(i, (double)a->get_length(), &scale[1]);
t->scale += (scale[1] - scale[0]) * blend;
+ scale[1] = _post_process_key_value(a, i, scale[1], t->object, t->bone_idx);
prev_time = 0;
}
} else {
@@ -1256,7 +1271,9 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ scale[0] = _post_process_key_value(a, i, scale[0], t->object, t->bone_idx);
a->scale_track_interpolate(i, 0, &scale[1]);
+ scale[1] = _post_process_key_value(a, i, scale[1], t->object, t->bone_idx);
t->scale += (scale[1] - scale[0]) * blend;
prev_time = (double)a->get_length();
}
@@ -1266,8 +1283,10 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ scale[0] = _post_process_key_value(a, i, scale[0], t->object, t->bone_idx);
a->scale_track_interpolate(i, time, &scale[1]);
+ scale[1] = _post_process_key_value(a, i, scale[1], t->object, t->bone_idx);
t->scale += (scale[1] - scale[0]) * blend;
prev_time = !backward ? 0 : (double)a->get_length();
@@ -1284,6 +1303,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ scale = _post_process_key_value(a, i, scale, t->object, t->bone_idx);
t->scale += (scale - t->init_scale) * blend;
}
@@ -1306,6 +1326,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (err != OK) {
continue;
}
+ value = _post_process_key_value(a, i, value, t->object, t->shape_index);
t->value += (value - t->init_value) * blend;
#endif // _3D_DISABLED
@@ -1317,6 +1338,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (update_mode == Animation::UPDATE_CONTINUOUS || update_mode == Animation::UPDATE_CAPTURE) {
Variant value = a->value_track_interpolate(i, time);
+ value = _post_process_key_value(a, i, value, t->object);
if (value == Variant()) {
continue;
@@ -1344,12 +1366,14 @@ void AnimationTree::_process_graph(double p_delta) {
continue;
}
Variant value = a->track_get_key_value(i, idx);
+ value = _post_process_key_value(a, i, value, t->object);
t->object->set_indexed(t->subpath, value);
} else {
List<int> indices;
a->value_track_get_key_indices(i, time, delta, &indices, pingponged);
for (int &F : indices) {
Variant value = a->track_get_key_value(i, F);
+ value = _post_process_key_value(a, i, value, t->object);
t->object->set_indexed(t->subpath, value);
}
}
@@ -1388,6 +1412,7 @@ void AnimationTree::_process_graph(double p_delta) {
TrackCacheBezier *t = static_cast<TrackCacheBezier *>(track);
real_t bezier = a->bezier_track_interpolate(i, time);
+ bezier = _post_process_key_value(a, i, bezier, t->object);
if (t->process_pass != process_pass) {
t->process_pass = process_pass;
@@ -1663,6 +1688,23 @@ void AnimationTree::_process_graph(double p_delta) {
}
}
+Variant AnimationTree::_post_process_key_value(const Ref<Animation> &p_anim, int p_track, Variant p_value, const Object *p_object, int p_object_idx) {
+ switch (p_anim->track_get_type(p_track)) {
+#ifndef _3D_DISABLED
+ case Animation::TYPE_POSITION_3D: {
+ if (p_object_idx >= 0) {
+ const Skeleton3D *skel = Object::cast_to<Skeleton3D>(p_object);
+ return Vector3(p_value) * skel->get_motion_scale();
+ }
+ return p_value;
+ } break;
+#endif // _3D_DISABLED
+ default: {
+ } break;
+ }
+ return p_value;
+}
+
void AnimationTree::advance(real_t p_time) {
_process_graph(p_time);
}
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index d82fed9dc2..99851d140e 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -321,6 +321,8 @@ protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual Variant _post_process_key_value(const Ref<Animation> &p_anim, int p_track, Variant p_value, const Object *p_object, int p_object_idx = -1);
+
public:
void set_tree_root(const Ref<AnimationNode> &p_root);
Ref<AnimationNode> get_tree_root() const;
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 72f7589224..dbc71cd9e7 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -864,7 +864,7 @@ bool CallbackTweener::step(float &r_delta) {
if (elapsed_time >= delay) {
Variant result;
Callable::CallError ce;
- callback.call(nullptr, 0, result, ce);
+ callback.callp(nullptr, 0, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(false, "Error calling method from CallbackTweener: " + Variant::get_callable_error_text(callback, nullptr, 0, ce));
}
@@ -935,7 +935,7 @@ bool MethodTweener::step(float &r_delta) {
Variant result;
Callable::CallError ce;
- callback.call(argptr, 1, result, ce);
+ callback.callp(argptr, 1, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
ERR_FAIL_V_MSG(false, "Error calling method from MethodTweener: " + Variant::get_callable_error_text(callback, argptr, 1, ce));
}
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index e9c33b1839..4c5a63e52c 100644
--- a/scene/debugger/scene_debugger.cpp
+++ b/scene/debugger/scene_debugger.cpp
@@ -299,7 +299,7 @@ void SceneDebugger::_save_node(ObjectID id, const String &p_path) {
Ref<PackedScene> ps = memnew(PackedScene);
ps->pack(node);
- ResourceSaver::save(p_path, ps);
+ ResourceSaver::save(ps, p_path);
}
void SceneDebugger::_send_object_id(ObjectID p_id, int p_max_size) {
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index bfe5ee335b..e2ead6415a 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -357,7 +357,7 @@ void ColorPicker::create_slider(GridContainer *gc, int idx) {
s->set_h_size_flags(SIZE_EXPAND_FILL);
s->connect("value_changed", callable_mp(this, &ColorPicker::_value_changed));
- s->connect("draw", callable_mp(this, &ColorPicker::_slider_draw), make_binds(idx));
+ s->connect("draw", callable_mp(this, &ColorPicker::_slider_draw).bind(idx));
if (idx < SLIDER_COUNT) {
sliders[idx] = s;
@@ -515,7 +515,7 @@ void ColorPicker::_add_preset_button(int p_size, const Color &p_color) {
ColorPresetButton *btn_preset = memnew(ColorPresetButton(p_color));
btn_preset->set_preset_color(p_color);
btn_preset->set_custom_minimum_size(Size2(p_size, p_size));
- btn_preset->connect("gui_input", callable_mp(this, &ColorPicker::_preset_input), varray(p_color));
+ btn_preset->connect("gui_input", callable_mp(this, &ColorPicker::_preset_input).bind(p_color));
btn_preset->set_tooltip(vformat(RTR("Color: #%s\nLMB: Apply color\nRMB: Remove preset"), p_color.to_html(p_color.a < 1)));
preset_container->add_child(btn_preset);
}
@@ -998,10 +998,10 @@ void ColorPicker::_w_input(const Ref<InputEvent> &p_event) {
h = y / w_edit->get_size().height;
}
- if (current_mode == MODE_HSV) {
- color.set_hsv(h, s, v, color.a);
- } else if (current_mode == MODE_OKHSL) {
+ if (actual_shape == SHAPE_OKHSL_CIRCLE) {
color.set_ok_hsl(h, s, v, color.a);
+ } else {
+ color.set_hsv(h, s, v, color.a);
}
last_color = color;
@@ -1075,7 +1075,7 @@ void ColorPicker::_screen_pick_pressed() {
screen->set_default_cursor_shape(CURSOR_POINTING_HAND);
screen->connect("gui_input", callable_mp(this, &ColorPicker::_screen_input));
// It immediately toggles off in the first press otherwise.
- screen->call_deferred(SNAME("connect"), "hidden", Callable(btn_pick, "set_pressed"), varray(false));
+ screen->call_deferred(SNAME("connect"), "hidden", Callable(btn_pick, "set_pressed").bind(false));
} else {
screen->show();
}
@@ -1204,11 +1204,11 @@ ColorPicker::ColorPicker() :
uv_edit = memnew(Control);
hb_edit->add_child(uv_edit);
- uv_edit->connect("gui_input", callable_mp(this, &ColorPicker::_uv_input), make_binds(uv_edit));
+ uv_edit->connect("gui_input", callable_mp(this, &ColorPicker::_uv_input).bind(uv_edit));
uv_edit->set_mouse_filter(MOUSE_FILTER_PASS);
uv_edit->set_h_size_flags(SIZE_EXPAND_FILL);
uv_edit->set_v_size_flags(SIZE_EXPAND_FILL);
- uv_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(0, uv_edit));
+ uv_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw).bind(0, uv_edit));
HBoxContainer *hb_smpl = memnew(HBoxContainer);
add_child(hb_smpl, false, INTERNAL_MODE_FRONT);
@@ -1295,19 +1295,19 @@ ColorPicker::ColorPicker() :
wheel = memnew(Control);
wheel_margin->add_child(wheel);
wheel->set_mouse_filter(MOUSE_FILTER_PASS);
- wheel->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(2, wheel));
+ wheel->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw).bind(2, wheel));
wheel_uv = memnew(Control);
wheel_margin->add_child(wheel_uv);
- wheel_uv->connect("gui_input", callable_mp(this, &ColorPicker::_uv_input), make_binds(wheel_uv));
- wheel_uv->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(0, wheel_uv));
+ wheel_uv->connect("gui_input", callable_mp(this, &ColorPicker::_uv_input).bind(wheel_uv));
+ wheel_uv->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw).bind(0, wheel_uv));
w_edit = memnew(Control);
hb_edit->add_child(w_edit);
w_edit->set_h_size_flags(SIZE_FILL);
w_edit->set_v_size_flags(SIZE_EXPAND_FILL);
w_edit->connect("gui_input", callable_mp(this, &ColorPicker::_w_input));
- w_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(1, w_edit));
+ w_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw).bind(1, w_edit));
_update_controls();
updating = false;
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 686045901c..06aa913eb1 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -50,6 +50,9 @@
#include "editor/plugins/control_editor_plugin.h"
#endif
+// Editor plugin interoperability.
+
+// TODO: Decouple controls from their editor plugin and get rid of this.
#ifdef TOOLS_ENABLED
Dictionary Control::_edit_get_state() const {
Dictionary s;
@@ -181,6 +184,49 @@ Size2 Control::_edit_get_minimum_size() const {
}
#endif
+// Editor integration.
+
+void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
+ Node::get_argument_options(p_function, p_idx, r_options);
+
+ if (p_idx == 0) {
+ List<StringName> sn;
+ String pf = p_function;
+ if (pf == "add_theme_color_override" || pf == "has_theme_color" || pf == "has_theme_color_override" || pf == "get_theme_color") {
+ Theme::get_default()->get_color_list(get_class(), &sn);
+ } else if (pf == "add_theme_style_override" || pf == "has_theme_style" || pf == "has_theme_style_override" || pf == "get_theme_style") {
+ Theme::get_default()->get_stylebox_list(get_class(), &sn);
+ } else if (pf == "add_theme_font_override" || pf == "has_theme_font" || pf == "has_theme_font_override" || pf == "get_theme_font") {
+ Theme::get_default()->get_font_list(get_class(), &sn);
+ } else if (pf == "add_theme_font_size_override" || pf == "has_theme_font_size" || pf == "has_theme_font_size_override" || pf == "get_theme_font_size") {
+ Theme::get_default()->get_font_size_list(get_class(), &sn);
+ } else if (pf == "add_theme_constant_override" || pf == "has_theme_constant" || pf == "has_theme_constant_override" || pf == "get_theme_constant") {
+ Theme::get_default()->get_constant_list(get_class(), &sn);
+ }
+
+ sn.sort_custom<StringName::AlphCompare>();
+ for (const StringName &name : sn) {
+ r_options->push_back(String(name).quote());
+ }
+ }
+}
+
+TypedArray<String> Control::get_configuration_warnings() const {
+ TypedArray<String> warnings = Node::get_configuration_warnings();
+
+ if (data.mouse_filter == MOUSE_FILTER_IGNORE && !data.tooltip.is_empty()) {
+ warnings.push_back(RTR("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\"."));
+ }
+
+ return warnings;
+}
+
+bool Control::is_text_field() const {
+ return false;
+}
+
+// Dynamic properties.
+
String Control::properties_managed_by_container[] = {
"offset_left",
"offset_top",
@@ -196,58 +242,6 @@ String Control::properties_managed_by_container[] = {
"size"
};
-void Control::accept_event() {
- if (is_inside_tree()) {
- get_viewport()->_gui_accept_event();
- }
-}
-
-void Control::set_custom_minimum_size(const Size2 &p_custom) {
- if (p_custom == data.custom_minimum_size) {
- return;
- }
- data.custom_minimum_size = p_custom;
- update_minimum_size();
-}
-
-Size2 Control::get_custom_minimum_size() const {
- return data.custom_minimum_size;
-}
-
-void Control::_update_minimum_size_cache() {
- Size2 minsize = get_minimum_size();
- minsize.x = MAX(minsize.x, data.custom_minimum_size.x);
- minsize.y = MAX(minsize.y, data.custom_minimum_size.y);
-
- bool size_changed = false;
- if (data.minimum_size_cache != minsize) {
- size_changed = true;
- }
-
- data.minimum_size_cache = minsize;
- data.minimum_size_valid = true;
-
- if (size_changed) {
- update_minimum_size();
- }
-}
-
-Size2 Control::get_combined_minimum_size() const {
- if (!data.minimum_size_valid) {
- const_cast<Control *>(this)->_update_minimum_size_cache();
- }
- return data.minimum_size_cache;
-}
-
-Transform2D Control::_get_internal_transform() const {
- Transform2D rot_scale;
- rot_scale.set_rotation_and_scale(data.rotation, data.scale);
- Transform2D offset;
- offset.set_origin(-data.pivot_offset);
-
- return offset.affine_inverse() * (rot_scale * offset);
-}
-
bool Control::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
if (!name.begins_with("theme_override")) {
@@ -258,21 +252,21 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) {
if (name.begins_with("theme_override_icons/")) {
String dname = name.get_slicec('/', 1);
if (data.icon_override.has(dname)) {
- data.icon_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+ data.icon_override[dname]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
}
data.icon_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("theme_override_styles/")) {
String dname = name.get_slicec('/', 1);
if (data.style_override.has(dname)) {
- data.style_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+ data.style_override[dname]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
}
data.style_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
} else if (name.begins_with("theme_override_fonts/")) {
String dname = name.get_slicec('/', 1);
if (data.font_override.has(dname)) {
- data.font_override[dname]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+ data.font_override[dname]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
}
data.font_override.erase(dname);
notification(NOTIFICATION_THEME_CHANGED);
@@ -318,21 +312,6 @@ bool Control::_set(const StringName &p_name, const Variant &p_value) {
return true;
}
-void Control::_update_minimum_size() {
- if (!is_inside_tree()) {
- return;
- }
-
- Size2 minsize = get_combined_minimum_size();
- data.updating_last_minimum_size = false;
-
- if (minsize != data.last_minimum_size) {
- data.last_minimum_size = minsize;
- _size_changed();
- emit_signal(SceneStringNames::get_singleton()->minimum_size_changed);
- }
-}
-
bool Control::_get(const StringName &p_name, Variant &r_ret) const {
String sname = p_name;
if (!sname.begins_with("theme_override")) {
@@ -586,6 +565,12 @@ void Control::_validate_property(PropertyInfo &property) const {
}
}
+// Global relations.
+
+bool Control::is_top_level_control() const {
+ return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_top_level());
+}
+
Control *Control::get_parent_control() const {
return data.parent;
}
@@ -594,97 +579,64 @@ Window *Control::get_parent_window() const {
return data.parent_window;
}
-void Control::set_layout_direction(Control::LayoutDirection p_direction) {
- ERR_FAIL_INDEX((int)p_direction, 4);
-
- data.layout_dir = p_direction;
- data.is_rtl_dirty = true;
-
- propagate_notification(NOTIFICATION_LAYOUT_DIRECTION_CHANGED);
-}
+Control *Control::get_root_parent_control() const {
+ const CanvasItem *ci = this;
+ const Control *root = this;
-Control::LayoutDirection Control::get_layout_direction() const {
- return data.layout_dir;
-}
+ while (ci) {
+ const Control *c = Object::cast_to<Control>(ci);
+ if (c) {
+ root = c;
-bool Control::is_layout_rtl() const {
- if (data.is_rtl_dirty) {
- const_cast<Control *>(this)->data.is_rtl_dirty = false;
- if (data.layout_dir == LAYOUT_DIRECTION_INHERITED) {
- Window *parent_window = get_parent_window();
- Control *parent_control = get_parent_control();
- if (parent_control) {
- const_cast<Control *>(this)->data.is_rtl = parent_control->is_layout_rtl();
- } else if (parent_window) {
- const_cast<Control *>(this)->data.is_rtl = parent_window->is_layout_rtl();
- } else {
- if (GLOBAL_GET(SNAME("internationalization/rendering/force_right_to_left_layout_direction"))) {
- const_cast<Control *>(this)->data.is_rtl = true;
- } else {
- String locale = TranslationServer::get_singleton()->get_tool_locale();
- const_cast<Control *>(this)->data.is_rtl = TS->is_locale_right_to_left(locale);
- }
- }
- } else if (data.layout_dir == LAYOUT_DIRECTION_LOCALE) {
- if (GLOBAL_GET(SNAME("internationalization/rendering/force_right_to_left_layout_direction"))) {
- const_cast<Control *>(this)->data.is_rtl = true;
- } else {
- String locale = TranslationServer::get_singleton()->get_tool_locale();
- const_cast<Control *>(this)->data.is_rtl = TS->is_locale_right_to_left(locale);
+ if (c->data.RI || c->is_top_level_control()) {
+ break;
}
- } else {
- const_cast<Control *>(this)->data.is_rtl = (data.layout_dir == LAYOUT_DIRECTION_RTL);
}
- }
- return data.is_rtl;
-}
-void Control::set_auto_translate(bool p_enable) {
- if (p_enable == data.auto_translate) {
- return;
+ ci = ci->get_parent_item();
}
- data.auto_translate = p_enable;
-
- notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
-}
-
-bool Control::is_auto_translating() const {
- return data.auto_translate;
-}
-
-void Control::_clear_size_warning() {
- data.size_warning = false;
+ return const_cast<Control *>(root);
}
-//moved theme configuration here, so controls can set up even if still not inside active scene
-
-void Control::add_child_notify(Node *p_child) {
- Control *child_c = Object::cast_to<Control>(p_child);
-
- if (child_c && child_c->data.theme.is_null() && (data.theme_owner || data.theme_owner_window)) {
- _propagate_theme_changed(child_c, data.theme_owner, data.theme_owner_window); //need to propagate here, since many controls may require setting up stuff
+Rect2 Control::get_parent_anchorable_rect() const {
+ if (!is_inside_tree()) {
+ return Rect2();
}
- Window *child_w = Object::cast_to<Window>(p_child);
+ Rect2 parent_rect;
+ if (data.parent_canvas_item) {
+ parent_rect = data.parent_canvas_item->get_anchorable_rect();
+ } else {
+#ifdef TOOLS_ENABLED
+ Node *edited_root = get_tree()->get_edited_scene_root();
+ if (edited_root && (this == edited_root || edited_root->is_ancestor_of(this))) {
+ parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
+ } else {
+ parent_rect = get_viewport()->get_visible_rect();
+ }
- if (child_w && child_w->theme.is_null() && (data.theme_owner || data.theme_owner_window)) {
- _propagate_theme_changed(child_w, data.theme_owner, data.theme_owner_window); //need to propagate here, since many controls may require setting up stuff
+#else
+ parent_rect = get_viewport()->get_visible_rect();
+#endif
}
+
+ return parent_rect;
}
-void Control::remove_child_notify(Node *p_child) {
- Control *child_c = Object::cast_to<Control>(p_child);
+Size2 Control::get_parent_area_size() const {
+ return get_parent_anchorable_rect().size;
+}
- if (child_c && (child_c->data.theme_owner || child_c->data.theme_owner_window) && child_c->data.theme.is_null()) {
- _propagate_theme_changed(child_c, nullptr, nullptr);
- }
+// Positioning and sizing.
- Window *child_w = Object::cast_to<Window>(p_child);
+Transform2D Control::_get_internal_transform() const {
+ Transform2D rot_scale;
+ rot_scale.set_rotation_and_scale(data.rotation, data.scale);
+ Transform2D offset;
+ offset.set_origin(-data.pivot_offset);
- if (child_w && (child_w->theme_owner || child_w->theme_owner_window) && child_w->theme.is_null()) {
- _propagate_theme_changed(child_w, nullptr, nullptr);
- }
+ return offset.affine_inverse() * (rot_scale * offset);
}
void Control::_update_canvas_item_transform() {
@@ -699,815 +651,146 @@ void Control::_update_canvas_item_transform() {
RenderingServer::get_singleton()->canvas_item_set_transform(get_canvas_item(), xform);
}
-void Control::_notification(int p_notification) {
- switch (p_notification) {
- case NOTIFICATION_POST_ENTER_TREE: {
- data.minimum_size_valid = false;
- data.is_rtl_dirty = true;
- _size_changed();
- } break;
-
- case NOTIFICATION_EXIT_TREE: {
- release_focus();
- get_viewport()->_gui_remove_control(this);
- } break;
-
- case NOTIFICATION_READY: {
-#ifdef DEBUG_ENABLED
- connect("ready", callable_mp(this, &Control::_clear_size_warning), varray(), CONNECT_DEFERRED | CONNECT_ONESHOT);
-#endif
- } break;
-
- case NOTIFICATION_ENTER_CANVAS: {
- data.parent = Object::cast_to<Control>(get_parent());
- data.parent_window = Object::cast_to<Window>(get_parent());
- data.is_rtl_dirty = true;
-
- if (data.theme.is_null()) {
- if (data.parent && (data.parent->data.theme_owner || data.parent->data.theme_owner_window)) {
- data.theme_owner = data.parent->data.theme_owner;
- data.theme_owner_window = data.parent->data.theme_owner_window;
- notification(NOTIFICATION_THEME_CHANGED);
- } else if (data.parent_window && (data.parent_window->theme_owner || data.parent_window->theme_owner_window)) {
- data.theme_owner = data.parent_window->theme_owner;
- data.theme_owner_window = data.parent_window->theme_owner_window;
- notification(NOTIFICATION_THEME_CHANGED);
- }
- }
-
- CanvasItem *node = this;
- bool has_parent_control = false;
-
- while (!node->is_set_as_top_level()) {
- CanvasItem *parent = Object::cast_to<CanvasItem>(node->get_parent());
- if (!parent) {
- break;
- }
-
- Control *parent_control = Object::cast_to<Control>(parent);
- if (parent_control) {
- has_parent_control = true;
- break;
- }
-
- node = parent;
- }
-
- if (has_parent_control) {
- // Do nothing, has a parent control.
- } else {
- // Is a regular root control or top_level.
- Viewport *viewport = get_viewport();
- ERR_FAIL_COND(!viewport);
- data.RI = viewport->_gui_add_root_control(this);
- }
-
- data.parent_canvas_item = get_parent_item();
-
- if (data.parent_canvas_item) {
- data.parent_canvas_item->connect("item_rect_changed", callable_mp(this, &Control::_size_changed));
- } else {
- // Connect viewport.
- Viewport *viewport = get_viewport();
- ERR_FAIL_COND(!viewport);
- viewport->connect("size_changed", callable_mp(this, &Control::_size_changed));
- }
- } break;
-
- case NOTIFICATION_EXIT_CANVAS: {
- if (data.parent_canvas_item) {
- data.parent_canvas_item->disconnect("item_rect_changed", callable_mp(this, &Control::_size_changed));
- data.parent_canvas_item = nullptr;
- } else if (!is_set_as_top_level()) {
- //disconnect viewport
- Viewport *viewport = get_viewport();
- ERR_FAIL_COND(!viewport);
- viewport->disconnect("size_changed", callable_mp(this, &Control::_size_changed));
- }
-
- if (data.RI) {
- get_viewport()->_gui_remove_root_control(data.RI);
- data.RI = nullptr;
- }
-
- data.parent = nullptr;
- data.parent_canvas_item = nullptr;
- data.parent_window = nullptr;
- data.is_rtl_dirty = true;
- } break;
-
- case NOTIFICATION_MOVED_IN_PARENT: {
- // some parents need to know the order of the children to draw (like TabContainer)
- // update if necessary
- if (data.parent) {
- data.parent->update();
- }
- update();
-
- if (data.RI) {
- get_viewport()->_gui_set_root_order_dirty();
- }
- } break;
-
- case NOTIFICATION_RESIZED: {
- emit_signal(SceneStringNames::get_singleton()->resized);
- } break;
-
- case NOTIFICATION_DRAW: {
- _update_canvas_item_transform();
- RenderingServer::get_singleton()->canvas_item_set_custom_rect(get_canvas_item(), !data.disable_visibility_clip, Rect2(Point2(), get_size()));
- RenderingServer::get_singleton()->canvas_item_set_clip(get_canvas_item(), data.clip_contents);
- } break;
-
- case NOTIFICATION_MOUSE_ENTER: {
- emit_signal(SceneStringNames::get_singleton()->mouse_entered);
- } break;
-
- case NOTIFICATION_MOUSE_EXIT: {
- emit_signal(SceneStringNames::get_singleton()->mouse_exited);
- } break;
-
- case NOTIFICATION_FOCUS_ENTER: {
- emit_signal(SceneStringNames::get_singleton()->focus_entered);
- update();
- } break;
-
- case NOTIFICATION_FOCUS_EXIT: {
- emit_signal(SceneStringNames::get_singleton()->focus_exited);
- update();
- } break;
-
- case NOTIFICATION_THEME_CHANGED: {
- update_minimum_size();
- update();
- } break;
-
- case NOTIFICATION_VISIBILITY_CHANGED: {
- if (!is_visible_in_tree()) {
- if (get_viewport() != nullptr) {
- get_viewport()->_gui_hide_control(this);
- }
- } else {
- data.minimum_size_valid = false;
- _update_minimum_size();
- _size_changed();
- }
- } break;
-
- case NOTIFICATION_TRANSLATION_CHANGED:
- case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
- if (is_inside_tree()) {
- data.is_rtl_dirty = true;
- _size_changed();
- }
- } break;
- }
-}
-
-bool Control::has_point(const Point2 &p_point) const {
- bool ret;
- if (GDVIRTUAL_CALL(_has_point, p_point, ret)) {
- return ret;
- }
- return Rect2(Point2(), get_size()).has_point(p_point);
-}
-
-void Control::set_drag_forwarding(Object *p_target) {
- if (p_target) {
- data.drag_owner = p_target->get_instance_id();
- } else {
- data.drag_owner = ObjectID();
- }
-}
-
-Variant Control::get_drag_data(const Point2 &p_point) {
- if (data.drag_owner.is_valid()) {
- Object *obj = ObjectDB::get_instance(data.drag_owner);
- if (obj) {
- return obj->call("_get_drag_data_fw", p_point, this);
- }
- }
-
- Variant dd;
- if (GDVIRTUAL_CALL(_get_drag_data, p_point, dd)) {
- return dd;
- }
-
- return Variant();
-}
-
-bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
- if (data.drag_owner.is_valid()) {
- Object *obj = ObjectDB::get_instance(data.drag_owner);
- if (obj) {
- return obj->call("_can_drop_data_fw", p_point, p_data, this);
- }
- }
-
- bool ret;
- if (GDVIRTUAL_CALL(_can_drop_data, p_point, p_data, ret)) {
- return ret;
- }
- return false;
-}
-
-void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
- if (data.drag_owner.is_valid()) {
- Object *obj = ObjectDB::get_instance(data.drag_owner);
- if (obj) {
- obj->call("_drop_data_fw", p_point, p_data, this);
- return;
- }
- }
-
- GDVIRTUAL_CALL(_drop_data, p_point, p_data);
-}
-
-void Control::force_drag(const Variant &p_data, Control *p_control) {
- ERR_FAIL_COND(!is_inside_tree());
- ERR_FAIL_COND(p_data.get_type() == Variant::NIL);
-
- get_viewport()->_gui_force_drag(this, p_data, p_control);
-}
-
-void Control::set_drag_preview(Control *p_control) {
- ERR_FAIL_COND(!is_inside_tree());
- ERR_FAIL_COND(!get_viewport()->gui_is_dragging());
- get_viewport()->_gui_set_drag_preview(this, p_control);
-}
-
-bool Control::is_drag_successful() const {
- return is_inside_tree() && get_viewport()->gui_is_drag_successful();
-}
-
-void Control::_call_gui_input(const Ref<InputEvent> &p_event) {
- emit_signal(SceneStringNames::get_singleton()->gui_input, p_event); //signal should be first, so it's possible to override an event (and then accept it)
- if (!is_inside_tree() || get_viewport()->is_input_handled()) {
- return; //input was handled, abort
- }
- GDVIRTUAL_CALL(_gui_input, p_event);
- if (!is_inside_tree() || get_viewport()->is_input_handled()) {
- return; //input was handled, abort
- }
- gui_input(p_event);
-}
-void Control::gui_input(const Ref<InputEvent> &p_event) {
+Transform2D Control::get_transform() const {
+ Transform2D xform = _get_internal_transform();
+ xform[2] += get_position();
+ return xform;
}
-Size2 Control::get_minimum_size() const {
- Vector2 ms;
- if (GDVIRTUAL_CALL(_get_minimum_size, ms)) {
- return ms;
- }
- return Vector2();
-}
+/// Anchors and offsets.
-template <class T>
-T Control::get_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
- ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, T(), "At least one theme type must be specified.");
-
- // First, look through each control or window node in the branch, until no valid parent can be found.
- // Only nodes with a theme resource attached are considered.
- Control *theme_owner = p_theme_owner;
- Window *theme_owner_window = p_theme_owner_window;
-
- while (theme_owner || theme_owner_window) {
- // For each theme resource check the theme types provided and see if p_name exists with any of them.
- for (const StringName &E : p_theme_types) {
- if (theme_owner && theme_owner->data.theme->has_theme_item(p_data_type, p_name, E)) {
- return theme_owner->data.theme->get_theme_item(p_data_type, p_name, E);
- }
-
- if (theme_owner_window && theme_owner_window->theme->has_theme_item(p_data_type, p_name, E)) {
- return theme_owner_window->theme->get_theme_item(p_data_type, p_name, E);
- }
- }
-
- Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
- Control *parent_c = Object::cast_to<Control>(parent);
- if (parent_c) {
- theme_owner = parent_c->data.theme_owner;
- theme_owner_window = parent_c->data.theme_owner_window;
- } else {
- Window *parent_w = Object::cast_to<Window>(parent);
- if (parent_w) {
- theme_owner = parent_w->theme_owner;
- theme_owner_window = parent_w->theme_owner_window;
- } else {
- theme_owner = nullptr;
- theme_owner_window = nullptr;
- }
- }
- }
-
- // Secondly, check the project-defined Theme resource.
- if (Theme::get_project_default().is_valid()) {
- for (const StringName &E : p_theme_types) {
- if (Theme::get_project_default()->has_theme_item(p_data_type, p_name, E)) {
- return Theme::get_project_default()->get_theme_item(p_data_type, p_name, E);
- }
- }
- }
-
- // Lastly, fall back on the items defined in the default Theme, if they exist.
- for (const StringName &E : p_theme_types) {
- if (Theme::get_default()->has_theme_item(p_data_type, p_name, E)) {
- return Theme::get_default()->get_theme_item(p_data_type, p_name, E);
- }
- }
- // If they don't exist, use any type to return the default/empty value.
- return Theme::get_default()->get_theme_item(p_data_type, p_name, p_theme_types[0]);
+void Control::_set_anchor(Side p_side, real_t p_anchor) {
+ set_anchor(p_side, p_anchor);
}
-bool Control::has_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
- ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, false, "At least one theme type must be specified.");
-
- // First, look through each control or window node in the branch, until no valid parent can be found.
- // Only nodes with a theme resource attached are considered.
- Control *theme_owner = p_theme_owner;
- Window *theme_owner_window = p_theme_owner_window;
-
- while (theme_owner || theme_owner_window) {
- // For each theme resource check the theme types provided and see if p_name exists with any of them.
- for (const StringName &E : p_theme_types) {
- if (theme_owner && theme_owner->data.theme->has_theme_item(p_data_type, p_name, E)) {
- return true;
- }
-
- if (theme_owner_window && theme_owner_window->theme->has_theme_item(p_data_type, p_name, E)) {
- return true;
- }
- }
-
- Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
- Control *parent_c = Object::cast_to<Control>(parent);
- if (parent_c) {
- theme_owner = parent_c->data.theme_owner;
- theme_owner_window = parent_c->data.theme_owner_window;
- } else {
- Window *parent_w = Object::cast_to<Window>(parent);
- if (parent_w) {
- theme_owner = parent_w->theme_owner;
- theme_owner_window = parent_w->theme_owner_window;
- } else {
- theme_owner = nullptr;
- theme_owner_window = nullptr;
- }
- }
- }
+void Control::set_anchor(Side p_side, real_t p_anchor, bool p_keep_offset, bool p_push_opposite_anchor) {
+ ERR_FAIL_INDEX((int)p_side, 4);
- // Secondly, check the project-defined Theme resource.
- if (Theme::get_project_default().is_valid()) {
- for (const StringName &E : p_theme_types) {
- if (Theme::get_project_default()->has_theme_item(p_data_type, p_name, E)) {
- return true;
- }
- }
- }
+ Rect2 parent_rect = get_parent_anchorable_rect();
+ real_t parent_range = (p_side == SIDE_LEFT || p_side == SIDE_RIGHT) ? parent_rect.size.x : parent_rect.size.y;
+ real_t previous_pos = data.offset[p_side] + data.anchor[p_side] * parent_range;
+ real_t previous_opposite_pos = data.offset[(p_side + 2) % 4] + data.anchor[(p_side + 2) % 4] * parent_range;
- // Lastly, fall back on the items defined in the default Theme, if they exist.
- for (const StringName &E : p_theme_types) {
- if (Theme::get_default()->has_theme_item(p_data_type, p_name, E)) {
- return true;
- }
- }
- return false;
-}
+ data.anchor[p_side] = p_anchor;
-void Control::_get_theme_type_dependencies(const StringName &p_theme_type, List<StringName> *p_list) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (Theme::get_project_default().is_valid() && Theme::get_project_default()->get_type_variation_base(data.theme_type_variation) != StringName()) {
- Theme::get_project_default()->get_type_dependencies(get_class_name(), data.theme_type_variation, p_list);
+ if (((p_side == SIDE_LEFT || p_side == SIDE_TOP) && data.anchor[p_side] > data.anchor[(p_side + 2) % 4]) ||
+ ((p_side == SIDE_RIGHT || p_side == SIDE_BOTTOM) && data.anchor[p_side] < data.anchor[(p_side + 2) % 4])) {
+ if (p_push_opposite_anchor) {
+ data.anchor[(p_side + 2) % 4] = data.anchor[p_side];
} else {
- Theme::get_default()->get_type_dependencies(get_class_name(), data.theme_type_variation, p_list);
- }
- } else {
- Theme::get_default()->get_type_dependencies(p_theme_type, StringName(), p_list);
- }
-}
-
-Ref<Texture2D> Control::get_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
- if (tex) {
- return *tex;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<Ref<Texture2D>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types);
-}
-
-Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const Ref<StyleBox> *style = data.style_override.getptr(p_name);
- if (style) {
- return *style;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<Ref<StyleBox>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types);
-}
-
-Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const Ref<Font> *font = data.font_override.getptr(p_name);
- if (font) {
- return *font;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<Ref<Font>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types);
-}
-
-int Control::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const int *font_size = data.font_size_override.getptr(p_name);
- if (font_size && (*font_size) > 0) {
- return *font_size;
+ data.anchor[p_side] = data.anchor[(p_side + 2) % 4];
}
}
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types);
-}
-
-Color Control::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const Color *color = data.color_override.getptr(p_name);
- if (color) {
- return *color;
+ if (!p_keep_offset) {
+ data.offset[p_side] = previous_pos - data.anchor[p_side] * parent_range;
+ if (p_push_opposite_anchor) {
+ data.offset[(p_side + 2) % 4] = previous_opposite_pos - data.anchor[(p_side + 2) % 4] * parent_range;
}
}
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<Color>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types);
-}
-
-int Control::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- const int *constant = data.constant_override.getptr(p_name);
- if (constant) {
- return *constant;
- }
+ if (is_inside_tree()) {
+ _size_changed();
}
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types);
-}
-
-bool Control::has_theme_icon_override(const StringName &p_name) const {
- const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
- return tex != nullptr;
-}
-
-bool Control::has_theme_stylebox_override(const StringName &p_name) const {
- const Ref<StyleBox> *style = data.style_override.getptr(p_name);
- return style != nullptr;
-}
-
-bool Control::has_theme_font_override(const StringName &p_name) const {
- const Ref<Font> *font = data.font_override.getptr(p_name);
- return font != nullptr;
-}
-
-bool Control::has_theme_font_size_override(const StringName &p_name) const {
- const int *font_size = data.font_size_override.getptr(p_name);
- return font_size != nullptr;
-}
-
-bool Control::has_theme_color_override(const StringName &p_name) const {
- const Color *color = data.color_override.getptr(p_name);
- return color != nullptr;
-}
-
-bool Control::has_theme_constant_override(const StringName &p_name) const {
- const int *constant = data.constant_override.getptr(p_name);
- return constant != nullptr;
+ update();
}
-bool Control::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_icon_override(p_name)) {
- return true;
- }
- }
+real_t Control::get_anchor(Side p_side) const {
+ ERR_FAIL_INDEX_V(int(p_side), 4, 0.0);
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types);
+ return data.anchor[p_side];
}
-bool Control::has_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_stylebox_override(p_name)) {
- return true;
- }
- }
+void Control::set_offset(Side p_side, real_t p_value) {
+ ERR_FAIL_INDEX((int)p_side, 4);
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types);
+ data.offset[p_side] = p_value;
+ _size_changed();
}
-bool Control::has_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_font_override(p_name)) {
- return true;
- }
- }
+real_t Control::get_offset(Side p_side) const {
+ ERR_FAIL_INDEX_V((int)p_side, 4, 0);
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types);
+ return data.offset[p_side];
}
-bool Control::has_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_font_size_override(p_name)) {
- return true;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types);
+void Control::set_anchor_and_offset(Side p_side, real_t p_anchor, real_t p_pos, bool p_push_opposite_anchor) {
+ set_anchor(p_side, p_anchor, false, p_push_opposite_anchor);
+ set_offset(p_side, p_pos);
}
-bool Control::has_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_color_override(p_name)) {
- return true;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types);
+void Control::set_begin(const Size2 &p_point) {
+ data.offset[0] = p_point.x;
+ data.offset[1] = p_point.y;
+ _size_changed();
}
-bool Control::has_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
- if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
- if (has_theme_constant_override(p_name)) {
- return true;
- }
- }
-
- List<StringName> theme_types;
- _get_theme_type_dependencies(p_theme_type, &theme_types);
- return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types);
+Size2 Control::get_begin() const {
+ return Size2(data.offset[0], data.offset[1]);
}
-float Control::fetch_theme_default_base_scale(Control *p_theme_owner, Window *p_theme_owner_window) {
- // First, look through each control or window node in the branch, until no valid parent can be found.
- // Only nodes with a theme resource attached are considered.
- // For each theme resource see if their assigned theme has the default value defined and valid.
- Control *theme_owner = p_theme_owner;
- Window *theme_owner_window = p_theme_owner_window;
-
- while (theme_owner || theme_owner_window) {
- if (theme_owner && theme_owner->data.theme->has_default_base_scale()) {
- return theme_owner->data.theme->get_default_base_scale();
- }
-
- if (theme_owner_window && theme_owner_window->theme->has_default_base_scale()) {
- return theme_owner_window->theme->get_default_base_scale();
- }
-
- Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
- Control *parent_c = Object::cast_to<Control>(parent);
- if (parent_c) {
- theme_owner = parent_c->data.theme_owner;
- theme_owner_window = parent_c->data.theme_owner_window;
- } else {
- Window *parent_w = Object::cast_to<Window>(parent);
- if (parent_w) {
- theme_owner = parent_w->theme_owner;
- theme_owner_window = parent_w->theme_owner_window;
- } else {
- theme_owner = nullptr;
- theme_owner_window = nullptr;
- }
- }
- }
-
- // Secondly, check the project-defined Theme resource.
- if (Theme::get_project_default().is_valid()) {
- if (Theme::get_project_default()->has_default_base_scale()) {
- return Theme::get_project_default()->get_default_base_scale();
- }
- }
-
- // Lastly, fall back on the default Theme.
- if (Theme::get_default()->has_default_base_scale()) {
- return Theme::get_default()->get_default_base_scale();
- }
- return Theme::get_fallback_base_scale();
+void Control::set_end(const Size2 &p_point) {
+ data.offset[2] = p_point.x;
+ data.offset[3] = p_point.y;
+ _size_changed();
}
-float Control::get_theme_default_base_scale() const {
- return fetch_theme_default_base_scale(data.theme_owner, data.theme_owner_window);
+Size2 Control::get_end() const {
+ return Size2(data.offset[2], data.offset[3]);
}
-Ref<Font> Control::fetch_theme_default_font(Control *p_theme_owner, Window *p_theme_owner_window) {
- // First, look through each control or window node in the branch, until no valid parent can be found.
- // Only nodes with a theme resource attached are considered.
- // For each theme resource see if their assigned theme has the default value defined and valid.
- Control *theme_owner = p_theme_owner;
- Window *theme_owner_window = p_theme_owner_window;
-
- while (theme_owner || theme_owner_window) {
- if (theme_owner && theme_owner->data.theme->has_default_font()) {
- return theme_owner->data.theme->get_default_font();
- }
-
- if (theme_owner_window && theme_owner_window->theme->has_default_font()) {
- return theme_owner_window->theme->get_default_font();
- }
-
- Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
- Control *parent_c = Object::cast_to<Control>(parent);
- if (parent_c) {
- theme_owner = parent_c->data.theme_owner;
- theme_owner_window = parent_c->data.theme_owner_window;
- } else {
- Window *parent_w = Object::cast_to<Window>(parent);
- if (parent_w) {
- theme_owner = parent_w->theme_owner;
- theme_owner_window = parent_w->theme_owner_window;
- } else {
- theme_owner = nullptr;
- theme_owner_window = nullptr;
- }
- }
- }
-
- // Secondly, check the project-defined Theme resource.
- if (Theme::get_project_default().is_valid()) {
- if (Theme::get_project_default()->has_default_font()) {
- return Theme::get_project_default()->get_default_font();
- }
- }
+void Control::set_h_grow_direction(GrowDirection p_direction) {
+ ERR_FAIL_INDEX((int)p_direction, 3);
- // Lastly, fall back on the default Theme.
- if (Theme::get_default()->has_default_font()) {
- return Theme::get_default()->get_default_font();
- }
- return Theme::get_fallback_font();
+ data.h_grow = p_direction;
+ _size_changed();
}
-Ref<Font> Control::get_theme_default_font() const {
- return fetch_theme_default_font(data.theme_owner, data.theme_owner_window);
+Control::GrowDirection Control::get_h_grow_direction() const {
+ return data.h_grow;
}
-int Control::fetch_theme_default_font_size(Control *p_theme_owner, Window *p_theme_owner_window) {
- // First, look through each control or window node in the branch, until no valid parent can be found.
- // Only nodes with a theme resource attached are considered.
- // For each theme resource see if their assigned theme has the default value defined and valid.
- Control *theme_owner = p_theme_owner;
- Window *theme_owner_window = p_theme_owner_window;
-
- while (theme_owner || theme_owner_window) {
- if (theme_owner && theme_owner->data.theme->has_default_font_size()) {
- return theme_owner->data.theme->get_default_font_size();
- }
-
- if (theme_owner_window && theme_owner_window->theme->has_default_font_size()) {
- return theme_owner_window->theme->get_default_font_size();
- }
-
- Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
- Control *parent_c = Object::cast_to<Control>(parent);
- if (parent_c) {
- theme_owner = parent_c->data.theme_owner;
- theme_owner_window = parent_c->data.theme_owner_window;
- } else {
- Window *parent_w = Object::cast_to<Window>(parent);
- if (parent_w) {
- theme_owner = parent_w->theme_owner;
- theme_owner_window = parent_w->theme_owner_window;
- } else {
- theme_owner = nullptr;
- theme_owner_window = nullptr;
- }
- }
- }
-
- // Secondly, check the project-defined Theme resource.
- if (Theme::get_project_default().is_valid()) {
- if (Theme::get_project_default()->has_default_font_size()) {
- return Theme::get_project_default()->get_default_font_size();
- }
- }
+void Control::set_v_grow_direction(GrowDirection p_direction) {
+ ERR_FAIL_INDEX((int)p_direction, 3);
- // Lastly, fall back on the default Theme.
- if (Theme::get_default()->has_default_font_size()) {
- return Theme::get_default()->get_default_font_size();
- }
- return Theme::get_fallback_font_size();
+ data.v_grow = p_direction;
+ _size_changed();
}
-int Control::get_theme_default_font_size() const {
- return fetch_theme_default_font_size(data.theme_owner, data.theme_owner_window);
+Control::GrowDirection Control::get_v_grow_direction() const {
+ return data.v_grow;
}
-Rect2 Control::get_parent_anchorable_rect() const {
- if (!is_inside_tree()) {
- return Rect2();
- }
-
- Rect2 parent_rect;
- if (data.parent_canvas_item) {
- parent_rect = data.parent_canvas_item->get_anchorable_rect();
- } else {
-#ifdef TOOLS_ENABLED
- Node *edited_root = get_tree()->get_edited_scene_root();
- if (edited_root && (this == edited_root || edited_root->is_ancestor_of(this))) {
- parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
- } else {
- parent_rect = get_viewport()->get_visible_rect();
- }
+void Control::_compute_anchors(Rect2 p_rect, const real_t p_offsets[4], real_t (&r_anchors)[4]) {
+ Size2 parent_rect_size = get_parent_anchorable_rect().size;
+ ERR_FAIL_COND(parent_rect_size.x == 0.0);
+ ERR_FAIL_COND(parent_rect_size.y == 0.0);
-#else
- parent_rect = get_viewport()->get_visible_rect();
-#endif
+ real_t x = p_rect.position.x;
+ if (is_layout_rtl()) {
+ x = parent_rect_size.x - x - p_rect.size.x;
}
-
- return parent_rect;
-}
-
-Size2 Control::get_parent_area_size() const {
- return get_parent_anchorable_rect().size;
+ r_anchors[0] = (x - p_offsets[0]) / parent_rect_size.x;
+ r_anchors[1] = (p_rect.position.y - p_offsets[1]) / parent_rect_size.y;
+ r_anchors[2] = (x + p_rect.size.x - p_offsets[2]) / parent_rect_size.x;
+ r_anchors[3] = (p_rect.position.y + p_rect.size.y - p_offsets[3]) / parent_rect_size.y;
}
-void Control::_size_changed() {
- Rect2 parent_rect = get_parent_anchorable_rect();
-
- real_t edge_pos[4];
-
- for (int i = 0; i < 4; i++) {
- real_t area = parent_rect.size[i & 1];
- edge_pos[i] = data.offset[i] + (data.anchor[i] * area);
- }
-
- Point2 new_pos_cache = Point2(edge_pos[0], edge_pos[1]);
- Size2 new_size_cache = Point2(edge_pos[2], edge_pos[3]) - new_pos_cache;
-
- Size2 minimum_size = get_combined_minimum_size();
-
- if (minimum_size.width > new_size_cache.width) {
- if (data.h_grow == GROW_DIRECTION_BEGIN) {
- new_pos_cache.x += new_size_cache.width - minimum_size.width;
- } else if (data.h_grow == GROW_DIRECTION_BOTH) {
- new_pos_cache.x += 0.5 * (new_size_cache.width - minimum_size.width);
- }
-
- new_size_cache.width = minimum_size.width;
- }
+void Control::_compute_offsets(Rect2 p_rect, const real_t p_anchors[4], real_t (&r_offsets)[4]) {
+ Size2 parent_rect_size = get_parent_anchorable_rect().size;
+ real_t x = p_rect.position.x;
if (is_layout_rtl()) {
- new_pos_cache.x = parent_rect.size.x - new_pos_cache.x - new_size_cache.x;
- }
-
- if (minimum_size.height > new_size_cache.height) {
- if (data.v_grow == GROW_DIRECTION_BEGIN) {
- new_pos_cache.y += new_size_cache.height - minimum_size.height;
- } else if (data.v_grow == GROW_DIRECTION_BOTH) {
- new_pos_cache.y += 0.5 * (new_size_cache.height - minimum_size.height);
- }
-
- new_size_cache.height = minimum_size.height;
- }
-
- bool pos_changed = new_pos_cache != data.pos_cache;
- bool size_changed = new_size_cache != data.size_cache;
-
- data.pos_cache = new_pos_cache;
- data.size_cache = new_size_cache;
-
- if (is_inside_tree()) {
- if (size_changed) {
- notification(NOTIFICATION_RESIZED);
- }
- if (pos_changed || size_changed) {
- item_rect_changed(size_changed);
- _notify_transform();
- }
-
- if (pos_changed && !size_changed) {
- _update_canvas_item_transform(); //move because it won't be updated
- }
+ x = parent_rect_size.x - x - p_rect.size.x;
}
+ r_offsets[0] = x - (p_anchors[0] * parent_rect_size.x);
+ r_offsets[1] = p_rect.position.y - (p_anchors[1] * parent_rect_size.y);
+ r_offsets[2] = x + p_rect.size.x - (p_anchors[2] * parent_rect_size.x);
+ r_offsets[3] = p_rect.position.y + p_rect.size.y - (p_anchors[3] * parent_rect_size.y);
}
+/// Presets and layout modes.
+
void Control::_set_layout_mode(LayoutMode p_mode) {
bool list_changed = false;
@@ -1557,47 +840,6 @@ Control::LayoutMode Control::_get_layout_mode() const {
return LayoutMode::LAYOUT_MODE_POSITION;
}
-void Control::set_anchor(Side p_side, real_t p_anchor, bool p_keep_offset, bool p_push_opposite_anchor) {
- ERR_FAIL_INDEX((int)p_side, 4);
-
- Rect2 parent_rect = get_parent_anchorable_rect();
- real_t parent_range = (p_side == SIDE_LEFT || p_side == SIDE_RIGHT) ? parent_rect.size.x : parent_rect.size.y;
- real_t previous_pos = data.offset[p_side] + data.anchor[p_side] * parent_range;
- real_t previous_opposite_pos = data.offset[(p_side + 2) % 4] + data.anchor[(p_side + 2) % 4] * parent_range;
-
- data.anchor[p_side] = p_anchor;
-
- if (((p_side == SIDE_LEFT || p_side == SIDE_TOP) && data.anchor[p_side] > data.anchor[(p_side + 2) % 4]) ||
- ((p_side == SIDE_RIGHT || p_side == SIDE_BOTTOM) && data.anchor[p_side] < data.anchor[(p_side + 2) % 4])) {
- if (p_push_opposite_anchor) {
- data.anchor[(p_side + 2) % 4] = data.anchor[p_side];
- } else {
- data.anchor[p_side] = data.anchor[(p_side + 2) % 4];
- }
- }
-
- if (!p_keep_offset) {
- data.offset[p_side] = previous_pos - data.anchor[p_side] * parent_range;
- if (p_push_opposite_anchor) {
- data.offset[(p_side + 2) % 4] = previous_opposite_pos - data.anchor[(p_side + 2) % 4] * parent_range;
- }
- }
- if (is_inside_tree()) {
- _size_changed();
- }
-
- update();
-}
-
-void Control::_set_anchor(Side p_side, real_t p_anchor) {
- set_anchor(p_side, p_anchor);
-}
-
-void Control::set_anchor_and_offset(Side p_side, real_t p_anchor, real_t p_pos, bool p_push_opposite_anchor) {
- set_anchor(p_side, p_anchor, false, p_push_opposite_anchor);
- set_offset(p_side, p_pos);
-}
-
void Control::_set_anchors_layout_preset(int p_preset) {
bool list_changed = false;
@@ -2037,43 +1279,37 @@ void Control::set_grow_direction_preset(LayoutPreset p_preset) {
}
}
-real_t Control::get_anchor(Side p_side) const {
- ERR_FAIL_INDEX_V(int(p_side), 4, 0.0);
+/// Manual positioning.
- return data.anchor[p_side];
+void Control::_set_position(const Size2 &p_point) {
+ set_position(p_point);
}
-void Control::set_offset(Side p_side, real_t p_value) {
- ERR_FAIL_INDEX((int)p_side, 4);
-
- data.offset[p_side] = p_value;
+void Control::set_position(const Size2 &p_point, bool p_keep_offsets) {
+ if (p_keep_offsets) {
+ _compute_anchors(Rect2(p_point, data.size_cache), data.offset, data.anchor);
+ } else {
+ _compute_offsets(Rect2(p_point, data.size_cache), data.anchor, data.offset);
+ }
_size_changed();
}
-void Control::set_begin(const Size2 &p_point) {
- data.offset[0] = p_point.x;
- data.offset[1] = p_point.y;
- _size_changed();
+Size2 Control::get_position() const {
+ return data.pos_cache;
}
-void Control::set_end(const Size2 &p_point) {
- data.offset[2] = p_point.x;
- data.offset[3] = p_point.y;
- _size_changed();
+void Control::_set_global_position(const Point2 &p_point) {
+ set_global_position(p_point);
}
-real_t Control::get_offset(Side p_side) const {
- ERR_FAIL_INDEX_V((int)p_side, 4, 0);
-
- return data.offset[p_side];
-}
+void Control::set_global_position(const Point2 &p_point, bool p_keep_offsets) {
+ Transform2D inv;
-Size2 Control::get_begin() const {
- return Size2(data.offset[0], data.offset[1]);
-}
+ if (data.parent_canvas_item) {
+ inv = data.parent_canvas_item->get_global_transform().affine_inverse();
+ }
-Size2 Control::get_end() const {
- return Size2(data.offset[2], data.offset[3]);
+ set_position(inv.xform(p_point), p_keep_offsets);
}
Point2 Control::get_global_position() const {
@@ -2091,72 +1327,6 @@ Point2 Control::get_screen_position() const {
return global_pos;
}
-void Control::_set_global_position(const Point2 &p_point) {
- set_global_position(p_point);
-}
-
-void Control::set_global_position(const Point2 &p_point, bool p_keep_offsets) {
- Transform2D inv;
-
- if (data.parent_canvas_item) {
- inv = data.parent_canvas_item->get_global_transform().affine_inverse();
- }
-
- set_position(inv.xform(p_point), p_keep_offsets);
-}
-
-void Control::_compute_anchors(Rect2 p_rect, const real_t p_offsets[4], real_t (&r_anchors)[4]) {
- Size2 parent_rect_size = get_parent_anchorable_rect().size;
- ERR_FAIL_COND(parent_rect_size.x == 0.0);
- ERR_FAIL_COND(parent_rect_size.y == 0.0);
-
- real_t x = p_rect.position.x;
- if (is_layout_rtl()) {
- x = parent_rect_size.x - x - p_rect.size.x;
- }
- r_anchors[0] = (x - p_offsets[0]) / parent_rect_size.x;
- r_anchors[1] = (p_rect.position.y - p_offsets[1]) / parent_rect_size.y;
- r_anchors[2] = (x + p_rect.size.x - p_offsets[2]) / parent_rect_size.x;
- r_anchors[3] = (p_rect.position.y + p_rect.size.y - p_offsets[3]) / parent_rect_size.y;
-}
-
-void Control::_compute_offsets(Rect2 p_rect, const real_t p_anchors[4], real_t (&r_offsets)[4]) {
- Size2 parent_rect_size = get_parent_anchorable_rect().size;
-
- real_t x = p_rect.position.x;
- if (is_layout_rtl()) {
- x = parent_rect_size.x - x - p_rect.size.x;
- }
- r_offsets[0] = x - (p_anchors[0] * parent_rect_size.x);
- r_offsets[1] = p_rect.position.y - (p_anchors[1] * parent_rect_size.y);
- r_offsets[2] = x + p_rect.size.x - (p_anchors[2] * parent_rect_size.x);
- r_offsets[3] = p_rect.position.y + p_rect.size.y - (p_anchors[3] * parent_rect_size.y);
-}
-
-void Control::_set_position(const Size2 &p_point) {
- set_position(p_point);
-}
-
-void Control::set_position(const Size2 &p_point, bool p_keep_offsets) {
- if (p_keep_offsets) {
- _compute_anchors(Rect2(p_point, data.size_cache), data.offset, data.anchor);
- } else {
- _compute_offsets(Rect2(p_point, data.size_cache), data.anchor, data.offset);
- }
- _size_changed();
-}
-
-void Control::set_rect(const Rect2 &p_rect) {
- for (int i = 0; i < 4; i++) {
- data.anchor[i] = ANCHOR_BEGIN;
- }
-
- _compute_offsets(p_rect, data.anchor, data.offset);
- if (is_inside_tree()) {
- _size_changed();
- }
-}
-
void Control::_set_size(const Size2 &p_size) {
#ifdef DEBUG_ENABLED
if (data.size_warning && (data.anchor[SIDE_LEFT] != data.anchor[SIDE_RIGHT] || data.anchor[SIDE_TOP] != data.anchor[SIDE_BOTTOM])) {
@@ -2184,10 +1354,6 @@ void Control::set_size(const Size2 &p_size, bool p_keep_offsets) {
_size_changed();
}
-Size2 Control::get_position() const {
- return data.pos_cache;
-}
-
Size2 Control::get_size() const {
return data.size_cache;
}
@@ -2196,6 +1362,21 @@ void Control::reset_size() {
set_size(Size2());
}
+void Control::set_rect(const Rect2 &p_rect) {
+ for (int i = 0; i < 4; i++) {
+ data.anchor[i] = ANCHOR_BEGIN;
+ }
+
+ _compute_offsets(p_rect, data.anchor, data.offset);
+ if (is_inside_tree()) {
+ _size_changed();
+ }
+}
+
+Rect2 Control::get_rect() const {
+ return Rect2(get_position(), get_size());
+}
+
Rect2 Control::get_global_rect() const {
return Rect2(get_global_position(), get_size());
}
@@ -2220,118 +1401,382 @@ Rect2 Control::get_window_rect() const {
return gr;
}
-Rect2 Control::get_rect() const {
- return Rect2(get_position(), get_size());
-}
-
Rect2 Control::get_anchorable_rect() const {
return Rect2(Point2(), get_size());
}
-void Control::begin_bulk_theme_override() {
- data.bulk_theme_override = true;
+void Control::set_scale(const Vector2 &p_scale) {
+ data.scale = p_scale;
+ // Avoid having 0 scale values, can lead to errors in physics and rendering.
+ if (data.scale.x == 0) {
+ data.scale.x = CMP_EPSILON;
+ }
+ if (data.scale.y == 0) {
+ data.scale.y = CMP_EPSILON;
+ }
+ update();
+ _notify_transform();
}
-void Control::end_bulk_theme_override() {
- ERR_FAIL_COND(!data.bulk_theme_override);
+Vector2 Control::get_scale() const {
+ return data.scale;
+}
- data.bulk_theme_override = false;
- _notify_theme_changed();
+void Control::set_rotation(real_t p_radians) {
+ data.rotation = p_radians;
+ update();
+ _notify_transform();
}
-void Control::add_theme_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) {
- ERR_FAIL_COND(!p_icon.is_valid());
+real_t Control::get_rotation() const {
+ return data.rotation;
+}
- if (data.icon_override.has(p_name)) {
- data.icon_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+void Control::set_pivot_offset(const Vector2 &p_pivot) {
+ data.pivot_offset = p_pivot;
+ update();
+ _notify_transform();
+}
+
+Vector2 Control::get_pivot_offset() const {
+ return data.pivot_offset;
+}
+
+/// Sizes.
+
+void Control::_update_minimum_size() {
+ if (!is_inside_tree()) {
+ return;
}
- data.icon_override[p_name] = p_icon;
- data.icon_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
- _notify_theme_changed();
+ Size2 minsize = get_combined_minimum_size();
+ data.updating_last_minimum_size = false;
+
+ if (minsize != data.last_minimum_size) {
+ data.last_minimum_size = minsize;
+ _size_changed();
+ emit_signal(SceneStringNames::get_singleton()->minimum_size_changed);
+ }
}
-void Control::add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {
- ERR_FAIL_COND(!p_style.is_valid());
+void Control::update_minimum_size() {
+ if (!is_inside_tree() || data.block_minimum_size_adjust) {
+ return;
+ }
- if (data.style_override.has(p_name)) {
- data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+ Control *invalidate = this;
+
+ //invalidate cache upwards
+ while (invalidate && invalidate->data.minimum_size_valid) {
+ invalidate->data.minimum_size_valid = false;
+ if (invalidate->is_set_as_top_level()) {
+ break; // do not go further up
+ }
+ if (!invalidate->data.parent && get_parent()) {
+ Window *parent_window = Object::cast_to<Window>(get_parent());
+ if (parent_window && parent_window->is_wrapping_controls()) {
+ parent_window->child_controls_changed();
+ }
+ }
+ invalidate = invalidate->data.parent;
}
- data.style_override[p_name] = p_style;
- data.style_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
- _notify_theme_changed();
+ if (!is_visible_in_tree()) {
+ return;
+ }
+
+ if (data.updating_last_minimum_size) {
+ return;
+ }
+
+ data.updating_last_minimum_size = true;
+
+ MessageQueue::get_singleton()->push_call(this, "_update_minimum_size");
}
-void Control::add_theme_font_override(const StringName &p_name, const Ref<Font> &p_font) {
- ERR_FAIL_COND(!p_font.is_valid());
+void Control::set_block_minimum_size_adjust(bool p_block) {
+ data.block_minimum_size_adjust = p_block;
+}
- if (data.font_override.has(p_name)) {
- data.font_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+bool Control::is_minimum_size_adjust_blocked() const {
+ return data.block_minimum_size_adjust;
+}
+
+Size2 Control::get_minimum_size() const {
+ Vector2 ms;
+ if (GDVIRTUAL_CALL(_get_minimum_size, ms)) {
+ return ms;
}
+ return Vector2();
+}
- data.font_override[p_name] = p_font;
- data.font_override[p_name]->connect("changed", callable_mp(this, &Control::_override_changed), Vector<Variant>(), CONNECT_REFERENCE_COUNTED);
- _notify_theme_changed();
+void Control::set_custom_minimum_size(const Size2 &p_custom) {
+ if (p_custom == data.custom_minimum_size) {
+ return;
+ }
+ data.custom_minimum_size = p_custom;
+ update_minimum_size();
}
-void Control::add_theme_font_size_override(const StringName &p_name, int p_font_size) {
- data.font_size_override[p_name] = p_font_size;
- _notify_theme_changed();
+Size2 Control::get_custom_minimum_size() const {
+ return data.custom_minimum_size;
}
-void Control::add_theme_color_override(const StringName &p_name, const Color &p_color) {
- data.color_override[p_name] = p_color;
- _notify_theme_changed();
+void Control::_update_minimum_size_cache() {
+ Size2 minsize = get_minimum_size();
+ minsize.x = MAX(minsize.x, data.custom_minimum_size.x);
+ minsize.y = MAX(minsize.y, data.custom_minimum_size.y);
+
+ bool size_changed = false;
+ if (data.minimum_size_cache != minsize) {
+ size_changed = true;
+ }
+
+ data.minimum_size_cache = minsize;
+ data.minimum_size_valid = true;
+
+ if (size_changed) {
+ update_minimum_size();
+ }
}
-void Control::add_theme_constant_override(const StringName &p_name, int p_constant) {
- data.constant_override[p_name] = p_constant;
- _notify_theme_changed();
+Size2 Control::get_combined_minimum_size() const {
+ if (!data.minimum_size_valid) {
+ const_cast<Control *>(this)->_update_minimum_size_cache();
+ }
+ return data.minimum_size_cache;
}
-void Control::remove_theme_icon_override(const StringName &p_name) {
- if (data.icon_override.has(p_name)) {
- data.icon_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+void Control::_size_changed() {
+ Rect2 parent_rect = get_parent_anchorable_rect();
+
+ real_t edge_pos[4];
+
+ for (int i = 0; i < 4; i++) {
+ real_t area = parent_rect.size[i & 1];
+ edge_pos[i] = data.offset[i] + (data.anchor[i] * area);
}
- data.icon_override.erase(p_name);
- _notify_theme_changed();
+ Point2 new_pos_cache = Point2(edge_pos[0], edge_pos[1]);
+ Size2 new_size_cache = Point2(edge_pos[2], edge_pos[3]) - new_pos_cache;
+
+ Size2 minimum_size = get_combined_minimum_size();
+
+ if (minimum_size.width > new_size_cache.width) {
+ if (data.h_grow == GROW_DIRECTION_BEGIN) {
+ new_pos_cache.x += new_size_cache.width - minimum_size.width;
+ } else if (data.h_grow == GROW_DIRECTION_BOTH) {
+ new_pos_cache.x += 0.5 * (new_size_cache.width - minimum_size.width);
+ }
+
+ new_size_cache.width = minimum_size.width;
+ }
+
+ if (is_layout_rtl()) {
+ new_pos_cache.x = parent_rect.size.x - new_pos_cache.x - new_size_cache.x;
+ }
+
+ if (minimum_size.height > new_size_cache.height) {
+ if (data.v_grow == GROW_DIRECTION_BEGIN) {
+ new_pos_cache.y += new_size_cache.height - minimum_size.height;
+ } else if (data.v_grow == GROW_DIRECTION_BOTH) {
+ new_pos_cache.y += 0.5 * (new_size_cache.height - minimum_size.height);
+ }
+
+ new_size_cache.height = minimum_size.height;
+ }
+
+ bool pos_changed = new_pos_cache != data.pos_cache;
+ bool size_changed = new_size_cache != data.size_cache;
+
+ data.pos_cache = new_pos_cache;
+ data.size_cache = new_size_cache;
+
+ if (is_inside_tree()) {
+ if (size_changed) {
+ notification(NOTIFICATION_RESIZED);
+ }
+ if (pos_changed || size_changed) {
+ item_rect_changed(size_changed);
+ _notify_transform();
+ }
+
+ if (pos_changed && !size_changed) {
+ _update_canvas_item_transform(); //move because it won't be updated
+ }
+ }
}
-void Control::remove_theme_style_override(const StringName &p_name) {
- if (data.style_override.has(p_name)) {
- data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+void Control::_clear_size_warning() {
+ data.size_warning = false;
+}
+
+// Container sizing.
+
+void Control::set_h_size_flags(int p_flags) {
+ if (data.h_size_flags == p_flags) {
+ return;
}
+ data.h_size_flags = p_flags;
+ emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
+}
- data.style_override.erase(p_name);
- _notify_theme_changed();
+int Control::get_h_size_flags() const {
+ return data.h_size_flags;
}
-void Control::remove_theme_font_override(const StringName &p_name) {
- if (data.font_override.has(p_name)) {
- data.font_override[p_name]->disconnect("changed", callable_mp(this, &Control::_override_changed));
+void Control::set_v_size_flags(int p_flags) {
+ if (data.v_size_flags == p_flags) {
+ return;
}
+ data.v_size_flags = p_flags;
+ emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
+}
- data.font_override.erase(p_name);
- _notify_theme_changed();
+int Control::get_v_size_flags() const {
+ return data.v_size_flags;
}
-void Control::remove_theme_font_size_override(const StringName &p_name) {
- data.font_size_override.erase(p_name);
- _notify_theme_changed();
+void Control::set_stretch_ratio(real_t p_ratio) {
+ if (data.expand == p_ratio) {
+ return;
+ }
+
+ data.expand = p_ratio;
+ emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
}
-void Control::remove_theme_color_override(const StringName &p_name) {
- data.color_override.erase(p_name);
- _notify_theme_changed();
+real_t Control::get_stretch_ratio() const {
+ return data.expand;
}
-void Control::remove_theme_constant_override(const StringName &p_name) {
- data.constant_override.erase(p_name);
- _notify_theme_changed();
+// Input events.
+
+void Control::_call_gui_input(const Ref<InputEvent> &p_event) {
+ emit_signal(SceneStringNames::get_singleton()->gui_input, p_event); //signal should be first, so it's possible to override an event (and then accept it)
+ if (!is_inside_tree() || get_viewport()->is_input_handled()) {
+ return; //input was handled, abort
+ }
+ GDVIRTUAL_CALL(_gui_input, p_event);
+ if (!is_inside_tree() || get_viewport()->is_input_handled()) {
+ return; //input was handled, abort
+ }
+ gui_input(p_event);
+}
+
+void Control::gui_input(const Ref<InputEvent> &p_event) {
+}
+
+void Control::accept_event() {
+ if (is_inside_tree()) {
+ get_viewport()->_gui_accept_event();
+ }
+}
+
+bool Control::has_point(const Point2 &p_point) const {
+ bool ret;
+ if (GDVIRTUAL_CALL(_has_point, p_point, ret)) {
+ return ret;
+ }
+ return Rect2(Point2(), get_size()).has_point(p_point);
+}
+
+void Control::set_mouse_filter(MouseFilter p_filter) {
+ ERR_FAIL_INDEX(p_filter, 3);
+ data.mouse_filter = p_filter;
+ notify_property_list_changed();
+ update_configuration_warnings();
+}
+
+Control::MouseFilter Control::get_mouse_filter() const {
+ return data.mouse_filter;
+}
+
+void Control::set_force_pass_scroll_events(bool p_force_pass_scroll_events) {
+ data.force_pass_scroll_events = p_force_pass_scroll_events;
+}
+
+bool Control::is_force_pass_scroll_events() const {
+ return data.force_pass_scroll_events;
+}
+
+void Control::warp_mouse(const Point2 &p_position) {
+ ERR_FAIL_COND(!is_inside_tree());
+ get_viewport()->warp_mouse(get_global_transform_with_canvas().xform(p_position));
+}
+
+// Drag and drop handling.
+
+void Control::set_drag_forwarding(Object *p_target) {
+ if (p_target) {
+ data.drag_owner = p_target->get_instance_id();
+ } else {
+ data.drag_owner = ObjectID();
+ }
+}
+
+Variant Control::get_drag_data(const Point2 &p_point) {
+ if (data.drag_owner.is_valid()) {
+ Object *obj = ObjectDB::get_instance(data.drag_owner);
+ if (obj) {
+ return obj->call("_get_drag_data_fw", p_point, this);
+ }
+ }
+
+ Variant dd;
+ if (GDVIRTUAL_CALL(_get_drag_data, p_point, dd)) {
+ return dd;
+ }
+
+ return Variant();
+}
+
+bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
+ if (data.drag_owner.is_valid()) {
+ Object *obj = ObjectDB::get_instance(data.drag_owner);
+ if (obj) {
+ return obj->call("_can_drop_data_fw", p_point, p_data, this);
+ }
+ }
+
+ bool ret;
+ if (GDVIRTUAL_CALL(_can_drop_data, p_point, p_data, ret)) {
+ return ret;
+ }
+ return false;
+}
+
+void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
+ if (data.drag_owner.is_valid()) {
+ Object *obj = ObjectDB::get_instance(data.drag_owner);
+ if (obj) {
+ obj->call("_drop_data_fw", p_point, p_data, this);
+ return;
+ }
+ }
+
+ GDVIRTUAL_CALL(_drop_data, p_point, p_data);
+}
+
+void Control::force_drag(const Variant &p_data, Control *p_control) {
+ ERR_FAIL_COND(!is_inside_tree());
+ ERR_FAIL_COND(p_data.get_type() == Variant::NIL);
+
+ get_viewport()->_gui_force_drag(this, p_data, p_control);
+}
+
+void Control::set_drag_preview(Control *p_control) {
+ ERR_FAIL_COND(!is_inside_tree());
+ ERR_FAIL_COND(!get_viewport()->gui_is_dragging());
+ get_viewport()->_gui_set_drag_preview(this, p_control);
+}
+
+bool Control::is_drag_successful() const {
+ return is_inside_tree() && get_viewport()->gui_is_drag_successful();
}
+// Focus.
+
void Control::set_focus_mode(FocusMode p_focus_mode) {
ERR_FAIL_INDEX((int)p_focus_mode, 3);
@@ -2342,6 +1787,41 @@ void Control::set_focus_mode(FocusMode p_focus_mode) {
data.focus_mode = p_focus_mode;
}
+Control::FocusMode Control::get_focus_mode() const {
+ return data.focus_mode;
+}
+
+bool Control::has_focus() const {
+ return is_inside_tree() && get_viewport()->_gui_control_has_focus(this);
+}
+
+void Control::grab_focus() {
+ ERR_FAIL_COND(!is_inside_tree());
+
+ if (data.focus_mode == FOCUS_NONE) {
+ WARN_PRINT("This control can't grab focus. Use set_focus_mode() to allow a control to get focus.");
+ return;
+ }
+
+ get_viewport()->_gui_control_grab_focus(this);
+}
+
+void Control::grab_click_focus() {
+ ERR_FAIL_COND(!is_inside_tree());
+
+ get_viewport()->_gui_grab_click_focus(this);
+}
+
+void Control::release_focus() {
+ ERR_FAIL_COND(!is_inside_tree());
+
+ if (!has_focus()) {
+ return;
+ }
+
+ get_viewport()->gui_release_focus();
+}
+
static Control *_next_control(Control *p_from) {
if (p_from->is_set_as_top_level()) {
return nullptr; // Can't go above.
@@ -2520,181 +2000,6 @@ Control *Control::find_prev_valid_focus() const {
return nullptr;
}
-Control::FocusMode Control::get_focus_mode() const {
- return data.focus_mode;
-}
-
-bool Control::has_focus() const {
- return is_inside_tree() && get_viewport()->_gui_control_has_focus(this);
-}
-
-void Control::grab_focus() {
- ERR_FAIL_COND(!is_inside_tree());
-
- if (data.focus_mode == FOCUS_NONE) {
- WARN_PRINT("This control can't grab focus. Use set_focus_mode() to allow a control to get focus.");
- return;
- }
-
- get_viewport()->_gui_control_grab_focus(this);
-}
-
-void Control::release_focus() {
- ERR_FAIL_COND(!is_inside_tree());
-
- if (!has_focus()) {
- return;
- }
-
- get_viewport()->gui_release_focus();
-}
-
-bool Control::is_top_level_control() const {
- return is_inside_tree() && (!data.parent_canvas_item && !data.RI && is_set_as_top_level());
-}
-
-void Control::_propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign) {
- Control *c = Object::cast_to<Control>(p_at);
-
- if (c && c != p_owner && c->data.theme.is_valid()) { // has a theme, this can't be propagated
- return;
- }
-
- Window *w = c == nullptr ? Object::cast_to<Window>(p_at) : nullptr;
-
- if (w && w != p_owner_window && w->theme.is_valid()) { // has a theme, this can't be propagated
- return;
- }
-
- for (int i = 0; i < p_at->get_child_count(); i++) {
- CanvasItem *child = Object::cast_to<CanvasItem>(p_at->get_child(i));
- if (child) {
- _propagate_theme_changed(child, p_owner, p_owner_window, p_assign);
- } else {
- Window *window = Object::cast_to<Window>(p_at->get_child(i));
- if (window) {
- _propagate_theme_changed(window, p_owner, p_owner_window, p_assign);
- }
- }
- }
-
- if (c) {
- if (p_assign) {
- c->data.theme_owner = p_owner;
- c->data.theme_owner_window = p_owner_window;
- }
- c->notification(Control::NOTIFICATION_THEME_CHANGED);
- c->emit_signal(SceneStringNames::get_singleton()->theme_changed);
- }
-
- if (w) {
- if (p_assign) {
- w->theme_owner = p_owner;
- w->theme_owner_window = p_owner_window;
- }
- w->notification(Window::NOTIFICATION_THEME_CHANGED);
- w->emit_signal(SceneStringNames::get_singleton()->theme_changed);
- }
-}
-
-void Control::_theme_changed() {
- _propagate_theme_changed(this, this, nullptr, false);
-}
-
-void Control::_notify_theme_changed() {
- if (!data.bulk_theme_override) {
- notification(NOTIFICATION_THEME_CHANGED);
- }
-}
-
-void Control::set_theme(const Ref<Theme> &p_theme) {
- if (data.theme == p_theme) {
- return;
- }
-
- if (data.theme.is_valid()) {
- data.theme->disconnect("changed", callable_mp(this, &Control::_theme_changed));
- }
-
- data.theme = p_theme;
- if (!p_theme.is_null()) {
- data.theme_owner = this;
- data.theme_owner_window = nullptr;
- _propagate_theme_changed(this, this, nullptr);
- } else {
- Control *parent_c = Object::cast_to<Control>(get_parent());
-
- if (parent_c && (parent_c->data.theme_owner || parent_c->data.theme_owner_window)) {
- Control::_propagate_theme_changed(this, parent_c->data.theme_owner, parent_c->data.theme_owner_window);
- } else {
- Window *parent_w = cast_to<Window>(get_parent());
- if (parent_w && (parent_w->theme_owner || parent_w->theme_owner_window)) {
- Control::_propagate_theme_changed(this, parent_w->theme_owner, parent_w->theme_owner_window);
- } else {
- Control::_propagate_theme_changed(this, nullptr, nullptr);
- }
- }
- }
-
- if (data.theme.is_valid()) {
- data.theme->connect("changed", callable_mp(this, &Control::_theme_changed), varray(), CONNECT_DEFERRED);
- }
-}
-
-Ref<Theme> Control::get_theme() const {
- return data.theme;
-}
-
-void Control::set_theme_type_variation(const StringName &p_theme_type) {
- data.theme_type_variation = p_theme_type;
- _propagate_theme_changed(this, data.theme_owner, data.theme_owner_window);
-}
-
-StringName Control::get_theme_type_variation() const {
- return data.theme_type_variation;
-}
-
-void Control::set_tooltip(const String &p_tooltip) {
- data.tooltip = p_tooltip;
- update_configuration_warnings();
-}
-
-String Control::get_tooltip(const Point2 &p_pos) const {
- return data.tooltip;
-}
-
-Control *Control::make_custom_tooltip(const String &p_text) const {
- Object *ret = nullptr;
- if (GDVIRTUAL_CALL(_make_custom_tooltip, p_text, ret)) {
- return Object::cast_to<Control>(ret);
- }
- return nullptr;
-}
-
-void Control::set_default_cursor_shape(CursorShape p_shape) {
- ERR_FAIL_INDEX(int(p_shape), CURSOR_MAX);
-
- data.default_cursor = p_shape;
-}
-
-Control::CursorShape Control::get_default_cursor_shape() const {
- return data.default_cursor;
-}
-
-Control::CursorShape Control::get_cursor_shape(const Point2 &p_pos) const {
- return data.default_cursor;
-}
-
-Transform2D Control::get_transform() const {
- Transform2D xform = _get_internal_transform();
- xform[2] += get_position();
- return xform;
-}
-
-String Control::_get_tooltip() const {
- return data.tooltip;
-}
-
void Control::set_focus_neighbor(Side p_side, const NodePath &p_neighbor) {
ERR_FAIL_INDEX((int)p_side, 4);
data.focus_neighbor[p_side] = p_neighbor;
@@ -2861,273 +2166,1011 @@ void Control::_window_find_focus_neighbor(const Vector2 &p_dir, Node *p_at, cons
}
}
-void Control::set_h_size_flags(int p_flags) {
- if (data.h_size_flags == p_flags) {
+// Rendering.
+
+void Control::set_default_cursor_shape(CursorShape p_shape) {
+ ERR_FAIL_INDEX(int(p_shape), CURSOR_MAX);
+
+ data.default_cursor = p_shape;
+}
+
+Control::CursorShape Control::get_default_cursor_shape() const {
+ return data.default_cursor;
+}
+
+Control::CursorShape Control::get_cursor_shape(const Point2 &p_pos) const {
+ return data.default_cursor;
+}
+
+void Control::set_disable_visibility_clip(bool p_ignore) {
+ data.disable_visibility_clip = p_ignore;
+ update();
+}
+
+bool Control::is_visibility_clip_disabled() const {
+ return data.disable_visibility_clip;
+}
+
+void Control::set_clip_contents(bool p_clip) {
+ data.clip_contents = p_clip;
+ update();
+}
+
+bool Control::is_clipping_contents() {
+ return data.clip_contents;
+}
+
+// Theming.
+
+void Control::_propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign) {
+ Control *c = Object::cast_to<Control>(p_at);
+
+ if (c && c != p_owner && c->data.theme.is_valid()) { // has a theme, this can't be propagated
return;
}
- data.h_size_flags = p_flags;
- emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
+
+ Window *w = c == nullptr ? Object::cast_to<Window>(p_at) : nullptr;
+
+ if (w && w != p_owner_window && w->theme.is_valid()) { // has a theme, this can't be propagated
+ return;
+ }
+
+ for (int i = 0; i < p_at->get_child_count(); i++) {
+ CanvasItem *child = Object::cast_to<CanvasItem>(p_at->get_child(i));
+ if (child) {
+ _propagate_theme_changed(child, p_owner, p_owner_window, p_assign);
+ } else {
+ Window *window = Object::cast_to<Window>(p_at->get_child(i));
+ if (window) {
+ _propagate_theme_changed(window, p_owner, p_owner_window, p_assign);
+ }
+ }
+ }
+
+ if (c) {
+ if (p_assign) {
+ c->data.theme_owner = p_owner;
+ c->data.theme_owner_window = p_owner_window;
+ }
+ c->notification(Control::NOTIFICATION_THEME_CHANGED);
+ c->emit_signal(SceneStringNames::get_singleton()->theme_changed);
+ }
+
+ if (w) {
+ if (p_assign) {
+ w->theme_owner = p_owner;
+ w->theme_owner_window = p_owner_window;
+ }
+ w->notification(Window::NOTIFICATION_THEME_CHANGED);
+ w->emit_signal(SceneStringNames::get_singleton()->theme_changed);
+ }
}
-int Control::get_h_size_flags() const {
- return data.h_size_flags;
+void Control::_theme_changed() {
+ _propagate_theme_changed(this, this, nullptr, false);
}
-void Control::set_v_size_flags(int p_flags) {
- if (data.v_size_flags == p_flags) {
- return;
+void Control::_theme_property_override_changed() {
+ notification(NOTIFICATION_THEME_CHANGED);
+ emit_signal(SceneStringNames::get_singleton()->theme_changed);
+ update_minimum_size(); // Overrides are likely to affect minimum size.
+}
+
+void Control::_notify_theme_changed() {
+ if (!data.bulk_theme_override) {
+ notification(NOTIFICATION_THEME_CHANGED);
}
- data.v_size_flags = p_flags;
- emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
}
-void Control::set_stretch_ratio(real_t p_ratio) {
- if (data.expand == p_ratio) {
+void Control::set_theme(const Ref<Theme> &p_theme) {
+ if (data.theme == p_theme) {
return;
}
- data.expand = p_ratio;
- emit_signal(SceneStringNames::get_singleton()->size_flags_changed);
+ if (data.theme.is_valid()) {
+ data.theme->disconnect("changed", callable_mp(this, &Control::_theme_changed));
+ }
+
+ data.theme = p_theme;
+ if (!p_theme.is_null()) {
+ data.theme_owner = this;
+ data.theme_owner_window = nullptr;
+ _propagate_theme_changed(this, this, nullptr);
+ } else {
+ Control *parent_c = Object::cast_to<Control>(get_parent());
+
+ if (parent_c && (parent_c->data.theme_owner || parent_c->data.theme_owner_window)) {
+ Control::_propagate_theme_changed(this, parent_c->data.theme_owner, parent_c->data.theme_owner_window);
+ } else {
+ Window *parent_w = cast_to<Window>(get_parent());
+ if (parent_w && (parent_w->theme_owner || parent_w->theme_owner_window)) {
+ Control::_propagate_theme_changed(this, parent_w->theme_owner, parent_w->theme_owner_window);
+ } else {
+ Control::_propagate_theme_changed(this, nullptr, nullptr);
+ }
+ }
+ }
+
+ if (data.theme.is_valid()) {
+ data.theme->connect("changed", callable_mp(this, &Control::_theme_changed), CONNECT_DEFERRED);
+ }
}
-real_t Control::get_stretch_ratio() const {
- return data.expand;
+Ref<Theme> Control::get_theme() const {
+ return data.theme;
}
-void Control::grab_click_focus() {
- ERR_FAIL_COND(!is_inside_tree());
+void Control::set_theme_type_variation(const StringName &p_theme_type) {
+ data.theme_type_variation = p_theme_type;
+ _propagate_theme_changed(this, data.theme_owner, data.theme_owner_window);
+}
- get_viewport()->_gui_grab_click_focus(this);
+StringName Control::get_theme_type_variation() const {
+ return data.theme_type_variation;
}
-void Control::update_minimum_size() {
- if (!is_inside_tree() || data.block_minimum_size_adjust) {
- return;
+/// Theme property lookup.
+
+template <class T>
+T Control::get_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
+ ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, T(), "At least one theme type must be specified.");
+
+ // First, look through each control or window node in the branch, until no valid parent can be found.
+ // Only nodes with a theme resource attached are considered.
+ Control *theme_owner = p_theme_owner;
+ Window *theme_owner_window = p_theme_owner_window;
+
+ while (theme_owner || theme_owner_window) {
+ // For each theme resource check the theme types provided and see if p_name exists with any of them.
+ for (const StringName &E : p_theme_types) {
+ if (theme_owner && theme_owner->data.theme->has_theme_item(p_data_type, p_name, E)) {
+ return theme_owner->data.theme->get_theme_item(p_data_type, p_name, E);
+ }
+
+ if (theme_owner_window && theme_owner_window->theme->has_theme_item(p_data_type, p_name, E)) {
+ return theme_owner_window->theme->get_theme_item(p_data_type, p_name, E);
+ }
+ }
+
+ Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
+ Control *parent_c = Object::cast_to<Control>(parent);
+ if (parent_c) {
+ theme_owner = parent_c->data.theme_owner;
+ theme_owner_window = parent_c->data.theme_owner_window;
+ } else {
+ Window *parent_w = Object::cast_to<Window>(parent);
+ if (parent_w) {
+ theme_owner = parent_w->theme_owner;
+ theme_owner_window = parent_w->theme_owner_window;
+ } else {
+ theme_owner = nullptr;
+ theme_owner_window = nullptr;
+ }
+ }
}
- Control *invalidate = this;
+ // Secondly, check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ for (const StringName &E : p_theme_types) {
+ if (Theme::get_project_default()->has_theme_item(p_data_type, p_name, E)) {
+ return Theme::get_project_default()->get_theme_item(p_data_type, p_name, E);
+ }
+ }
+ }
- //invalidate cache upwards
- while (invalidate && invalidate->data.minimum_size_valid) {
- invalidate->data.minimum_size_valid = false;
- if (invalidate->is_set_as_top_level()) {
- break; // do not go further up
+ // Lastly, fall back on the items defined in the default Theme, if they exist.
+ for (const StringName &E : p_theme_types) {
+ if (Theme::get_default()->has_theme_item(p_data_type, p_name, E)) {
+ return Theme::get_default()->get_theme_item(p_data_type, p_name, E);
}
- if (!invalidate->data.parent && get_parent()) {
- Window *parent_window = Object::cast_to<Window>(get_parent());
- if (parent_window && parent_window->is_wrapping_controls()) {
- parent_window->child_controls_changed();
+ }
+ // If they don't exist, use any type to return the default/empty value.
+ return Theme::get_default()->get_theme_item(p_data_type, p_name, p_theme_types[0]);
+}
+
+bool Control::has_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types) {
+ ERR_FAIL_COND_V_MSG(p_theme_types.size() == 0, false, "At least one theme type must be specified.");
+
+ // First, look through each control or window node in the branch, until no valid parent can be found.
+ // Only nodes with a theme resource attached are considered.
+ Control *theme_owner = p_theme_owner;
+ Window *theme_owner_window = p_theme_owner_window;
+
+ while (theme_owner || theme_owner_window) {
+ // For each theme resource check the theme types provided and see if p_name exists with any of them.
+ for (const StringName &E : p_theme_types) {
+ if (theme_owner && theme_owner->data.theme->has_theme_item(p_data_type, p_name, E)) {
+ return true;
+ }
+
+ if (theme_owner_window && theme_owner_window->theme->has_theme_item(p_data_type, p_name, E)) {
+ return true;
+ }
+ }
+
+ Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
+ Control *parent_c = Object::cast_to<Control>(parent);
+ if (parent_c) {
+ theme_owner = parent_c->data.theme_owner;
+ theme_owner_window = parent_c->data.theme_owner_window;
+ } else {
+ Window *parent_w = Object::cast_to<Window>(parent);
+ if (parent_w) {
+ theme_owner = parent_w->theme_owner;
+ theme_owner_window = parent_w->theme_owner_window;
+ } else {
+ theme_owner = nullptr;
+ theme_owner_window = nullptr;
}
}
- invalidate = invalidate->data.parent;
}
- if (!is_visible_in_tree()) {
- return;
+ // Secondly, check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ for (const StringName &E : p_theme_types) {
+ if (Theme::get_project_default()->has_theme_item(p_data_type, p_name, E)) {
+ return true;
+ }
+ }
}
- if (data.updating_last_minimum_size) {
- return;
+ // Lastly, fall back on the items defined in the default Theme, if they exist.
+ for (const StringName &E : p_theme_types) {
+ if (Theme::get_default()->has_theme_item(p_data_type, p_name, E)) {
+ return true;
+ }
}
+ return false;
+}
- data.updating_last_minimum_size = true;
+void Control::_get_theme_type_dependencies(const StringName &p_theme_type, List<StringName> *p_list) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (Theme::get_project_default().is_valid() && Theme::get_project_default()->get_type_variation_base(data.theme_type_variation) != StringName()) {
+ Theme::get_project_default()->get_type_dependencies(get_class_name(), data.theme_type_variation, p_list);
+ } else {
+ Theme::get_default()->get_type_dependencies(get_class_name(), data.theme_type_variation, p_list);
+ }
+ } else {
+ Theme::get_default()->get_type_dependencies(p_theme_type, StringName(), p_list);
+ }
+}
- MessageQueue::get_singleton()->push_call(this, "_update_minimum_size");
+Ref<Texture2D> Control::get_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
+ if (tex) {
+ return *tex;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<Ref<Texture2D>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types);
}
-int Control::get_v_size_flags() const {
- return data.v_size_flags;
+Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const Ref<StyleBox> *style = data.style_override.getptr(p_name);
+ if (style) {
+ return *style;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<Ref<StyleBox>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types);
}
-void Control::set_mouse_filter(MouseFilter p_filter) {
- ERR_FAIL_INDEX(p_filter, 3);
- data.mouse_filter = p_filter;
- notify_property_list_changed();
- update_configuration_warnings();
+Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const Ref<Font> *font = data.font_override.getptr(p_name);
+ if (font) {
+ return *font;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<Ref<Font>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types);
}
-Control::MouseFilter Control::get_mouse_filter() const {
- return data.mouse_filter;
+int Control::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const int *font_size = data.font_size_override.getptr(p_name);
+ if (font_size && (*font_size) > 0) {
+ return *font_size;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types);
}
-void Control::set_force_pass_scroll_events(bool p_force_pass_scroll_events) {
- data.force_pass_scroll_events = p_force_pass_scroll_events;
+Color Control::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const Color *color = data.color_override.getptr(p_name);
+ if (color) {
+ return *color;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<Color>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types);
}
-bool Control::is_force_pass_scroll_events() const {
- return data.force_pass_scroll_events;
+int Control::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ const int *constant = data.constant_override.getptr(p_name);
+ if (constant) {
+ return *constant;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types);
}
-void Control::warp_mouse(const Point2 &p_position) {
- ERR_FAIL_COND(!is_inside_tree());
- get_viewport()->warp_mouse(get_global_transform_with_canvas().xform(p_position));
+bool Control::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_icon_override(p_name)) {
+ return true;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types);
}
-bool Control::is_text_field() const {
- return false;
+bool Control::has_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_stylebox_override(p_name)) {
+ return true;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types);
}
-Array Control::structured_text_parser(TextServer::StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {
- if (p_parser_type == TextServer::STRUCTURED_TEXT_CUSTOM) {
- Array ret;
- if (GDVIRTUAL_CALL(_structured_text_parser, p_args, p_text, ret)) {
- return ret;
- } else {
- return Array();
+bool Control::has_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_font_override(p_name)) {
+ return true;
}
- } else {
- return TS->parse_structured_text(p_parser_type, p_args, p_text);
}
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types);
}
-void Control::set_rotation(real_t p_radians) {
- data.rotation = p_radians;
- update();
- _notify_transform();
+bool Control::has_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_font_size_override(p_name)) {
+ return true;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types);
}
-real_t Control::get_rotation() const {
- return data.rotation;
+bool Control::has_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_color_override(p_name)) {
+ return true;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types);
}
-void Control::_override_changed() {
- notification(NOTIFICATION_THEME_CHANGED);
- emit_signal(SceneStringNames::get_singleton()->theme_changed);
- update_minimum_size(); // Overrides are likely to affect minimum size.
+bool Control::has_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
+ if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
+ if (has_theme_constant_override(p_name)) {
+ return true;
+ }
+ }
+
+ List<StringName> theme_types;
+ _get_theme_type_dependencies(p_theme_type, &theme_types);
+ return has_theme_item_in_types(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types);
}
-void Control::set_pivot_offset(const Vector2 &p_pivot) {
- data.pivot_offset = p_pivot;
- update();
- _notify_transform();
+/// Local property overrides.
+
+void Control::add_theme_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) {
+ ERR_FAIL_COND(!p_icon.is_valid());
+
+ if (data.icon_override.has(p_name)) {
+ data.icon_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
+ }
+
+ data.icon_override[p_name] = p_icon;
+ data.icon_override[p_name]->connect("changed", callable_mp(this, &Control::_theme_property_override_changed), CONNECT_REFERENCE_COUNTED);
+ _notify_theme_changed();
}
-Vector2 Control::get_pivot_offset() const {
- return data.pivot_offset;
+void Control::add_theme_style_override(const StringName &p_name, const Ref<StyleBox> &p_style) {
+ ERR_FAIL_COND(!p_style.is_valid());
+
+ if (data.style_override.has(p_name)) {
+ data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
+ }
+
+ data.style_override[p_name] = p_style;
+ data.style_override[p_name]->connect("changed", callable_mp(this, &Control::_theme_property_override_changed), CONNECT_REFERENCE_COUNTED);
+ _notify_theme_changed();
}
-void Control::set_scale(const Vector2 &p_scale) {
- data.scale = p_scale;
- // Avoid having 0 scale values, can lead to errors in physics and rendering.
- if (data.scale.x == 0) {
- data.scale.x = CMP_EPSILON;
+void Control::add_theme_font_override(const StringName &p_name, const Ref<Font> &p_font) {
+ ERR_FAIL_COND(!p_font.is_valid());
+
+ if (data.font_override.has(p_name)) {
+ data.font_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
}
- if (data.scale.y == 0) {
- data.scale.y = CMP_EPSILON;
+
+ data.font_override[p_name] = p_font;
+ data.font_override[p_name]->connect("changed", callable_mp(this, &Control::_theme_property_override_changed), CONNECT_REFERENCE_COUNTED);
+ _notify_theme_changed();
+}
+
+void Control::add_theme_font_size_override(const StringName &p_name, int p_font_size) {
+ data.font_size_override[p_name] = p_font_size;
+ _notify_theme_changed();
+}
+
+void Control::add_theme_color_override(const StringName &p_name, const Color &p_color) {
+ data.color_override[p_name] = p_color;
+ _notify_theme_changed();
+}
+
+void Control::add_theme_constant_override(const StringName &p_name, int p_constant) {
+ data.constant_override[p_name] = p_constant;
+ _notify_theme_changed();
+}
+
+void Control::remove_theme_icon_override(const StringName &p_name) {
+ if (data.icon_override.has(p_name)) {
+ data.icon_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
}
- update();
- _notify_transform();
+
+ data.icon_override.erase(p_name);
+ _notify_theme_changed();
}
-Vector2 Control::get_scale() const {
- return data.scale;
+void Control::remove_theme_style_override(const StringName &p_name) {
+ if (data.style_override.has(p_name)) {
+ data.style_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
+ }
+
+ data.style_override.erase(p_name);
+ _notify_theme_changed();
}
-Control *Control::get_root_parent_control() const {
- const CanvasItem *ci = this;
- const Control *root = this;
+void Control::remove_theme_font_override(const StringName &p_name) {
+ if (data.font_override.has(p_name)) {
+ data.font_override[p_name]->disconnect("changed", callable_mp(this, &Control::_theme_property_override_changed));
+ }
- while (ci) {
- const Control *c = Object::cast_to<Control>(ci);
- if (c) {
- root = c;
+ data.font_override.erase(p_name);
+ _notify_theme_changed();
+}
- if (c->data.RI || c->is_top_level_control()) {
- break;
+void Control::remove_theme_font_size_override(const StringName &p_name) {
+ data.font_size_override.erase(p_name);
+ _notify_theme_changed();
+}
+
+void Control::remove_theme_color_override(const StringName &p_name) {
+ data.color_override.erase(p_name);
+ _notify_theme_changed();
+}
+
+void Control::remove_theme_constant_override(const StringName &p_name) {
+ data.constant_override.erase(p_name);
+ _notify_theme_changed();
+}
+
+bool Control::has_theme_icon_override(const StringName &p_name) const {
+ const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
+ return tex != nullptr;
+}
+
+bool Control::has_theme_stylebox_override(const StringName &p_name) const {
+ const Ref<StyleBox> *style = data.style_override.getptr(p_name);
+ return style != nullptr;
+}
+
+bool Control::has_theme_font_override(const StringName &p_name) const {
+ const Ref<Font> *font = data.font_override.getptr(p_name);
+ return font != nullptr;
+}
+
+bool Control::has_theme_font_size_override(const StringName &p_name) const {
+ const int *font_size = data.font_size_override.getptr(p_name);
+ return font_size != nullptr;
+}
+
+bool Control::has_theme_color_override(const StringName &p_name) const {
+ const Color *color = data.color_override.getptr(p_name);
+ return color != nullptr;
+}
+
+bool Control::has_theme_constant_override(const StringName &p_name) const {
+ const int *constant = data.constant_override.getptr(p_name);
+ return constant != nullptr;
+}
+
+/// Default theme properties.
+
+float Control::fetch_theme_default_base_scale(Control *p_theme_owner, Window *p_theme_owner_window) {
+ // First, look through each control or window node in the branch, until no valid parent can be found.
+ // Only nodes with a theme resource attached are considered.
+ // For each theme resource see if their assigned theme has the default value defined and valid.
+ Control *theme_owner = p_theme_owner;
+ Window *theme_owner_window = p_theme_owner_window;
+
+ while (theme_owner || theme_owner_window) {
+ if (theme_owner && theme_owner->data.theme->has_default_base_scale()) {
+ return theme_owner->data.theme->get_default_base_scale();
+ }
+
+ if (theme_owner_window && theme_owner_window->theme->has_default_base_scale()) {
+ return theme_owner_window->theme->get_default_base_scale();
+ }
+
+ Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
+ Control *parent_c = Object::cast_to<Control>(parent);
+ if (parent_c) {
+ theme_owner = parent_c->data.theme_owner;
+ theme_owner_window = parent_c->data.theme_owner_window;
+ } else {
+ Window *parent_w = Object::cast_to<Window>(parent);
+ if (parent_w) {
+ theme_owner = parent_w->theme_owner;
+ theme_owner_window = parent_w->theme_owner_window;
+ } else {
+ theme_owner = nullptr;
+ theme_owner_window = nullptr;
}
}
+ }
- ci = ci->get_parent_item();
+ // Secondly, check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ if (Theme::get_project_default()->has_default_base_scale()) {
+ return Theme::get_project_default()->get_default_base_scale();
+ }
}
- return const_cast<Control *>(root);
+ // Lastly, fall back on the default Theme.
+ if (Theme::get_default()->has_default_base_scale()) {
+ return Theme::get_default()->get_default_base_scale();
+ }
+ return Theme::get_fallback_base_scale();
}
-void Control::set_block_minimum_size_adjust(bool p_block) {
- data.block_minimum_size_adjust = p_block;
+float Control::get_theme_default_base_scale() const {
+ return fetch_theme_default_base_scale(data.theme_owner, data.theme_owner_window);
}
-bool Control::is_minimum_size_adjust_blocked() const {
- return data.block_minimum_size_adjust;
-}
+Ref<Font> Control::fetch_theme_default_font(Control *p_theme_owner, Window *p_theme_owner_window) {
+ // First, look through each control or window node in the branch, until no valid parent can be found.
+ // Only nodes with a theme resource attached are considered.
+ // For each theme resource see if their assigned theme has the default value defined and valid.
+ Control *theme_owner = p_theme_owner;
+ Window *theme_owner_window = p_theme_owner_window;
-void Control::set_disable_visibility_clip(bool p_ignore) {
- data.disable_visibility_clip = p_ignore;
- update();
+ while (theme_owner || theme_owner_window) {
+ if (theme_owner && theme_owner->data.theme->has_default_font()) {
+ return theme_owner->data.theme->get_default_font();
+ }
+
+ if (theme_owner_window && theme_owner_window->theme->has_default_font()) {
+ return theme_owner_window->theme->get_default_font();
+ }
+
+ Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
+ Control *parent_c = Object::cast_to<Control>(parent);
+ if (parent_c) {
+ theme_owner = parent_c->data.theme_owner;
+ theme_owner_window = parent_c->data.theme_owner_window;
+ } else {
+ Window *parent_w = Object::cast_to<Window>(parent);
+ if (parent_w) {
+ theme_owner = parent_w->theme_owner;
+ theme_owner_window = parent_w->theme_owner_window;
+ } else {
+ theme_owner = nullptr;
+ theme_owner_window = nullptr;
+ }
+ }
+ }
+
+ // Secondly, check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ if (Theme::get_project_default()->has_default_font()) {
+ return Theme::get_project_default()->get_default_font();
+ }
+ }
+
+ // Lastly, fall back on the default Theme.
+ if (Theme::get_default()->has_default_font()) {
+ return Theme::get_default()->get_default_font();
+ }
+ return Theme::get_fallback_font();
}
-bool Control::is_visibility_clip_disabled() const {
- return data.disable_visibility_clip;
+Ref<Font> Control::get_theme_default_font() const {
+ return fetch_theme_default_font(data.theme_owner, data.theme_owner_window);
}
-void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
- Node::get_argument_options(p_function, p_idx, r_options);
+int Control::fetch_theme_default_font_size(Control *p_theme_owner, Window *p_theme_owner_window) {
+ // First, look through each control or window node in the branch, until no valid parent can be found.
+ // Only nodes with a theme resource attached are considered.
+ // For each theme resource see if their assigned theme has the default value defined and valid.
+ Control *theme_owner = p_theme_owner;
+ Window *theme_owner_window = p_theme_owner_window;
- if (p_idx == 0) {
- List<StringName> sn;
- String pf = p_function;
- if (pf == "add_theme_color_override" || pf == "has_theme_color" || pf == "has_theme_color_override" || pf == "get_theme_color") {
- Theme::get_default()->get_color_list(get_class(), &sn);
- } else if (pf == "add_theme_style_override" || pf == "has_theme_style" || pf == "has_theme_style_override" || pf == "get_theme_style") {
- Theme::get_default()->get_stylebox_list(get_class(), &sn);
- } else if (pf == "add_theme_font_override" || pf == "has_theme_font" || pf == "has_theme_font_override" || pf == "get_theme_font") {
- Theme::get_default()->get_font_list(get_class(), &sn);
- } else if (pf == "add_theme_font_size_override" || pf == "has_theme_font_size" || pf == "has_theme_font_size_override" || pf == "get_theme_font_size") {
- Theme::get_default()->get_font_size_list(get_class(), &sn);
- } else if (pf == "add_theme_constant_override" || pf == "has_theme_constant" || pf == "has_theme_constant_override" || pf == "get_theme_constant") {
- Theme::get_default()->get_constant_list(get_class(), &sn);
+ while (theme_owner || theme_owner_window) {
+ if (theme_owner && theme_owner->data.theme->has_default_font_size()) {
+ return theme_owner->data.theme->get_default_font_size();
}
- sn.sort_custom<StringName::AlphCompare>();
- for (const StringName &name : sn) {
- r_options->push_back(String(name).quote());
+ if (theme_owner_window && theme_owner_window->theme->has_default_font_size()) {
+ return theme_owner_window->theme->get_default_font_size();
+ }
+
+ Node *parent = theme_owner ? theme_owner->get_parent() : theme_owner_window->get_parent();
+ Control *parent_c = Object::cast_to<Control>(parent);
+ if (parent_c) {
+ theme_owner = parent_c->data.theme_owner;
+ theme_owner_window = parent_c->data.theme_owner_window;
+ } else {
+ Window *parent_w = Object::cast_to<Window>(parent);
+ if (parent_w) {
+ theme_owner = parent_w->theme_owner;
+ theme_owner_window = parent_w->theme_owner_window;
+ } else {
+ theme_owner = nullptr;
+ theme_owner_window = nullptr;
+ }
}
}
+
+ // Secondly, check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ if (Theme::get_project_default()->has_default_font_size()) {
+ return Theme::get_project_default()->get_default_font_size();
+ }
+ }
+
+ // Lastly, fall back on the default Theme.
+ if (Theme::get_default()->has_default_font_size()) {
+ return Theme::get_default()->get_default_font_size();
+ }
+ return Theme::get_fallback_font_size();
}
-TypedArray<String> Control::get_configuration_warnings() const {
- TypedArray<String> warnings = Node::get_configuration_warnings();
+int Control::get_theme_default_font_size() const {
+ return fetch_theme_default_font_size(data.theme_owner, data.theme_owner_window);
+}
- if (data.mouse_filter == MOUSE_FILTER_IGNORE && !data.tooltip.is_empty()) {
- warnings.push_back(RTR("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\"."));
+/// Bulk actions.
+
+void Control::begin_bulk_theme_override() {
+ data.bulk_theme_override = true;
+}
+
+void Control::end_bulk_theme_override() {
+ ERR_FAIL_COND(!data.bulk_theme_override);
+
+ data.bulk_theme_override = false;
+ _notify_theme_changed();
+}
+
+// Internationalization.
+
+Array Control::structured_text_parser(TextServer::StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {
+ if (p_parser_type == TextServer::STRUCTURED_TEXT_CUSTOM) {
+ Array ret;
+ if (GDVIRTUAL_CALL(_structured_text_parser, p_args, p_text, ret)) {
+ return ret;
+ } else {
+ return Array();
+ }
+ } else {
+ return TS->parse_structured_text(p_parser_type, p_args, p_text);
}
+}
- return warnings;
+void Control::set_layout_direction(Control::LayoutDirection p_direction) {
+ ERR_FAIL_INDEX((int)p_direction, 4);
+
+ data.layout_dir = p_direction;
+ data.is_rtl_dirty = true;
+
+ propagate_notification(NOTIFICATION_LAYOUT_DIRECTION_CHANGED);
}
-void Control::set_clip_contents(bool p_clip) {
- data.clip_contents = p_clip;
- update();
+Control::LayoutDirection Control::get_layout_direction() const {
+ return data.layout_dir;
}
-bool Control::is_clipping_contents() {
- return data.clip_contents;
+bool Control::is_layout_rtl() const {
+ if (data.is_rtl_dirty) {
+ const_cast<Control *>(this)->data.is_rtl_dirty = false;
+ if (data.layout_dir == LAYOUT_DIRECTION_INHERITED) {
+ Window *parent_window = get_parent_window();
+ Control *parent_control = get_parent_control();
+ if (parent_control) {
+ const_cast<Control *>(this)->data.is_rtl = parent_control->is_layout_rtl();
+ } else if (parent_window) {
+ const_cast<Control *>(this)->data.is_rtl = parent_window->is_layout_rtl();
+ } else {
+ if (GLOBAL_GET(SNAME("internationalization/rendering/force_right_to_left_layout_direction"))) {
+ const_cast<Control *>(this)->data.is_rtl = true;
+ } else {
+ String locale = TranslationServer::get_singleton()->get_tool_locale();
+ const_cast<Control *>(this)->data.is_rtl = TS->is_locale_right_to_left(locale);
+ }
+ }
+ } else if (data.layout_dir == LAYOUT_DIRECTION_LOCALE) {
+ if (GLOBAL_GET(SNAME("internationalization/rendering/force_right_to_left_layout_direction"))) {
+ const_cast<Control *>(this)->data.is_rtl = true;
+ } else {
+ String locale = TranslationServer::get_singleton()->get_tool_locale();
+ const_cast<Control *>(this)->data.is_rtl = TS->is_locale_right_to_left(locale);
+ }
+ } else {
+ const_cast<Control *>(this)->data.is_rtl = (data.layout_dir == LAYOUT_DIRECTION_RTL);
+ }
+ }
+ return data.is_rtl;
}
-void Control::set_h_grow_direction(GrowDirection p_direction) {
- ERR_FAIL_INDEX((int)p_direction, 3);
+void Control::set_auto_translate(bool p_enable) {
+ if (p_enable == data.auto_translate) {
+ return;
+ }
- data.h_grow = p_direction;
- _size_changed();
+ data.auto_translate = p_enable;
+
+ notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
-Control::GrowDirection Control::get_h_grow_direction() const {
- return data.h_grow;
+bool Control::is_auto_translating() const {
+ return data.auto_translate;
}
-void Control::set_v_grow_direction(GrowDirection p_direction) {
- ERR_FAIL_INDEX((int)p_direction, 3);
+// Extra properties.
- data.v_grow = p_direction;
- _size_changed();
+void Control::set_tooltip(const String &p_tooltip) {
+ data.tooltip = p_tooltip;
+ update_configuration_warnings();
}
-Control::GrowDirection Control::get_v_grow_direction() const {
- return data.v_grow;
+String Control::_get_tooltip() const {
+ return data.tooltip;
+}
+
+String Control::get_tooltip(const Point2 &p_pos) const {
+ return data.tooltip;
+}
+
+Control *Control::make_custom_tooltip(const String &p_text) const {
+ Object *ret = nullptr;
+ if (GDVIRTUAL_CALL(_make_custom_tooltip, p_text, ret)) {
+ return Object::cast_to<Control>(ret);
+ }
+ return nullptr;
+}
+
+// Base object overrides.
+
+void Control::add_child_notify(Node *p_child) {
+ Control *child_c = Object::cast_to<Control>(p_child);
+
+ if (child_c && child_c->data.theme.is_null() && (data.theme_owner || data.theme_owner_window)) {
+ _propagate_theme_changed(child_c, data.theme_owner, data.theme_owner_window); //need to propagate here, since many controls may require setting up stuff
+ }
+
+ Window *child_w = Object::cast_to<Window>(p_child);
+
+ if (child_w && child_w->theme.is_null() && (data.theme_owner || data.theme_owner_window)) {
+ _propagate_theme_changed(child_w, data.theme_owner, data.theme_owner_window); //need to propagate here, since many controls may require setting up stuff
+ }
+}
+
+void Control::remove_child_notify(Node *p_child) {
+ Control *child_c = Object::cast_to<Control>(p_child);
+
+ if (child_c && (child_c->data.theme_owner || child_c->data.theme_owner_window) && child_c->data.theme.is_null()) {
+ _propagate_theme_changed(child_c, nullptr, nullptr);
+ }
+
+ Window *child_w = Object::cast_to<Window>(p_child);
+
+ if (child_w && (child_w->theme_owner || child_w->theme_owner_window) && child_w->theme.is_null()) {
+ _propagate_theme_changed(child_w, nullptr, nullptr);
+ }
+}
+
+void Control::_notification(int p_notification) {
+ switch (p_notification) {
+ case NOTIFICATION_POST_ENTER_TREE: {
+ data.minimum_size_valid = false;
+ data.is_rtl_dirty = true;
+ _size_changed();
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ release_focus();
+ get_viewport()->_gui_remove_control(this);
+ } break;
+
+ case NOTIFICATION_READY: {
+#ifdef DEBUG_ENABLED
+ connect("ready", callable_mp(this, &Control::_clear_size_warning), CONNECT_DEFERRED | CONNECT_ONESHOT);
+#endif
+ } break;
+
+ case NOTIFICATION_ENTER_CANVAS: {
+ data.parent = Object::cast_to<Control>(get_parent());
+ data.parent_window = Object::cast_to<Window>(get_parent());
+ data.is_rtl_dirty = true;
+
+ if (data.theme.is_null()) {
+ if (data.parent && (data.parent->data.theme_owner || data.parent->data.theme_owner_window)) {
+ data.theme_owner = data.parent->data.theme_owner;
+ data.theme_owner_window = data.parent->data.theme_owner_window;
+ notification(NOTIFICATION_THEME_CHANGED);
+ } else if (data.parent_window && (data.parent_window->theme_owner || data.parent_window->theme_owner_window)) {
+ data.theme_owner = data.parent_window->theme_owner;
+ data.theme_owner_window = data.parent_window->theme_owner_window;
+ notification(NOTIFICATION_THEME_CHANGED);
+ }
+ }
+
+ CanvasItem *node = this;
+ bool has_parent_control = false;
+
+ while (!node->is_set_as_top_level()) {
+ CanvasItem *parent = Object::cast_to<CanvasItem>(node->get_parent());
+ if (!parent) {
+ break;
+ }
+
+ Control *parent_control = Object::cast_to<Control>(parent);
+ if (parent_control) {
+ has_parent_control = true;
+ break;
+ }
+
+ node = parent;
+ }
+
+ if (has_parent_control) {
+ // Do nothing, has a parent control.
+ } else {
+ // Is a regular root control or top_level.
+ Viewport *viewport = get_viewport();
+ ERR_FAIL_COND(!viewport);
+ data.RI = viewport->_gui_add_root_control(this);
+ }
+
+ data.parent_canvas_item = get_parent_item();
+
+ if (data.parent_canvas_item) {
+ data.parent_canvas_item->connect("item_rect_changed", callable_mp(this, &Control::_size_changed));
+ } else {
+ // Connect viewport.
+ Viewport *viewport = get_viewport();
+ ERR_FAIL_COND(!viewport);
+ viewport->connect("size_changed", callable_mp(this, &Control::_size_changed));
+ }
+ } break;
+
+ case NOTIFICATION_EXIT_CANVAS: {
+ if (data.parent_canvas_item) {
+ data.parent_canvas_item->disconnect("item_rect_changed", callable_mp(this, &Control::_size_changed));
+ data.parent_canvas_item = nullptr;
+ } else if (!is_set_as_top_level()) {
+ //disconnect viewport
+ Viewport *viewport = get_viewport();
+ ERR_FAIL_COND(!viewport);
+ viewport->disconnect("size_changed", callable_mp(this, &Control::_size_changed));
+ }
+
+ if (data.RI) {
+ get_viewport()->_gui_remove_root_control(data.RI);
+ data.RI = nullptr;
+ }
+
+ data.parent = nullptr;
+ data.parent_canvas_item = nullptr;
+ data.parent_window = nullptr;
+ data.is_rtl_dirty = true;
+ } break;
+
+ case NOTIFICATION_MOVED_IN_PARENT: {
+ // some parents need to know the order of the children to draw (like TabContainer)
+ // update if necessary
+ if (data.parent) {
+ data.parent->update();
+ }
+ update();
+
+ if (data.RI) {
+ get_viewport()->_gui_set_root_order_dirty();
+ }
+ } break;
+
+ case NOTIFICATION_RESIZED: {
+ emit_signal(SceneStringNames::get_singleton()->resized);
+ } break;
+
+ case NOTIFICATION_DRAW: {
+ _update_canvas_item_transform();
+ RenderingServer::get_singleton()->canvas_item_set_custom_rect(get_canvas_item(), !data.disable_visibility_clip, Rect2(Point2(), get_size()));
+ RenderingServer::get_singleton()->canvas_item_set_clip(get_canvas_item(), data.clip_contents);
+ } break;
+
+ case NOTIFICATION_MOUSE_ENTER: {
+ emit_signal(SceneStringNames::get_singleton()->mouse_entered);
+ } break;
+
+ case NOTIFICATION_MOUSE_EXIT: {
+ emit_signal(SceneStringNames::get_singleton()->mouse_exited);
+ } break;
+
+ case NOTIFICATION_FOCUS_ENTER: {
+ emit_signal(SceneStringNames::get_singleton()->focus_entered);
+ update();
+ } break;
+
+ case NOTIFICATION_FOCUS_EXIT: {
+ emit_signal(SceneStringNames::get_singleton()->focus_exited);
+ update();
+ } break;
+
+ case NOTIFICATION_THEME_CHANGED: {
+ update_minimum_size();
+ update();
+ } break;
+
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (!is_visible_in_tree()) {
+ if (get_viewport() != nullptr) {
+ get_viewport()->_gui_hide_control(this);
+ }
+ } else {
+ data.minimum_size_valid = false;
+ _update_minimum_size();
+ _size_changed();
+ }
+ } break;
+
+ case NOTIFICATION_TRANSLATION_CHANGED:
+ case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
+ if (is_inside_tree()) {
+ data.is_rtl_dirty = true;
+ _size_changed();
+ }
+ } break;
+ }
}
void Control::_bind_methods() {
- //ClassDB::bind_method(D_METHOD("_window_resize_event"),&Control::_window_resize_event);
ClassDB::bind_method(D_METHOD("_update_minimum_size"), &Control::_update_minimum_size);
ClassDB::bind_method(D_METHOD("accept_event"), &Control::accept_event);
diff --git a/scene/gui/control.h b/scene/gui/control.h
index d9c29a9c87..9f17eccc3b 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -159,13 +159,16 @@ private:
};
struct Data {
- Point2 pos_cache;
- Size2 size_cache;
- Size2 minimum_size_cache;
- bool minimum_size_valid = false;
+ // Global relations.
- Size2 last_minimum_size;
- bool updating_last_minimum_size = false;
+ List<Control *>::Element *RI = nullptr;
+
+ Control *parent = nullptr;
+ Window *parent_window = nullptr;
+ CanvasItem *parent_canvas_item = nullptr;
+ ObjectID drag_owner;
+
+ // Positioning and sizing.
real_t offset[4] = { 0.0, 0.0, 0.0, 0.0 };
real_t anchor[4] = { ANCHOR_BEGIN, ANCHOR_BEGIN, ANCHOR_BEGIN, ANCHOR_BEGIN };
@@ -173,49 +176,51 @@ private:
GrowDirection h_grow = GROW_DIRECTION_END;
GrowDirection v_grow = GROW_DIRECTION_END;
- LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
- bool is_rtl_dirty = true;
- bool is_rtl = false;
-
- bool auto_translate = true;
-
real_t rotation = 0.0;
Vector2 scale = Vector2(1, 1);
Vector2 pivot_offset;
+
+ Point2 pos_cache;
+ Size2 size_cache;
+ Size2 minimum_size_cache;
+ bool minimum_size_valid = false;
+
+ Size2 last_minimum_size;
+ bool updating_last_minimum_size = false;
+ bool block_minimum_size_adjust = false;
+
bool size_warning = true;
+ // Container sizing.
+
int h_size_flags = SIZE_FILL;
int v_size_flags = SIZE_FILL;
real_t expand = 1.0;
Point2 custom_minimum_size;
+ // Input events and rendering.
+
MouseFilter mouse_filter = MOUSE_FILTER_STOP;
bool force_pass_scroll_events = true;
bool clip_contents = false;
-
- bool block_minimum_size_adjust = false;
bool disable_visibility_clip = false;
- Control *parent = nullptr;
- ObjectID drag_owner;
- Ref<Theme> theme;
- Control *theme_owner = nullptr;
- Window *theme_owner_window = nullptr;
- Window *parent_window = nullptr;
- StringName theme_type_variation;
-
- String tooltip;
CursorShape default_cursor = CURSOR_ARROW;
- List<Control *>::Element *RI = nullptr;
-
- CanvasItem *parent_canvas_item = nullptr;
+ // Focus.
NodePath focus_neighbor[4];
NodePath focus_next;
NodePath focus_prev;
+ // Theming.
+
+ Ref<Theme> theme;
+ Control *theme_owner = nullptr;
+ Window *theme_owner_window = nullptr;
+ StringName theme_type_variation;
+
bool bulk_theme_override = false;
Theme::ThemeIconMap icon_override;
Theme::ThemeStyleMap style_override;
@@ -224,50 +229,69 @@ private:
Theme::ThemeColorMap color_override;
Theme::ThemeConstantMap constant_override;
+ // Internationalization.
+
+ LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
+ bool is_rtl_dirty = true;
+ bool is_rtl = false;
+
+ bool auto_translate = true;
+
+ // Extra properties.
+
+ String tooltip;
+
} data;
+ // Dynamic properties.
+
static constexpr unsigned properties_managed_by_container_count = 12;
static String properties_managed_by_container[properties_managed_by_container_count];
- void _window_find_focus_neighbor(const Vector2 &p_dir, Node *p_at, const Point2 *p_points, real_t p_min, real_t &r_closest_dist, Control **r_closest);
- Control *_get_focus_neighbor(Side p_side, int p_count = 0);
+ // Global relations.
+
+ friend class Viewport;
+ friend class Window;
+
+ // Positioning and sizing.
+
+ void _update_canvas_item_transform();
+ Transform2D _get_internal_transform() const;
void _set_anchor(Side p_side, real_t p_anchor);
void _set_position(const Point2 &p_point);
void _set_global_position(const Point2 &p_point);
void _set_size(const Size2 &p_size);
+ void _compute_offsets(Rect2 p_rect, const real_t p_anchors[4], real_t (&r_offsets)[4]);
+ void _compute_anchors(Rect2 p_rect, const real_t p_offsets[4], real_t (&r_anchors)[4]);
+
void _set_layout_mode(LayoutMode p_mode);
LayoutMode _get_layout_mode() const;
-
void _set_anchors_layout_preset(int p_preset);
int _get_anchors_layout_preset() const;
- void _theme_changed();
- void _notify_theme_changed();
-
+ void _update_minimum_size_cache();
void _update_minimum_size();
+ void _size_changed();
void _clear_size_warning();
- void _compute_offsets(Rect2 p_rect, const real_t p_anchors[4], real_t (&r_offsets)[4]);
- void _compute_anchors(Rect2 p_rect, const real_t p_offsets[4], real_t (&r_anchors)[4]);
-
- void _size_changed();
- String _get_tooltip() const;
+ // Input events.
- void _override_changed();
+ void _call_gui_input(const Ref<InputEvent> &p_event);
- void _update_canvas_item_transform();
+ // Focus.
- Transform2D _get_internal_transform() const;
+ void _window_find_focus_neighbor(const Vector2 &p_dir, Node *p_at, const Point2 *p_points, real_t p_min, real_t &r_closest_dist, Control **r_closest);
+ Control *_get_focus_neighbor(Side p_side, int p_count = 0);
- friend class Viewport;
+ // Theming.
- void _call_gui_input(const Ref<InputEvent> &p_event);
+ void _theme_changed();
+ void _theme_property_override_changed();
+ void _notify_theme_changed();
- void _update_minimum_size_cache();
- friend class Window;
static void _propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign = true);
template <class T>
@@ -275,24 +299,31 @@ private:
static bool has_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
_FORCE_INLINE_ void _get_theme_type_dependencies(const StringName &p_theme_type, List<StringName> *p_list) const;
-protected:
- virtual void add_child_notify(Node *p_child) override;
- virtual void remove_child_notify(Node *p_child) override;
+ // Extra properties.
- //virtual void _window_gui_input(InputEvent p_event);
+ String _get_tooltip() const;
- virtual Array structured_text_parser(TextServer::StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const;
+protected:
+ // Dynamic properties.
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;
-
virtual void _validate_property(PropertyInfo &property) const override;
+ // Internationalization.
+
+ virtual Array structured_text_parser(TextServer::StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const;
+
+ // Base object overrides.
+
+ virtual void add_child_notify(Node *p_child) override;
+ virtual void remove_child_notify(Node *p_child) override;
+
void _notification(int p_notification);
static void _bind_methods();
- //bind helpers
+ // Exposed virtual methods.
GDVIRTUAL1RC(bool, _has_point, Vector2)
GDVIRTUAL2RC(Array, _structured_text_parser, Array, String)
@@ -307,8 +338,6 @@ protected:
public:
enum {
- /* NOTIFICATION_DRAW=30,
- NOTIFICATION_VISIBILITY_CHANGED=38*/
NOTIFICATION_RESIZED = 40,
NOTIFICATION_MOUSE_ENTER = 41,
NOTIFICATION_MOUSE_EXIT = 42,
@@ -318,10 +347,11 @@ public:
NOTIFICATION_SCROLL_BEGIN = 47,
NOTIFICATION_SCROLL_END = 48,
NOTIFICATION_LAYOUT_DIRECTION_CHANGED = 49,
-
};
- /* EDITOR */
+ // Editor plugin interoperability.
+
+ // TODO: Decouple controls from their editor plugin and get rid of this.
#ifdef TOOLS_ENABLED
virtual Dictionary _edit_get_state() const override;
virtual void _edit_set_state(const Dictionary &p_state) override;
@@ -347,56 +377,50 @@ public:
virtual Size2 _edit_get_minimum_size() const override;
#endif
- virtual void gui_input(const Ref<InputEvent> &p_event);
+ // Editor integration.
- void accept_event();
+ virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
+ TypedArray<String> get_configuration_warnings() const override;
- virtual Size2 get_minimum_size() const;
- virtual Size2 get_combined_minimum_size() const;
- virtual bool has_point(const Point2 &p_point) const;
- virtual void set_drag_forwarding(Object *p_target);
- virtual Variant get_drag_data(const Point2 &p_point);
- virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
- virtual void drop_data(const Point2 &p_point, const Variant &p_data);
- void set_drag_preview(Control *p_control);
- void force_drag(const Variant &p_data, Control *p_control);
- bool is_drag_successful() const;
+ virtual bool is_text_field() const;
- void set_custom_minimum_size(const Size2 &p_custom);
- Size2 get_custom_minimum_size() const;
+ // Global relations.
+
+ bool is_top_level_control() const;
Control *get_parent_control() const;
Window *get_parent_window() const;
+ Control *get_root_parent_control() const;
- void set_layout_direction(LayoutDirection p_direction);
- LayoutDirection get_layout_direction() const;
- virtual bool is_layout_rtl() const;
-
- void set_auto_translate(bool p_enable);
- bool is_auto_translating() const;
- _FORCE_INLINE_ String atr(const String p_string) const { return is_auto_translating() ? tr(p_string) : p_string; };
+ Size2 get_parent_area_size() const;
+ Rect2 get_parent_anchorable_rect() const;
- /* POSITIONING */
+ // Positioning and sizing.
- void set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets = true);
- void set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
- void set_anchors_and_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
- void set_grow_direction_preset(LayoutPreset p_preset);
+ virtual Transform2D get_transform() const override;
void set_anchor(Side p_side, real_t p_anchor, bool p_keep_offset = true, bool p_push_opposite_anchor = true);
real_t get_anchor(Side p_side) const;
-
void set_offset(Side p_side, real_t p_value);
real_t get_offset(Side p_side) const;
-
void set_anchor_and_offset(Side p_side, real_t p_anchor, real_t p_pos, bool p_push_opposite_anchor = true);
- void set_begin(const Point2 &p_point); // helper
- void set_end(const Point2 &p_point); // helper
-
+ // TODO: Rename to set_begin/end_offsets ?
+ void set_begin(const Point2 &p_point);
Point2 get_begin() const;
+ void set_end(const Point2 &p_point);
Point2 get_end() const;
+ void set_h_grow_direction(GrowDirection p_direction);
+ GrowDirection get_h_grow_direction() const;
+ void set_v_grow_direction(GrowDirection p_direction);
+ GrowDirection get_v_grow_direction() const;
+
+ void set_anchors_preset(LayoutPreset p_preset, bool p_keep_offsets = true);
+ void set_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
+ void set_anchors_and_offsets_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
+ void set_grow_direction_preset(LayoutPreset p_preset);
+
void set_position(const Point2 &p_point, bool p_keep_offsets = false);
void set_global_position(const Point2 &p_point, bool p_keep_offsets = false);
Point2 get_position() const;
@@ -407,52 +431,72 @@ public:
Size2 get_size() const;
void reset_size();
+ void set_rect(const Rect2 &p_rect); // Reset anchors to begin and set rect, for faster container children sorting.
Rect2 get_rect() const;
Rect2 get_global_rect() const;
Rect2 get_screen_rect() const;
Rect2 get_window_rect() const; ///< use with care, as it blocks waiting for the rendering server
Rect2 get_anchorable_rect() const override;
- void set_rect(const Rect2 &p_rect); // Reset anchors to begin and set rect, for faster container children sorting.
-
+ void set_scale(const Vector2 &p_scale);
+ Vector2 get_scale() const;
void set_rotation(real_t p_radians);
real_t get_rotation() const;
-
- void set_h_grow_direction(GrowDirection p_direction);
- GrowDirection get_h_grow_direction() const;
-
- void set_v_grow_direction(GrowDirection p_direction);
- GrowDirection get_v_grow_direction() const;
-
void set_pivot_offset(const Vector2 &p_pivot);
Vector2 get_pivot_offset() const;
- void set_scale(const Vector2 &p_scale);
- Vector2 get_scale() const;
+ void update_minimum_size();
- void set_theme(const Ref<Theme> &p_theme);
- Ref<Theme> get_theme() const;
+ void set_block_minimum_size_adjust(bool p_block);
+ bool is_minimum_size_adjust_blocked() const;
- void set_theme_type_variation(const StringName &p_theme_type);
- StringName get_theme_type_variation() const;
+ virtual Size2 get_minimum_size() const;
+ virtual Size2 get_combined_minimum_size() const;
+
+ void set_custom_minimum_size(const Size2 &p_custom);
+ Size2 get_custom_minimum_size() const;
+
+ // Container sizing.
void set_h_size_flags(int p_flags);
int get_h_size_flags() const;
-
void set_v_size_flags(int p_flags);
int get_v_size_flags() const;
-
void set_stretch_ratio(real_t p_ratio);
real_t get_stretch_ratio() const;
- void update_minimum_size();
+ // Input events.
- /* FOCUS */
+ virtual void gui_input(const Ref<InputEvent> &p_event);
+ void accept_event();
+
+ virtual bool has_point(const Point2 &p_point) const;
+
+ void set_mouse_filter(MouseFilter p_filter);
+ MouseFilter get_mouse_filter() const;
+
+ void set_force_pass_scroll_events(bool p_force_pass_scroll_events);
+ bool is_force_pass_scroll_events() const;
+
+ void warp_mouse(const Point2 &p_position);
+
+ // Drag and drop handling.
+
+ virtual void set_drag_forwarding(Object *p_target);
+ virtual Variant get_drag_data(const Point2 &p_point);
+ virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
+ virtual void drop_data(const Point2 &p_point, const Variant &p_data);
+ void set_drag_preview(Control *p_control);
+ void force_drag(const Variant &p_data, Control *p_control);
+ bool is_drag_successful() const;
+
+ // Focus.
void set_focus_mode(FocusMode p_focus_mode);
FocusMode get_focus_mode() const;
bool has_focus() const;
void grab_focus();
+ void grab_click_focus();
void release_focus();
Control *find_next_valid_focus() const;
@@ -466,13 +510,25 @@ public:
void set_focus_previous(const NodePath &p_prev);
NodePath get_focus_previous() const;
- void set_mouse_filter(MouseFilter p_filter);
- MouseFilter get_mouse_filter() const;
+ // Rendering.
- void set_force_pass_scroll_events(bool p_force_pass_scroll_events);
- bool is_force_pass_scroll_events() const;
+ void set_default_cursor_shape(CursorShape p_shape);
+ CursorShape get_default_cursor_shape() const;
+ virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const;
+
+ void set_clip_contents(bool p_clip);
+ bool is_clipping_contents();
- /* SKINNING */
+ void set_disable_visibility_clip(bool p_ignore);
+ bool is_visibility_clip_disabled() const;
+
+ // Theming.
+
+ void set_theme(const Ref<Theme> &p_theme);
+ Ref<Theme> get_theme() const;
+
+ void set_theme_type_variation(const StringName &p_theme_type);
+ StringName get_theme_type_variation() const;
void begin_bulk_theme_override();
void end_bulk_theme_override();
@@ -520,44 +576,23 @@ public:
Ref<Font> get_theme_default_font() const;
int get_theme_default_font_size() const;
- /* TOOLTIP */
+ // Internationalization.
- void set_tooltip(const String &p_tooltip);
- virtual String get_tooltip(const Point2 &p_pos) const;
- virtual Control *make_custom_tooltip(const String &p_text) const;
-
- /* CURSOR */
-
- void set_default_cursor_shape(CursorShape p_shape);
- CursorShape get_default_cursor_shape() const;
- virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const;
-
- virtual Transform2D get_transform() const override;
-
- bool is_top_level_control() const;
-
- Size2 get_parent_area_size() const;
- Rect2 get_parent_anchorable_rect() const;
-
- void grab_click_focus();
-
- void warp_mouse(const Point2 &p_position);
-
- virtual bool is_text_field() const;
-
- Control *get_root_parent_control() const;
-
- void set_clip_contents(bool p_clip);
- bool is_clipping_contents();
+ void set_layout_direction(LayoutDirection p_direction);
+ LayoutDirection get_layout_direction() const;
+ virtual bool is_layout_rtl() const;
- void set_block_minimum_size_adjust(bool p_block);
- bool is_minimum_size_adjust_blocked() const;
+ void set_auto_translate(bool p_enable);
+ bool is_auto_translating() const;
+ _FORCE_INLINE_ String atr(const String p_string) const {
+ return is_auto_translating() ? tr(p_string) : p_string;
+ };
- void set_disable_visibility_clip(bool p_ignore);
- bool is_visibility_clip_disabled() const;
+ // Extra properties.
- virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
- TypedArray<String> get_configuration_warnings() const override;
+ void set_tooltip(const String &p_tooltip);
+ virtual String get_tooltip(const Point2 &p_pos) const;
+ virtual Control *make_custom_tooltip(const String &p_text) const;
Control() {}
};
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 44e2bb89eb..942b7d0bf9 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -261,7 +261,7 @@ Button *AcceptDialog::add_button(const String &p_text, bool p_right, const Strin
}
if (!p_action.is_empty()) {
- button->connect("pressed", callable_mp(this, &AcceptDialog::_custom_action), varray(p_action));
+ button->connect("pressed", callable_mp(this, &AcceptDialog::_custom_action).bind(p_action));
}
return button;
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 65bc359e2e..e26976a402 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -1083,9 +1083,9 @@ FileDialog::FileDialog() {
_update_drives();
connect("confirmed", callable_mp(this, &FileDialog::_action_pressed));
- tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), varray(), CONNECT_DEFERRED);
- tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), varray(), CONNECT_DEFERRED);
- tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated), varray());
+ tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), CONNECT_DEFERRED);
+ tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), CONNECT_DEFERRED);
+ tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated));
tree->connect("nothing_selected", callable_mp(this, &FileDialog::deselect_all));
dir->connect("text_submitted", callable_mp(this, &FileDialog::_dir_submitted));
file->connect("text_submitted", callable_mp(this, &FileDialog::_file_submitted));
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index e30759aa3e..42f434f0ac 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -382,9 +382,9 @@ void GraphEdit::add_child_notify(Node *p_child) {
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->set_scale(Vector2(zoom, zoom));
- gn->connect("position_offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved), varray(gn));
- gn->connect("slot_updated", callable_mp(this, &GraphEdit::_graph_node_slot_updated), varray(gn));
- gn->connect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised), varray(gn));
+ gn->connect("position_offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved).bind(gn));
+ gn->connect("slot_updated", callable_mp(this, &GraphEdit::_graph_node_slot_updated).bind(gn));
+ gn->connect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised).bind(gn));
gn->connect("item_rect_changed", callable_mp((CanvasItem *)connections_layer, &CanvasItem::update));
gn->connect("item_rect_changed", callable_mp((CanvasItem *)minimap, &GraphEditMinimap::update));
_graph_node_moved(gn);
@@ -710,6 +710,9 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
int type = gn->get_connection_output_type(j);
if ((type == connecting_type || valid_connection_types.has(ConnType(connecting_type, type))) && is_in_output_hotzone(gn, j, mpos, port_size)) {
+ if (!is_node_hover_valid(gn->get_name(), j, connecting_from, connecting_index)) {
+ continue;
+ }
connecting_target = true;
connecting_to = pos;
connecting_target_to = gn->get_name();
@@ -725,6 +728,9 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
int type = gn->get_connection_input_type(j);
if ((type == connecting_type || valid_connection_types.has(ConnType(connecting_type, type))) && is_in_input_hotzone(gn, j, mpos, port_size)) {
+ if (!is_node_hover_valid(connecting_from, connecting_index, gn->get_name(), j)) {
+ continue;
+ }
connecting_target = true;
connecting_to = pos;
connecting_target_to = gn->get_name();
@@ -1453,6 +1459,14 @@ void GraphEdit::force_connection_drag_end() {
emit_signal(SNAME("connection_drag_ended"));
}
+bool GraphEdit::is_node_hover_valid(const StringName &p_from, const int p_from_port, const StringName &p_to, const int p_to_port) {
+ bool valid;
+ if (GDVIRTUAL_CALL(_is_node_hover_valid, p_from, p_from_port, p_to, p_to_port, valid)) {
+ return valid;
+ }
+ return true;
+}
+
void GraphEdit::set_panning_scheme(PanningScheme p_scheme) {
panning_scheme = p_scheme;
panner->set_control_scheme((ViewPanner::ControlScheme)p_scheme);
@@ -2315,6 +2329,7 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_selected", "node"), &GraphEdit::set_selected);
GDVIRTUAL_BIND(_get_connection_line, "from", "to")
+ GDVIRTUAL_BIND(_is_node_hover_valid, "from", "from_slot", "to", "to_slot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "right_disconnects"), "set_right_disconnects", "is_right_disconnects_enabled");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset", PROPERTY_HINT_NONE, "suffix:px"), "set_scroll_ofs", "get_scroll_ofs");
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index beb17ec4cf..cf35aeb8b2 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -280,6 +280,7 @@ protected:
GDVIRTUAL2RC(Vector<Vector2>, _get_connection_line, Vector2, Vector2)
GDVIRTUAL3R(bool, _is_in_input_hotzone, Object *, int, Vector2)
GDVIRTUAL3R(bool, _is_in_output_hotzone, Object *, int, Vector2)
+ GDVIRTUAL4R(bool, _is_node_hover_valid, StringName, int, StringName, int);
public:
Error connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);
@@ -287,6 +288,7 @@ public:
void disconnect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);
void clear_connections();
void force_connection_drag_end();
+ virtual bool is_node_hover_valid(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);
void set_connection_activity(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port, float p_activity);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 8094812203..e7f48beb00 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -657,7 +657,7 @@ void Label::set_label_settings(const Ref<LabelSettings> &p_settings) {
}
settings = p_settings;
if (settings.is_valid()) {
- settings->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label::_invalidate), varray(), CONNECT_REFERENCE_COUNTED);
+ settings->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label::_invalidate), CONNECT_REFERENCE_COUNTED);
}
_invalidate();
}
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 316fee53fe..069a31d9d2 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -239,8 +239,8 @@ MenuButton::MenuButton(const String &p_text) :
popup = memnew(PopupMenu);
popup->hide();
add_child(popup, false, INTERNAL_MODE_FRONT);
- popup->connect("about_to_popup", callable_mp(this, &MenuButton::_popup_visibility_changed), varray(true));
- popup->connect("popup_hide", callable_mp(this, &MenuButton::_popup_visibility_changed), varray(false));
+ popup->connect("about_to_popup", callable_mp(this, &MenuButton::_popup_visibility_changed).bind(true));
+ popup->connect("popup_hide", callable_mp(this, &MenuButton::_popup_visibility_changed).bind(false));
}
MenuButton::~MenuButton() {
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index a86f2bdbc1..a10ec1db06 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -481,7 +481,7 @@ OptionButton::OptionButton(const String &p_text) :
add_child(popup, false, INTERNAL_MODE_FRONT);
popup->connect("index_pressed", callable_mp(this, &OptionButton::_selected));
popup->connect("id_focused", callable_mp(this, &OptionButton::_focused));
- popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
+ popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed).bind(false));
}
OptionButton::~OptionButton() {
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index f387f91a8b..48c57d9b1b 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -303,7 +303,7 @@ void ScrollBar::_notification(int p_what) {
if (drag_node) {
drag_node->connect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
- drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), varray(), CONNECT_ONESHOT);
+ drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), CONNECT_ONESHOT);
}
} break;
@@ -595,7 +595,7 @@ void ScrollBar::set_drag_node(const NodePath &p_path) {
if (drag_node) {
drag_node->connect("gui_input", callable_mp(this, &ScrollBar::_drag_node_input));
- drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), varray(), CONNECT_ONESHOT);
+ drag_node->connect("tree_exiting", callable_mp(this, &ScrollBar::_drag_node_exit), CONNECT_ONESHOT);
}
}
}
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index a4733c455f..b7bef37e17 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -272,7 +272,7 @@ void SpinBox::set_update_on_text_changed(bool p_enabled) {
update_on_text_changed = p_enabled;
if (p_enabled) {
- line_edit->connect("text_changed", callable_mp(this, &SpinBox::_text_changed), Vector<Variant>(), CONNECT_DEFERRED);
+ line_edit->connect("text_changed", callable_mp(this, &SpinBox::_text_changed), CONNECT_DEFERRED);
} else {
line_edit->disconnect("text_changed", callable_mp(this, &SpinBox::_text_changed));
}
@@ -323,8 +323,8 @@ SpinBox::SpinBox() {
line_edit->set_mouse_filter(MOUSE_FILTER_PASS);
line_edit->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_LEFT);
- line_edit->connect("text_submitted", callable_mp(this, &SpinBox::_text_submitted), Vector<Variant>(), CONNECT_DEFERRED);
- line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), Vector<Variant>(), CONNECT_DEFERRED);
+ line_edit->connect("text_submitted", callable_mp(this, &SpinBox::_text_submitted), CONNECT_DEFERRED);
+ line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), CONNECT_DEFERRED);
line_edit->connect("gui_input", callable_mp(this, &SpinBox::_line_edit_input));
range_click_timer = memnew(Timer);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 06553cd0f6..4bc8b8e197 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -443,8 +443,10 @@ void TextEdit::_notification(int p_what) {
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_THEME_CHANGED: {
- _update_caches();
- _update_wrap_at_column(true);
+ if (is_inside_tree()) {
+ _update_caches();
+ _update_wrap_at_column(true);
+ }
} break;
case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
@@ -1055,7 +1057,7 @@ void TextEdit::_notification(int p_what) {
const Variant *argp[] = { &args[0], &args[1], &args[2] };
Callable::CallError ce;
Variant ret;
- gutter.custom_draw_callback.call(argp, 3, ret, ce);
+ gutter.custom_draw_callback.callp(argp, 3, ret, ce);
}
} break;
}
@@ -2789,7 +2791,7 @@ String TextEdit::get_tooltip(const Point2 &p_pos) const {
const Variant *argp[] = { &args[0] };
Callable::CallError ce;
Variant ret;
- tooltip_callback.call(argp, 1, ret, ce);
+ tooltip_callback.callp(argp, 1, ret, ce);
ERR_FAIL_COND_V_MSG(ce.error != Callable::CallError::CALL_OK, "", "Failed to call custom tooltip.");
return ret;
}
diff --git a/scene/gui/view_panner.cpp b/scene/gui/view_panner.cpp
index 892d0aba29..3b7f499a07 100644
--- a/scene/gui/view_panner.cpp
+++ b/scene/gui/view_panner.cpp
@@ -135,7 +135,7 @@ void ViewPanner::callback_helper(Callable p_callback, Vector<Variant> p_args) {
Variant result;
Callable::CallError ce;
- p_callback.call(argptr, p_args.size(), result, ce);
+ p_callback.callp(argptr, p_args.size(), result, ce);
}
void ViewPanner::set_callbacks(Callable p_scroll_callback, Callable p_pan_callback, Callable p_zoom_callback) {
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index e298805aca..ce204c6aeb 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -64,9 +64,6 @@ void CanvasItem::_propagate_visibility_changed(bool p_parent_visible_in_tree) {
if (!visible) {
return;
}
- if (p_parent_visible_in_tree && first_draw) { // Avoid propagating it twice.
- first_draw = false;
- }
_handle_visibility_change(p_parent_visible_in_tree);
}
@@ -133,10 +130,6 @@ void CanvasItem::_update_callback() {
RenderingServer::get_singleton()->canvas_item_clear(get_canvas_item());
//todo updating = true - only allow drawing here
if (is_visible_in_tree()) {
- if (first_draw) {
- notification(NOTIFICATION_VISIBILITY_CHANGED);
- first_draw = false;
- }
drawing = true;
current_item_drawn = this;
notification(NOTIFICATION_DRAW);
@@ -268,7 +261,6 @@ void CanvasItem::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
ERR_FAIL_COND(!is_inside_tree());
- first_draw = true;
Node *parent = get_parent();
if (parent) {
@@ -307,6 +299,10 @@ void CanvasItem::_notification(int p_what) {
}
}
+ RenderingServer::get_singleton()->canvas_item_set_visible(canvas_item, is_visible_in_tree()); // The visibility of the parent may change.
+ if (is_visible_in_tree()) {
+ notification(NOTIFICATION_VISIBILITY_CHANGED); // Considered invisible until entered.
+ }
_enter_canvas();
_update_texture_filter_changed(false);
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index f5df6512ee..38e0be1683 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -83,7 +83,6 @@ private:
int light_mask = 1;
Window *window = nullptr;
- bool first_draw = false;
bool visible = true;
bool parent_visible_in_tree = false;
bool clip_children = false;
diff --git a/scene/main/multiplayer_api.cpp b/scene/main/multiplayer_api.cpp
new file mode 100644
index 0000000000..95574042a8
--- /dev/null
+++ b/scene/main/multiplayer_api.cpp
@@ -0,0 +1,416 @@
+/*************************************************************************/
+/* multiplayer_api.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 "multiplayer_api.h"
+
+#include "core/debugger/engine_debugger.h"
+#include "core/io/marshalls.h"
+
+#include <stdint.h>
+
+#ifdef DEBUG_ENABLED
+#include "core/os/os.h"
+#endif
+
+StringName MultiplayerAPI::default_interface = StringName();
+
+void MultiplayerAPI::set_default_interface(const StringName &p_interface) {
+ ERR_FAIL_COND_MSG(!ClassDB::is_parent_class(p_interface, MultiplayerAPI::get_class_static()), vformat("Can't make %s the default multiplayer interface since it does not extend MultiplayerAPI.", p_interface));
+ default_interface = p_interface;
+}
+
+StringName MultiplayerAPI::get_default_interface() {
+ return default_interface;
+}
+
+Ref<MultiplayerAPI> MultiplayerAPI::create_default_interface() {
+ if (default_interface != StringName()) {
+ return Ref<MultiplayerAPI>(Object::cast_to<MultiplayerAPI>(ClassDB::instantiate(default_interface)));
+ }
+ return Ref<MultiplayerAPI>(memnew(MultiplayerAPIExtension));
+}
+
+// The variant is compressed and encoded; The first byte contains all the meta
+// information and the format is:
+// - The first LSB 5 bits are used for the variant type.
+// - The next two bits are used to store the encoding mode.
+// - The most significant is used to store the boolean value.
+#define VARIANT_META_TYPE_MASK 0x1F
+#define VARIANT_META_EMODE_MASK 0x60
+#define VARIANT_META_BOOL_MASK 0x80
+#define ENCODE_8 0 << 5
+#define ENCODE_16 1 << 5
+#define ENCODE_32 2 << 5
+#define ENCODE_64 3 << 5
+Error MultiplayerAPI::encode_and_compress_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_allow_object_decoding) {
+ // Unreachable because `VARIANT_MAX` == 27 and `ENCODE_VARIANT_MASK` == 31
+ CRASH_COND(p_variant.get_type() > VARIANT_META_TYPE_MASK);
+
+ uint8_t *buf = r_buffer;
+ r_len = 0;
+ uint8_t encode_mode = 0;
+
+ switch (p_variant.get_type()) {
+ case Variant::BOOL: {
+ if (buf) {
+ // We still have 1 free bit in the meta, so let's use it.
+ buf[0] = (p_variant.operator bool()) ? (1 << 7) : 0;
+ buf[0] |= encode_mode | p_variant.get_type();
+ }
+ r_len += 1;
+ } break;
+ case Variant::INT: {
+ if (buf) {
+ // Reserve the first byte for the meta.
+ buf += 1;
+ }
+ r_len += 1;
+ int64_t val = p_variant;
+ if (val <= (int64_t)INT8_MAX && val >= (int64_t)INT8_MIN) {
+ // Use 8 bit
+ encode_mode = ENCODE_8;
+ if (buf) {
+ buf[0] = val;
+ }
+ r_len += 1;
+ } else if (val <= (int64_t)INT16_MAX && val >= (int64_t)INT16_MIN) {
+ // Use 16 bit
+ encode_mode = ENCODE_16;
+ if (buf) {
+ encode_uint16(val, buf);
+ }
+ r_len += 2;
+ } else if (val <= (int64_t)INT32_MAX && val >= (int64_t)INT32_MIN) {
+ // Use 32 bit
+ encode_mode = ENCODE_32;
+ if (buf) {
+ encode_uint32(val, buf);
+ }
+ r_len += 4;
+ } else {
+ // Use 64 bit
+ encode_mode = ENCODE_64;
+ if (buf) {
+ encode_uint64(val, buf);
+ }
+ r_len += 8;
+ }
+ // Store the meta
+ if (buf) {
+ buf -= 1;
+ buf[0] = encode_mode | p_variant.get_type();
+ }
+ } break;
+ default:
+ // Any other case is not yet compressed.
+ Error err = encode_variant(p_variant, r_buffer, r_len, p_allow_object_decoding);
+ if (err != OK) {
+ return err;
+ }
+ if (r_buffer) {
+ // The first byte is not used by the marshalling, so store the type
+ // so we know how to decompress and decode this variant.
+ r_buffer[0] = p_variant.get_type();
+ }
+ }
+
+ return OK;
+}
+
+Error MultiplayerAPI::decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len, bool p_allow_object_decoding) {
+ const uint8_t *buf = p_buffer;
+ int len = p_len;
+
+ ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
+ uint8_t type = buf[0] & VARIANT_META_TYPE_MASK;
+ uint8_t encode_mode = buf[0] & VARIANT_META_EMODE_MASK;
+
+ ERR_FAIL_COND_V(type >= Variant::VARIANT_MAX, ERR_INVALID_DATA);
+
+ switch (type) {
+ case Variant::BOOL: {
+ bool val = (buf[0] & VARIANT_META_BOOL_MASK) > 0;
+ r_variant = val;
+ if (r_len) {
+ *r_len = 1;
+ }
+ } break;
+ case Variant::INT: {
+ buf += 1;
+ len -= 1;
+ if (r_len) {
+ *r_len = 1;
+ }
+ if (encode_mode == ENCODE_8) {
+ // 8 bits.
+ ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
+ int8_t val = buf[0];
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 1;
+ }
+ } else if (encode_mode == ENCODE_16) {
+ // 16 bits.
+ ERR_FAIL_COND_V(len < 2, ERR_INVALID_DATA);
+ int16_t val = decode_uint16(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 2;
+ }
+ } else if (encode_mode == ENCODE_32) {
+ // 32 bits.
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int32_t val = decode_uint32(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 4;
+ }
+ } else {
+ // 64 bits.
+ ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
+ int64_t val = decode_uint64(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 8;
+ }
+ }
+ } break;
+ default:
+ Error err = decode_variant(r_variant, p_buffer, p_len, r_len, p_allow_object_decoding);
+ if (err != OK) {
+ return err;
+ }
+ }
+
+ return OK;
+}
+
+Error MultiplayerAPI::encode_and_compress_variants(const Variant **p_variants, int p_count, uint8_t *p_buffer, int &r_len, bool *r_raw, bool p_allow_object_decoding) {
+ r_len = 0;
+ int size = 0;
+
+ if (p_count == 0) {
+ if (r_raw) {
+ *r_raw = true;
+ }
+ return OK;
+ }
+
+ // Try raw encoding optimization.
+ if (r_raw && p_count == 1) {
+ *r_raw = false;
+ const Variant &v = *(p_variants[0]);
+ if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
+ *r_raw = true;
+ const PackedByteArray pba = v;
+ if (p_buffer) {
+ memcpy(p_buffer, pba.ptr(), pba.size());
+ }
+ r_len += pba.size();
+ } else {
+ encode_and_compress_variant(v, p_buffer, size, p_allow_object_decoding);
+ r_len += size;
+ }
+ return OK;
+ }
+
+ // Regular encoding.
+ for (int i = 0; i < p_count; i++) {
+ const Variant &v = *(p_variants[i]);
+ encode_and_compress_variant(v, p_buffer ? p_buffer + r_len : nullptr, size, p_allow_object_decoding);
+ r_len += size;
+ }
+ return OK;
+}
+
+Error MultiplayerAPI::decode_and_decompress_variants(Vector<Variant> &r_variants, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw, bool p_allow_object_decoding) {
+ r_len = 0;
+ int argc = r_variants.size();
+ if (argc == 0 && p_raw) {
+ return OK;
+ }
+ ERR_FAIL_COND_V(p_raw && argc != 1, ERR_INVALID_DATA);
+ if (p_raw) {
+ r_len = p_len;
+ PackedByteArray pba;
+ pba.resize(p_len);
+ memcpy(pba.ptrw(), p_buffer, p_len);
+ r_variants.write[0] = pba;
+ return OK;
+ }
+
+ Vector<Variant> args;
+ Vector<const Variant *> argp;
+ args.resize(argc);
+
+ for (int i = 0; i < argc; i++) {
+ ERR_FAIL_COND_V_MSG(r_len >= p_len, ERR_INVALID_DATA, "Invalid packet received. Size too small.");
+
+ int vlen;
+ Error err = MultiplayerAPI::decode_and_decompress_variant(r_variants.write[i], &p_buffer[r_len], p_len - r_len, &vlen, p_allow_object_decoding);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Invalid packet received. Unable to decode state variable.");
+ r_len += vlen;
+ }
+ return OK;
+}
+
+Error MultiplayerAPI::_rpc_bind(int p_peer, Object *p_object, const StringName &p_method, Array p_args) {
+ Vector<Variant> args;
+ Vector<const Variant *> argsp;
+ args.resize(p_args.size());
+ argsp.resize(p_args.size());
+ Variant *ptr = args.ptrw();
+ const Variant **pptr = argsp.ptrw();
+ for (int i = 0; i < p_args.size(); i++) {
+ ptr[i] = p_args[i];
+ pptr[i] = &ptr[i];
+ }
+ return rpcp(p_object, p_peer, p_method, argsp.size() ? argsp.ptrw() : nullptr, argsp.size());
+}
+
+void MultiplayerAPI::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("has_multiplayer_peer"), &MultiplayerAPI::has_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("get_multiplayer_peer"), &MultiplayerAPI::get_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("set_multiplayer_peer", "peer"), &MultiplayerAPI::set_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("get_unique_id"), &MultiplayerAPI::get_unique_id);
+ ClassDB::bind_method(D_METHOD("is_server"), &MultiplayerAPI::is_server);
+ ClassDB::bind_method(D_METHOD("get_remote_sender_id"), &MultiplayerAPI::get_remote_sender_id);
+ ClassDB::bind_method(D_METHOD("poll"), &MultiplayerAPI::poll);
+ ClassDB::bind_method(D_METHOD("rpc", "peer", "object", "method", "arguments"), &MultiplayerAPI::_rpc_bind, DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("object_configuration_add", "object", "configuration"), &MultiplayerAPI::object_configuration_add);
+ ClassDB::bind_method(D_METHOD("object_configuration_remove", "object", "configuration"), &MultiplayerAPI::object_configuration_remove);
+
+ ClassDB::bind_method(D_METHOD("get_peers"), &MultiplayerAPI::get_peer_ids);
+
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer_peer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerPeer", PROPERTY_USAGE_NONE), "set_multiplayer_peer", "get_multiplayer_peer");
+
+ ClassDB::bind_static_method("MultiplayerAPI", D_METHOD("set_default_interface", "interface_name"), &MultiplayerAPI::set_default_interface);
+ ClassDB::bind_static_method("MultiplayerAPI", D_METHOD("get_default_interface"), &MultiplayerAPI::get_default_interface);
+ ClassDB::bind_static_method("MultiplayerAPI", D_METHOD("create_default_interface"), &MultiplayerAPI::create_default_interface);
+
+ ADD_SIGNAL(MethodInfo("peer_connected", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("peer_disconnected", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("connected_to_server"));
+ ADD_SIGNAL(MethodInfo("connection_failed"));
+ ADD_SIGNAL(MethodInfo("server_disconnected"));
+
+ BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(RPC_MODE_ANY_PEER);
+ BIND_ENUM_CONSTANT(RPC_MODE_AUTHORITY);
+}
+
+/// MultiplayerAPIExtension
+
+Error MultiplayerAPIExtension::poll() {
+ int err;
+ if (GDVIRTUAL_CALL(_poll, err)) {
+ return (Error)err;
+ }
+ return OK;
+}
+
+void MultiplayerAPIExtension::set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) {
+ GDVIRTUAL_CALL(_set_multiplayer_peer, p_peer);
+}
+
+Ref<MultiplayerPeer> MultiplayerAPIExtension::get_multiplayer_peer() {
+ Ref<MultiplayerPeer> peer;
+ if (GDVIRTUAL_CALL(_get_multiplayer_peer, peer)) {
+ return peer;
+ }
+ return nullptr;
+}
+
+int MultiplayerAPIExtension::get_unique_id() {
+ int id;
+ if (GDVIRTUAL_CALL(_get_unique_id, id)) {
+ return id;
+ }
+ return 1;
+}
+
+Vector<int> MultiplayerAPIExtension::get_peer_ids() {
+ Vector<int> ids;
+ if (GDVIRTUAL_CALL(_get_peer_ids, ids)) {
+ return ids;
+ }
+ return Vector<int>();
+}
+
+Error MultiplayerAPIExtension::rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+ if (!GDVIRTUAL_IS_OVERRIDDEN(_rpc)) {
+ return ERR_UNAVAILABLE;
+ }
+ Array args;
+ for (int i = 0; i < p_argcount; i++) {
+ args.push_back(*p_arg[i]);
+ }
+ int ret;
+ if (GDVIRTUAL_CALL(_rpc, p_peer_id, p_obj, p_method, args, ret)) {
+ return (Error)ret;
+ }
+ return FAILED;
+}
+
+int MultiplayerAPIExtension::get_remote_sender_id() {
+ int id;
+ if (GDVIRTUAL_CALL(_get_remote_sender_id, id)) {
+ return id;
+ }
+ return 0;
+}
+
+Error MultiplayerAPIExtension::object_configuration_add(Object *p_object, Variant p_config) {
+ int err;
+ if (GDVIRTUAL_CALL(_object_configuration_add, p_object, p_config, err)) {
+ return (Error)err;
+ }
+ return ERR_UNAVAILABLE;
+}
+
+Error MultiplayerAPIExtension::object_configuration_remove(Object *p_object, Variant p_config) {
+ int err;
+ if (GDVIRTUAL_CALL(_object_configuration_remove, p_object, p_config, err)) {
+ return (Error)err;
+ }
+ return ERR_UNAVAILABLE;
+}
+
+void MultiplayerAPIExtension::_bind_methods() {
+ GDVIRTUAL_BIND(_poll);
+ GDVIRTUAL_BIND(_set_multiplayer_peer, "multiplayer_peer");
+ GDVIRTUAL_BIND(_get_multiplayer_peer);
+ GDVIRTUAL_BIND(_get_unique_id);
+ GDVIRTUAL_BIND(_get_peer_ids);
+ GDVIRTUAL_BIND(_rpc, "peer", "object", "method", "args");
+ GDVIRTUAL_BIND(_get_remote_sender_id);
+ GDVIRTUAL_BIND(_object_configuration_add, "object", "configuration");
+ GDVIRTUAL_BIND(_object_configuration_remove, "object", "configuration");
+}
diff --git a/scene/main/multiplayer_api.h b/scene/main/multiplayer_api.h
new file mode 100644
index 0000000000..c1d90d651e
--- /dev/null
+++ b/scene/main/multiplayer_api.h
@@ -0,0 +1,115 @@
+/*************************************************************************/
+/* multiplayer_api.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 MULTIPLAYER_API_H
+#define MULTIPLAYER_API_H
+
+#include "core/object/ref_counted.h"
+#include "scene/main/multiplayer_peer.h"
+
+class MultiplayerAPI : public RefCounted {
+ GDCLASS(MultiplayerAPI, RefCounted);
+
+private:
+ static StringName default_interface;
+
+protected:
+ static void _bind_methods();
+ Error _rpc_bind(int p_peer, Object *p_obj, const StringName &p_method, Array args = Array());
+
+public:
+ enum RPCMode {
+ RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default)
+ RPC_MODE_ANY_PEER, // Any peer can call this RPC
+ RPC_MODE_AUTHORITY, // Only the node's multiplayer authority (server by default) can call this RPC
+ };
+
+ static Ref<MultiplayerAPI> create_default_interface();
+ static void set_default_interface(const StringName &p_interface);
+ static StringName get_default_interface();
+
+ static Error encode_and_compress_variant(const Variant &p_variant, uint8_t *p_buffer, int &r_len, bool p_allow_object_decoding);
+ static Error decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len, bool p_allow_object_decoding);
+ static Error encode_and_compress_variants(const Variant **p_variants, int p_count, uint8_t *p_buffer, int &r_len, bool *r_raw = nullptr, bool p_allow_object_decoding = false);
+ static Error decode_and_decompress_variants(Vector<Variant> &r_variants, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw = false, bool p_allow_object_decoding = false);
+
+ virtual Error poll() = 0;
+ virtual void set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) = 0;
+ virtual Ref<MultiplayerPeer> get_multiplayer_peer() = 0;
+ virtual int get_unique_id() = 0;
+ virtual Vector<int> get_peer_ids() = 0;
+
+ virtual Error rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) = 0;
+ virtual int get_remote_sender_id() = 0;
+
+ virtual Error object_configuration_add(Object *p_object, Variant p_config) = 0;
+ virtual Error object_configuration_remove(Object *p_object, Variant p_config) = 0;
+
+ bool has_multiplayer_peer() { return get_multiplayer_peer().is_valid(); }
+ bool is_server() { return get_unique_id() == MultiplayerPeer::TARGET_PEER_SERVER; }
+
+ MultiplayerAPI() {}
+ virtual ~MultiplayerAPI() {}
+};
+
+VARIANT_ENUM_CAST(MultiplayerAPI::RPCMode);
+
+class MultiplayerAPIExtension : public MultiplayerAPI {
+ GDCLASS(MultiplayerAPIExtension, MultiplayerAPI);
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual Error poll() override;
+ virtual void set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) override;
+ virtual Ref<MultiplayerPeer> get_multiplayer_peer() override;
+ virtual int get_unique_id() override;
+ virtual Vector<int> get_peer_ids() override;
+
+ virtual Error rpcp(Object *p_obj, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) override;
+ virtual int get_remote_sender_id() override;
+
+ virtual Error object_configuration_add(Object *p_object, Variant p_config) override;
+ virtual Error object_configuration_remove(Object *p_object, Variant p_config) override;
+
+ // Extensions
+ GDVIRTUAL0R(int, _poll);
+ GDVIRTUAL1(_set_multiplayer_peer, Ref<MultiplayerPeer>);
+ GDVIRTUAL0R(Ref<MultiplayerPeer>, _get_multiplayer_peer);
+ GDVIRTUAL0RC(int, _get_unique_id);
+ GDVIRTUAL0RC(PackedInt32Array, _get_peer_ids);
+ GDVIRTUAL4R(int, _rpc, int, Object *, StringName, Array);
+ GDVIRTUAL0RC(int, _get_remote_sender_id);
+ GDVIRTUAL2R(int, _object_configuration_add, Object *, Variant);
+ GDVIRTUAL2R(int, _object_configuration_remove, Object *, Variant);
+};
+
+#endif // MULTIPLAYER_API_H
diff --git a/core/multiplayer/multiplayer_peer.cpp b/scene/main/multiplayer_peer.cpp
index c7de7a1313..aad5baccab 100644
--- a/core/multiplayer/multiplayer_peer.cpp
+++ b/scene/main/multiplayer_peer.cpp
@@ -62,11 +62,11 @@ int MultiplayerPeer::get_transfer_channel() const {
return transfer_channel;
}
-void MultiplayerPeer::set_transfer_mode(Multiplayer::TransferMode p_mode) {
+void MultiplayerPeer::set_transfer_mode(TransferMode p_mode) {
transfer_mode = p_mode;
}
-Multiplayer::TransferMode MultiplayerPeer::get_transfer_mode() const {
+MultiplayerPeer::TransferMode MultiplayerPeer::get_transfer_mode() const {
return transfer_mode;
}
@@ -107,6 +107,10 @@ void MultiplayerPeer::_bind_methods() {
BIND_CONSTANT(TARGET_PEER_BROADCAST);
BIND_CONSTANT(TARGET_PEER_SERVER);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE_ORDERED);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_RELIABLE);
+
ADD_SIGNAL(MethodInfo("peer_connected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("peer_disconnected", PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("server_disconnected"));
@@ -191,17 +195,17 @@ int MultiplayerPeerExtension::get_transfer_channel() const {
return MultiplayerPeer::get_transfer_channel();
}
-void MultiplayerPeerExtension::set_transfer_mode(Multiplayer::TransferMode p_mode) {
+void MultiplayerPeerExtension::set_transfer_mode(TransferMode p_mode) {
if (GDVIRTUAL_CALL(_set_transfer_mode, p_mode)) {
return;
}
MultiplayerPeer::set_transfer_mode(p_mode);
}
-Multiplayer::TransferMode MultiplayerPeerExtension::get_transfer_mode() const {
+MultiplayerPeer::TransferMode MultiplayerPeerExtension::get_transfer_mode() const {
int mode;
if (GDVIRTUAL_CALL(_get_transfer_mode, mode)) {
- return (Multiplayer::TransferMode)mode;
+ return (MultiplayerPeer::TransferMode)mode;
}
return MultiplayerPeer::get_transfer_mode();
}
diff --git a/core/multiplayer/multiplayer_peer.h b/scene/main/multiplayer_peer.h
index 91546832ce..8a012d7520 100644
--- a/core/multiplayer/multiplayer_peer.h
+++ b/scene/main/multiplayer_peer.h
@@ -32,7 +32,6 @@
#define MULTIPLAYER_PEER_H
#include "core/io/packet_peer.h"
-#include "core/multiplayer/multiplayer.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/object/script_language.h"
@@ -41,12 +40,19 @@
class MultiplayerPeer : public PacketPeer {
GDCLASS(MultiplayerPeer, PacketPeer);
+public:
+ enum TransferMode {
+ TRANSFER_MODE_UNRELIABLE,
+ TRANSFER_MODE_UNRELIABLE_ORDERED,
+ TRANSFER_MODE_RELIABLE
+ };
+
protected:
static void _bind_methods();
private:
int transfer_channel = 0;
- Multiplayer::TransferMode transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE;
+ TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
bool refuse_connections = false;
public:
@@ -63,8 +69,8 @@ public:
virtual void set_transfer_channel(int p_channel);
virtual int get_transfer_channel() const;
- virtual void set_transfer_mode(Multiplayer::TransferMode p_mode);
- virtual Multiplayer::TransferMode get_transfer_mode() const;
+ virtual void set_transfer_mode(TransferMode p_mode);
+ virtual TransferMode get_transfer_mode() const;
virtual void set_refuse_new_connections(bool p_enable);
virtual bool is_refusing_new_connections() const;
@@ -86,6 +92,7 @@ public:
};
VARIANT_ENUM_CAST(MultiplayerPeer::ConnectionStatus);
+VARIANT_ENUM_CAST(MultiplayerPeer::TransferMode);
class MultiplayerPeerExtension : public MultiplayerPeer {
GDCLASS(MultiplayerPeerExtension, MultiplayerPeer);
@@ -105,8 +112,8 @@ public:
/* MultiplayerPeer */
virtual void set_transfer_channel(int p_channel) override;
virtual int get_transfer_channel() const override;
- virtual void set_transfer_mode(Multiplayer::TransferMode p_mode) override;
- virtual Multiplayer::TransferMode get_transfer_mode() const override;
+ virtual void set_transfer_mode(TransferMode p_mode) override;
+ virtual TransferMode get_transfer_mode() const override;
virtual void set_target_peer(int p_peer_id) override;
virtual int get_packet_peer() const override;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index b4701637a4..6617bd1726 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -33,12 +33,12 @@
#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/io/resource_loader.h"
-#include "core/multiplayer/multiplayer_api.h"
#include "core/object/message_queue.h"
#include "core/string/print_string.h"
#include "instance_placeholder.h"
#include "scene/animation/tween.h"
#include "scene/debugger/scene_debugger.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/resources/packed_scene.h"
#include "scene/scene_string_names.h"
#include "viewport.h"
@@ -582,35 +582,30 @@ bool Node::is_multiplayer_authority() const {
/***** RPC CONFIG ********/
-uint16_t Node::rpc_config(const StringName &p_method, Multiplayer::RPCMode p_rpc_mode, bool p_call_local, Multiplayer::TransferMode p_transfer_mode, int p_channel) {
- for (int i = 0; i < data.rpc_methods.size(); i++) {
- if (data.rpc_methods[i].name == p_method) {
- Multiplayer::RPCConfig &nd = data.rpc_methods.write[i];
- nd.rpc_mode = p_rpc_mode;
- nd.transfer_mode = p_transfer_mode;
- nd.call_local = p_call_local;
- nd.channel = p_channel;
- return i | (1 << 15);
- }
+void Node::rpc_config(const StringName &p_method, const Variant &p_config) {
+ if (data.rpc_config.get_type() != Variant::DICTIONARY) {
+ data.rpc_config = Dictionary();
+ }
+ Dictionary node_config = data.rpc_config;
+ if (p_config.get_type() == Variant::NIL) {
+ node_config.erase(p_method);
+ } else {
+ ERR_FAIL_COND(p_config.get_type() != Variant::DICTIONARY);
+ node_config[p_method] = p_config;
}
- // New method
- Multiplayer::RPCConfig nd;
- nd.name = p_method;
- nd.rpc_mode = p_rpc_mode;
- nd.transfer_mode = p_transfer_mode;
- nd.channel = p_channel;
- nd.call_local = p_call_local;
- data.rpc_methods.push_back(nd);
- return ((uint16_t)data.rpc_methods.size() - 1) | (1 << 15);
+}
+
+const Variant Node::get_node_rpc_config() const {
+ return data.rpc_config;
}
/***** RPC FUNCTIONS ********/
-void Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+Error Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 1;
- return;
+ return ERR_INVALID_PARAMETER;
}
Variant::Type type = p_args[0]->get_type();
@@ -618,28 +613,28 @@ void Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING_NAME;
- return;
+ return ERR_INVALID_PARAMETER;
}
StringName method = (*p_args[0]).operator StringName();
- rpcp(0, method, &p_args[1], p_argcount - 1);
-
+ Error err = rpcp(0, method, &p_args[1], p_argcount - 1);
r_error.error = Callable::CallError::CALL_OK;
+ return err;
}
-void Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+Error Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 2) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = 2;
- return;
+ return ERR_INVALID_PARAMETER;
}
if (p_args[0]->get_type() != Variant::INT) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
- return;
+ return ERR_INVALID_PARAMETER;
}
Variant::Type type = p_args[1]->get_type();
@@ -647,20 +642,35 @@ void Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallEr
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING_NAME;
- return;
+ return ERR_INVALID_PARAMETER;
}
int peer_id = *p_args[0];
StringName method = (*p_args[1]).operator StringName();
- rpcp(peer_id, method, &p_args[2], p_argcount - 2);
-
+ Error err = rpcp(peer_id, method, &p_args[2], p_argcount - 2);
r_error.error = Callable::CallError::CALL_OK;
+ return err;
}
-void Node::rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
- ERR_FAIL_COND(!is_inside_tree());
- get_multiplayer()->rpcp(this, p_peer_id, p_method, p_arg, p_argcount);
+template <typename... VarArgs>
+Error Node::rpc(const StringName &p_method, VarArgs... p_args) {
+ return rpc_id(0, p_method, p_args...);
+}
+
+template <typename... VarArgs>
+Error Node::rpc_id(int p_peer_id, const StringName &p_method, VarArgs... p_args) {
+ Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
+ const Variant *argptrs[sizeof...(p_args) + 1];
+ for (uint32_t i = 0; i < sizeof...(p_args); i++) {
+ argptrs[i] = &args[i];
+ }
+ return rpcp(p_peer_id, p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args));
+}
+
+Error Node::rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+ ERR_FAIL_COND_V(!is_inside_tree(), ERR_UNCONFIGURED);
+ return get_multiplayer()->rpcp(this, p_peer_id, p_method, p_arg, p_argcount);
}
Ref<MultiplayerAPI> Node::get_multiplayer() const {
@@ -670,10 +680,6 @@ Ref<MultiplayerAPI> Node::get_multiplayer() const {
return get_tree()->get_multiplayer(get_path());
}
-Vector<Multiplayer::RPCConfig> Node::get_node_rpc_methods() const {
- return data.rpc_methods;
-}
-
//////////// end of rpc
bool Node::can_process_notification(int p_what) const {
@@ -2404,7 +2410,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
if (copy && copytarget) {
const Callable copy_callable = Callable(copytarget, E.callable.get_method());
if (!copy->is_connected(E.signal.get_name(), copy_callable)) {
- copy->connect(E.signal.get_name(), copy_callable, E.binds, E.flags);
+ copy->connect(E.signal.get_name(), copy_callable, E.flags);
}
}
}
@@ -2490,7 +2496,7 @@ void Node::_replace_connections_target(Node *p_new_target) {
c.signal.get_object()->disconnect(c.signal.get_name(), Callable(this, c.callable.get_method()));
bool valid = p_new_target->has_method(c.callable.get_method()) || Ref<Script>(p_new_target->get_script()).is_null() || Ref<Script>(p_new_target->get_script())->has_method(c.callable.get_method());
ERR_CONTINUE_MSG(!valid, vformat("Attempt to connect signal '%s.%s' to nonexistent method '%s.%s'.", c.signal.get_object()->get_class(), c.signal.get_name(), c.callable.get_object()->get_class(), c.callable.get_method()));
- c.signal.get_object()->connect(c.signal.get_name(), Callable(p_new_target, c.callable.get_method()), c.binds, c.flags);
+ c.signal.get_object()->connect(c.signal.get_name(), Callable(p_new_target, c.callable.get_method()), c.flags);
}
}
}
@@ -2888,7 +2894,7 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_multiplayer_authority"), &Node::is_multiplayer_authority);
ClassDB::bind_method(D_METHOD("get_multiplayer"), &Node::get_multiplayer);
- ClassDB::bind_method(D_METHOD("rpc_config", "method", "rpc_mode", "call_local", "transfer_mode", "channel"), &Node::rpc_config, DEFVAL(false), DEFVAL(Multiplayer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("rpc_config", "method", "config"), &Node::rpc_config);
ClassDB::bind_method(D_METHOD("set_editor_description", "editor_description"), &Node::set_editor_description);
ClassDB::bind_method(D_METHOD("get_editor_description"), &Node::get_editor_description);
diff --git a/scene/main/node.h b/scene/main/node.h
index d978c03442..0645c68eb9 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -127,7 +127,7 @@ private:
Node *process_owner = nullptr;
int multiplayer_authority = 1; // Server by default.
- Vector<Multiplayer::RPCConfig> rpc_methods;
+ Variant rpc_config;
// Variables used to properly sort the node when processing, ignored otherwise.
// TODO: Should move all the stuff below to bits.
@@ -183,8 +183,8 @@ private:
TypedArray<Node> _get_children(bool p_include_internal = true) const;
Array _get_groups() const;
- void _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
- void _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Error _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ Error _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
_FORCE_INLINE_ bool _is_internal_front() const { return data.parent && data.pos < data.parent->data.internal_children_front; }
_FORCE_INLINE_ bool _is_internal_back() const { return data.parent && data.pos >= data.parent->data.children.size() - data.parent->data.internal_children_back; }
@@ -491,30 +491,16 @@ public:
int get_multiplayer_authority() const;
bool is_multiplayer_authority() const;
- uint16_t rpc_config(const StringName &p_method, Multiplayer::RPCMode p_rpc_mode, bool p_call_local = false, Multiplayer::TransferMode p_transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE, int p_channel = 0); // config a local method for RPC
- Vector<Multiplayer::RPCConfig> get_node_rpc_methods() const;
+ void rpc_config(const StringName &p_method, const Variant &p_config); // config a local method for RPC
+ const Variant get_node_rpc_config() const;
template <typename... VarArgs>
- void rpc(const StringName &p_method, VarArgs... p_args) {
- Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
- const Variant *argptrs[sizeof...(p_args) + 1];
- for (uint32_t i = 0; i < sizeof...(p_args); i++) {
- argptrs[i] = &args[i];
- }
- rpcp(0, p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args));
- }
+ Error rpc(const StringName &p_method, VarArgs... p_args);
template <typename... VarArgs>
- void rpc_id(int p_peer_id, const StringName &p_method, VarArgs... p_args) {
- Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
- const Variant *argptrs[sizeof...(p_args) + 1];
- for (uint32_t i = 0; i < sizeof...(p_args); i++) {
- argptrs[i] = &args[i];
- }
- rpcp(p_peer_id, p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args));
- }
+ Error rpc_id(int p_peer_id, const StringName &p_method, VarArgs... p_args);
- void rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
+ Error rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
Ref<MultiplayerAPI> get_multiplayer() const;
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 66482f65dc..644fb3e9cc 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -37,7 +37,6 @@
#include "core/io/image_loader.h"
#include "core/io/marshalls.h"
#include "core/io/resource_loader.h"
-#include "core/multiplayer/multiplayer_api.h"
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
@@ -45,6 +44,7 @@
#include "node.h"
#include "scene/animation/tween.h"
#include "scene/debugger/scene_debugger.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/main/viewport.h"
#include "scene/resources/font.h"
#include "scene/resources/material.h"
@@ -1213,19 +1213,17 @@ void SceneTree::set_multiplayer(Ref<MultiplayerAPI> p_multiplayer, const NodePat
if (p_root_path.is_empty()) {
ERR_FAIL_COND(!p_multiplayer.is_valid());
if (multiplayer.is_valid()) {
- multiplayer->set_root_path(NodePath());
+ multiplayer->object_configuration_remove(nullptr, NodePath("/" + root->get_name()));
}
multiplayer = p_multiplayer;
- multiplayer->set_root_path("/" + root->get_name());
+ multiplayer->object_configuration_add(nullptr, NodePath("/" + root->get_name()));
} else {
+ if (custom_multiplayers.has(p_root_path)) {
+ custom_multiplayers[p_root_path]->object_configuration_remove(nullptr, p_root_path);
+ }
if (p_multiplayer.is_valid()) {
custom_multiplayers[p_root_path] = p_multiplayer;
- p_multiplayer->set_root_path(p_root_path);
- } else {
- if (custom_multiplayers.has(p_root_path)) {
- custom_multiplayers[p_root_path]->set_root_path(NodePath());
- custom_multiplayers.erase(p_root_path);
- }
+ p_multiplayer->object_configuration_add(nullptr, p_root_path);
}
}
}
@@ -1415,7 +1413,7 @@ SceneTree::SceneTree() {
#endif // _3D_DISABLED
// Initialize network state.
- set_multiplayer(Ref<MultiplayerAPI>(memnew(MultiplayerAPI)));
+ set_multiplayer(MultiplayerAPI::create_default_interface());
root->set_as_audio_listener_2d(true);
current_scene = nullptr;
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp
index 3b6055fcf7..a621aea9c8 100644
--- a/scene/main/shader_globals_override.cpp
+++ b/scene/main/shader_globals_override.cpp
@@ -64,9 +64,9 @@ bool ShaderGlobalsOverride::_set(const StringName &p_name, const Variant &p_valu
if (active) {
if (o->override.get_type() == Variant::OBJECT) {
RID tex_rid = p_value;
- RS::get_singleton()->global_variable_set_override(*r, tex_rid);
+ RS::get_singleton()->global_shader_uniform_set_override(*r, tex_rid);
} else {
- RS::get_singleton()->global_variable_set_override(*r, p_value);
+ RS::get_singleton()->global_shader_uniform_set_override(*r, p_value);
}
}
o->in_use = p_value.get_type() != Variant::NIL;
@@ -93,13 +93,13 @@ bool ShaderGlobalsOverride::_get(const StringName &p_name, Variant &r_ret) const
void ShaderGlobalsOverride::_get_property_list(List<PropertyInfo> *p_list) const {
Vector<StringName> variables;
- variables = RS::get_singleton()->global_variable_get_list();
+ variables = RS::get_singleton()->global_shader_uniform_get_list();
for (int i = 0; i < variables.size(); i++) {
PropertyInfo pinfo;
pinfo.name = "params/" + variables[i];
pinfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CHECKABLE;
- switch (RS::get_singleton()->global_variable_get_type(variables[i])) {
+ switch (RS::get_singleton()->global_shader_uniform_get_type(variables[i])) {
case RS::GLOBAL_VAR_TYPE_BOOL: {
pinfo.type = Variant::BOOL;
} break;
@@ -234,9 +234,9 @@ void ShaderGlobalsOverride::_activate() {
if (o->in_use && o->override.get_type() != Variant::NIL) {
if (o->override.get_type() == Variant::OBJECT) {
RID tex_rid = o->override;
- RS::get_singleton()->global_variable_set_override(E.key, tex_rid);
+ RS::get_singleton()->global_shader_uniform_set_override(E.key, tex_rid);
} else {
- RS::get_singleton()->global_variable_set_override(E.key, o->override);
+ RS::get_singleton()->global_shader_uniform_set_override(E.key, o->override);
}
}
@@ -258,7 +258,7 @@ void ShaderGlobalsOverride::_notification(int p_what) {
for (const KeyValue<StringName, Override> &E : overrides) {
const Override *o = &E.value;
if (o->in_use) {
- RS::get_singleton()->global_variable_set_override(E.key, Variant());
+ RS::get_singleton()->global_shader_uniform_set_override(E.key, Variant());
}
}
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index c2fa1ace8d..4dd4c8419c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1234,13 +1234,23 @@ void Viewport::_gui_show_tooltip() {
Rect2i vr = window->get_usable_parent_rect();
if (r.size.x + r.position.x > vr.size.x + vr.position.x) {
- r.position.x = vr.position.x + vr.size.x - r.size.x;
+ // Place it in the opposite direction. If it fails, just hug the border.
+ r.position.x = gui.tooltip_pos.x - r.size.x - tooltip_offset.x;
+
+ if (r.position.x < vr.position.x) {
+ r.position.x = vr.position.x + vr.size.x - r.size.x;
+ }
} else if (r.position.x < vr.position.x) {
r.position.x = vr.position.x;
}
if (r.size.y + r.position.y > vr.size.y + vr.position.y) {
- r.position.y = vr.position.y + vr.size.y - r.size.y;
+ // Same as above.
+ r.position.y = gui.tooltip_pos.y - r.size.y - tooltip_offset.y;
+
+ if (r.position.y < vr.position.y) {
+ r.position.y = vr.position.y + vr.size.y - r.size.y;
+ }
} else if (r.position.y < vr.position.y) {
r.position.y = vr.position.y;
}
@@ -3621,17 +3631,17 @@ float Viewport::get_fsr_sharpness() const {
return fsr_sharpness;
}
-void Viewport::set_fsr_mipmap_bias(float p_fsr_mipmap_bias) {
- if (fsr_mipmap_bias == p_fsr_mipmap_bias) {
+void Viewport::set_texture_mipmap_bias(float p_texture_mipmap_bias) {
+ if (texture_mipmap_bias == p_texture_mipmap_bias) {
return;
}
- fsr_mipmap_bias = p_fsr_mipmap_bias;
- RS::get_singleton()->viewport_set_fsr_mipmap_bias(viewport, p_fsr_mipmap_bias);
+ texture_mipmap_bias = p_texture_mipmap_bias;
+ RS::get_singleton()->viewport_set_texture_mipmap_bias(viewport, p_texture_mipmap_bias);
}
-float Viewport::get_fsr_mipmap_bias() const {
- return fsr_mipmap_bias;
+float Viewport::get_texture_mipmap_bias() const {
+ return texture_mipmap_bias;
}
#endif // _3D_DISABLED
@@ -3773,8 +3783,8 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fsr_sharpness", "fsr_sharpness"), &Viewport::set_fsr_sharpness);
ClassDB::bind_method(D_METHOD("get_fsr_sharpness"), &Viewport::get_fsr_sharpness);
- ClassDB::bind_method(D_METHOD("set_fsr_mipmap_bias", "fsr_mipmap_bias"), &Viewport::set_fsr_mipmap_bias);
- ClassDB::bind_method(D_METHOD("get_fsr_mipmap_bias"), &Viewport::get_fsr_mipmap_bias);
+ ClassDB::bind_method(D_METHOD("set_texture_mipmap_bias", "texture_mipmap_bias"), &Viewport::set_texture_mipmap_bias);
+ ClassDB::bind_method(D_METHOD("get_texture_mipmap_bias"), &Viewport::get_texture_mipmap_bias);
ClassDB::bind_method(D_METHOD("set_vrs_mode", "mode"), &Viewport::set_vrs_mode);
ClassDB::bind_method(D_METHOD("get_vrs_mode"), &Viewport::get_vrs_mode);
@@ -3804,7 +3814,7 @@ void Viewport::_bind_methods() {
ADD_GROUP("Scaling 3D", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "scaling_3d_mode", PROPERTY_HINT_ENUM, "Bilinear (Fastest),FSR 1.0 (Fast)"), "set_scaling_3d_mode", "get_scaling_3d_mode");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "scaling_3d_scale", PROPERTY_HINT_RANGE, "0.25,2.0,0.01"), "set_scaling_3d_scale", "get_scaling_3d_scale");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fsr_mipmap_bias", PROPERTY_HINT_RANGE, "-2,2,0.1"), "set_fsr_mipmap_bias", "get_fsr_mipmap_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_mipmap_bias", PROPERTY_HINT_RANGE, "-2,2,0.001"), "set_texture_mipmap_bias", "get_texture_mipmap_bias");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fsr_sharpness", PROPERTY_HINT_RANGE, "0,2,0.1"), "set_fsr_sharpness", "get_fsr_sharpness");
#endif
ADD_GROUP("Variable Rate Shading", "vrs_");
@@ -3978,8 +3988,8 @@ Viewport::Viewport() {
float fsr_sharpness = GLOBAL_GET("rendering/scaling_3d/fsr_sharpness");
set_fsr_sharpness(fsr_sharpness);
- float fsr_mipmap_bias = GLOBAL_GET("rendering/scaling_3d/fsr_mipmap_bias");
- set_fsr_mipmap_bias(fsr_mipmap_bias);
+ float texture_mipmap_bias = GLOBAL_GET("rendering/textures/default_filters/texture_mipmap_bias");
+ set_texture_mipmap_bias(texture_mipmap_bias);
#endif // _3D_DISABLED
set_sdf_oversize(sdf_oversize); // Set to server.
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 58b05d23e0..4221baff06 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -304,7 +304,7 @@ private:
Scaling3DMode scaling_3d_mode = SCALING_3D_MODE_BILINEAR;
float scaling_3d_scale = 1.0;
float fsr_sharpness = 0.2f;
- float fsr_mipmap_bias = 0.0f;
+ float texture_mipmap_bias = 0.0f;
bool use_debanding = false;
float mesh_lod_threshold = 1.0;
bool use_occlusion_culling = false;
@@ -540,8 +540,8 @@ public:
void set_fsr_sharpness(float p_fsr_sharpness);
float get_fsr_sharpness() const;
- void set_fsr_mipmap_bias(float p_fsr_mipmap_bias);
- float get_fsr_mipmap_bias() const;
+ void set_texture_mipmap_bias(float p_texture_mipmap_bias);
+ float get_texture_mipmap_bias() const;
void set_use_debanding(bool p_use_debanding);
bool is_using_debanding() const;
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 73e8f537d9..bd72858ae6 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1516,7 +1516,7 @@ void Window::_validate_property(PropertyInfo &property) const {
Transform2D Window::get_screen_transform() const {
Transform2D embedder_transform = Transform2D();
if (_get_embedder()) {
- embedder_transform.translate(get_position());
+ embedder_transform.translate_local(get_position());
embedder_transform = _get_embedder()->get_screen_transform() * embedder_transform;
}
return embedder_transform * Viewport::get_screen_transform();
diff --git a/scene/multiplayer/SCsub b/scene/multiplayer/SCsub
deleted file mode 100644
index fc61250247..0000000000
--- a/scene/multiplayer/SCsub
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-
-env.add_source_files(env.scene_sources, "*.cpp")
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 09a283ea53..0878a9f78f 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -130,18 +130,14 @@
#include "scene/main/http_request.h"
#include "scene/main/instance_placeholder.h"
#include "scene/main/missing_node.h"
+#include "scene/main/multiplayer_api.h"
#include "scene/main/resource_preloader.h"
#include "scene/main/scene_tree.h"
#include "scene/main/timer.h"
#include "scene/main/viewport.h"
#include "scene/main/window.h"
-#include "scene/multiplayer/multiplayer_spawner.h"
-#include "scene/multiplayer/multiplayer_synchronizer.h"
-#include "scene/multiplayer/scene_cache_interface.h"
-#include "scene/multiplayer/scene_replication_interface.h"
-#include "scene/multiplayer/scene_rpc_interface.h"
#include "scene/resources/animation_library.h"
-#include "scene/resources/audio_stream_sample.h"
+#include "scene/resources/audio_stream_wav.h"
#include "scene/resources/bit_map.h"
#include "scene/resources/bone_map.h"
#include "scene/resources/box_shape_3d.h"
@@ -248,6 +244,7 @@
#include "scene/3d/ray_cast_3d.h"
#include "scene/3d/reflection_probe.h"
#include "scene/3d/remote_transform_3d.h"
+#include "scene/3d/shape_cast_3d.h"
#include "scene/3d/skeleton_3d.h"
#include "scene/3d/skeleton_ik_3d.h"
#include "scene/3d/soft_dynamic_body_3d.h"
@@ -322,9 +319,13 @@ void register_scene_types() {
GDREGISTER_ABSTRACT_CLASS(Viewport);
GDREGISTER_CLASS(SubViewport);
GDREGISTER_CLASS(ViewportTexture);
+
+ GDREGISTER_ABSTRACT_CLASS(MultiplayerPeer);
+ GDREGISTER_CLASS(MultiplayerPeerExtension);
+ GDREGISTER_ABSTRACT_CLASS(MultiplayerAPI);
+ GDREGISTER_CLASS(MultiplayerAPIExtension);
+
GDREGISTER_CLASS(HTTPRequest);
- GDREGISTER_CLASS(MultiplayerSpawner);
- GDREGISTER_CLASS(MultiplayerSynchronizer);
GDREGISTER_CLASS(Timer);
GDREGISTER_CLASS(CanvasLayer);
GDREGISTER_CLASS(CanvasModulate);
@@ -549,6 +550,7 @@ void register_scene_types() {
GDREGISTER_CLASS(CollisionShape3D);
GDREGISTER_CLASS(CollisionPolygon3D);
GDREGISTER_CLASS(RayCast3D);
+ GDREGISTER_CLASS(ShapeCast3D);
GDREGISTER_CLASS(MultiMeshInstance3D);
GDREGISTER_CLASS(Curve3D);
@@ -870,13 +872,12 @@ void register_scene_types() {
GDREGISTER_ABSTRACT_CLASS(Font);
GDREGISTER_CLASS(FontFile);
GDREGISTER_CLASS(FontVariation);
+ GDREGISTER_CLASS(SystemFont);
GDREGISTER_CLASS(Curve);
GDREGISTER_CLASS(LabelSettings);
- GDREGISTER_CLASS(SceneReplicationConfig);
-
GDREGISTER_CLASS(TextLine);
GDREGISTER_CLASS(TextParagraph);
@@ -903,7 +904,7 @@ void register_scene_types() {
GDREGISTER_CLASS(AudioStreamPlayer3D);
#endif
GDREGISTER_ABSTRACT_CLASS(VideoStream);
- GDREGISTER_CLASS(AudioStreamSample);
+ GDREGISTER_CLASS(AudioStreamWAV);
OS::get_singleton()->yield(); // may take time to init
@@ -1090,6 +1091,9 @@ void register_scene_types() {
ClassDB::add_compatibility_class("World", "World3D");
// Renamed during 4.0 alpha, added to ease transition between alphas.
+ ClassDB::add_compatibility_class("AudioStreamOGGVorbis", "AudioStreamOggVorbis");
+ ClassDB::add_compatibility_class("AudioStreamSample", "AudioStreamWAV");
+ ClassDB::add_compatibility_class("OGGPacketSequence", "OggPacketSequence");
ClassDB::add_compatibility_class("StreamCubemap", "CompressedCubemap");
ClassDB::add_compatibility_class("StreamCubemapArray", "CompressedCubemapArray");
ClassDB::add_compatibility_class("StreamTexture2D", "CompressedTexture2D");
@@ -1117,9 +1121,6 @@ void register_scene_types() {
}
SceneDebugger::initialize();
- SceneReplicationInterface::make_default();
- SceneRPCInterface::make_default();
- SceneCacheInterface::make_default();
}
void initialize_theme() {
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 7183accc66..69b30b72b0 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1563,33 +1563,35 @@ int Animation::track_find_key(int p_track, double p_time, bool p_exact) const {
return -1;
}
-void Animation::track_insert_key(int p_track, double p_time, const Variant &p_key, real_t p_transition) {
- ERR_FAIL_INDEX(p_track, tracks.size());
+int Animation::track_insert_key(int p_track, double p_time, const Variant &p_key, real_t p_transition) {
+ ERR_FAIL_INDEX_V(p_track, tracks.size(), -1);
Track *t = tracks[p_track];
+ int ret = -1;
+
switch (t->type) {
case TYPE_POSITION_3D: {
- ERR_FAIL_COND((p_key.get_type() != Variant::VECTOR3) && (p_key.get_type() != Variant::VECTOR3I));
- int idx = position_track_insert_key(p_track, p_time, p_key);
- track_set_key_transition(p_track, idx, p_transition);
+ ERR_FAIL_COND_V((p_key.get_type() != Variant::VECTOR3) && (p_key.get_type() != Variant::VECTOR3I), -1);
+ ret = position_track_insert_key(p_track, p_time, p_key);
+ track_set_key_transition(p_track, ret, p_transition);
} break;
case TYPE_ROTATION_3D: {
- ERR_FAIL_COND((p_key.get_type() != Variant::QUATERNION) && (p_key.get_type() != Variant::BASIS));
- int idx = rotation_track_insert_key(p_track, p_time, p_key);
- track_set_key_transition(p_track, idx, p_transition);
+ ERR_FAIL_COND_V((p_key.get_type() != Variant::QUATERNION) && (p_key.get_type() != Variant::BASIS), -1);
+ ret = rotation_track_insert_key(p_track, p_time, p_key);
+ track_set_key_transition(p_track, ret, p_transition);
} break;
case TYPE_SCALE_3D: {
- ERR_FAIL_COND((p_key.get_type() != Variant::VECTOR3) && (p_key.get_type() != Variant::VECTOR3I));
- int idx = scale_track_insert_key(p_track, p_time, p_key);
- track_set_key_transition(p_track, idx, p_transition);
+ ERR_FAIL_COND_V((p_key.get_type() != Variant::VECTOR3) && (p_key.get_type() != Variant::VECTOR3I), -1);
+ ret = scale_track_insert_key(p_track, p_time, p_key);
+ track_set_key_transition(p_track, ret, p_transition);
} break;
case TYPE_BLEND_SHAPE: {
- ERR_FAIL_COND((p_key.get_type() != Variant::FLOAT) && (p_key.get_type() != Variant::INT));
- int idx = blend_shape_track_insert_key(p_track, p_time, p_key);
- track_set_key_transition(p_track, idx, p_transition);
+ ERR_FAIL_COND_V((p_key.get_type() != Variant::FLOAT) && (p_key.get_type() != Variant::INT), -1);
+ ret = blend_shape_track_insert_key(p_track, p_time, p_key);
+ track_set_key_transition(p_track, ret, p_transition);
} break;
case TYPE_VALUE: {
@@ -1599,17 +1601,17 @@ void Animation::track_insert_key(int p_track, double p_time, const Variant &p_ke
k.time = p_time;
k.transition = p_transition;
k.value = p_key;
- _insert(p_time, vt->values, k);
+ ret = _insert(p_time, vt->values, k);
} break;
case TYPE_METHOD: {
MethodTrack *mt = static_cast<MethodTrack *>(t);
- ERR_FAIL_COND(p_key.get_type() != Variant::DICTIONARY);
+ ERR_FAIL_COND_V(p_key.get_type() != Variant::DICTIONARY, -1);
Dictionary d = p_key;
- ERR_FAIL_COND(!d.has("method") || (d["method"].get_type() != Variant::STRING_NAME && d["method"].get_type() != Variant::STRING));
- ERR_FAIL_COND(!d.has("args") || !d["args"].is_array());
+ ERR_FAIL_COND_V(!d.has("method") || (d["method"].get_type() != Variant::STRING_NAME && d["method"].get_type() != Variant::STRING), -1);
+ ERR_FAIL_COND_V(!d.has("args") || !d["args"].is_array(), -1);
MethodKey k;
@@ -1618,14 +1620,14 @@ void Animation::track_insert_key(int p_track, double p_time, const Variant &p_ke
k.method = d["method"];
k.params = d["args"];
- _insert(p_time, mt->methods, k);
+ ret = _insert(p_time, mt->methods, k);
} break;
case TYPE_BEZIER: {
BezierTrack *bt = static_cast<BezierTrack *>(t);
Array arr = p_key;
- ERR_FAIL_COND(arr.size() != 6);
+ ERR_FAIL_COND_V(arr.size() != 6, -1);
TKey<BezierKey> k;
k.time = p_time;
@@ -1635,23 +1637,23 @@ void Animation::track_insert_key(int p_track, double p_time, const Variant &p_ke
k.value.out_handle.x = arr[3];
k.value.out_handle.y = arr[4];
k.value.handle_mode = static_cast<HandleMode>((int)arr[5]);
- _insert(p_time, bt->values, k);
+ ret = _insert(p_time, bt->values, k);
} break;
case TYPE_AUDIO: {
AudioTrack *at = static_cast<AudioTrack *>(t);
Dictionary k = p_key;
- ERR_FAIL_COND(!k.has("start_offset"));
- ERR_FAIL_COND(!k.has("end_offset"));
- ERR_FAIL_COND(!k.has("stream"));
+ ERR_FAIL_COND_V(!k.has("start_offset"), -1);
+ ERR_FAIL_COND_V(!k.has("end_offset"), -1);
+ ERR_FAIL_COND_V(!k.has("stream"), -1);
TKey<AudioKey> ak;
ak.time = p_time;
ak.value.start_offset = k["start_offset"];
ak.value.end_offset = k["end_offset"];
ak.value.stream = k["stream"];
- _insert(p_time, at->values, ak);
+ ret = _insert(p_time, at->values, ak);
} break;
case TYPE_ANIMATION: {
@@ -1661,12 +1663,14 @@ void Animation::track_insert_key(int p_track, double p_time, const Variant &p_ke
ak.time = p_time;
ak.value = p_key;
- _insert(p_time, at->values, ak);
+ ret = _insert(p_time, at->values, ak);
} break;
}
emit_changed();
+
+ return ret;
}
int Animation::track_get_key_count(int p_track) const {
@@ -2302,7 +2306,7 @@ Vector3 Animation::_cubic_interpolate(const Vector3 &p_pre_a, const Vector3 &p_a
}
Quaternion Animation::_cubic_interpolate(const Quaternion &p_pre_a, const Quaternion &p_a, const Quaternion &p_b, const Quaternion &p_post_b, real_t p_c) const {
- return p_a.cubic_slerp(p_b, p_pre_a, p_post_b, p_c);
+ return p_a.spherical_cubic_interpolate(p_b, p_pre_a, p_post_b, p_c);
}
Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a, const Variant &p_b, const Variant &p_post_b, real_t p_c) const {
@@ -2363,7 +2367,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a
Quaternion pa = p_pre_a;
Quaternion pb = p_post_b;
- return a.cubic_slerp(b, pa, pb, p_c);
+ return a.spherical_cubic_interpolate(b, pa, pb, p_c);
}
case Variant::AABB: {
AABB a = p_a;
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index abbcaa92bc..bf9f786a0d 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -392,7 +392,7 @@ public:
void track_set_enabled(int p_track, bool p_enabled);
bool track_is_enabled(int p_track) const;
- void track_insert_key(int p_track, double p_time, const Variant &p_key, real_t p_transition = 1);
+ int track_insert_key(int p_track, double p_time, const Variant &p_key, real_t p_transition = 1);
void track_set_key_transition(int p_track, int p_key_idx, real_t p_transition);
void track_set_key_value(int p_track, int p_key_idx, const Variant &p_value);
void track_set_key_time(int p_track, int p_key_idx, double p_time);
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_wav.cpp
index dcd36284d4..a87c8272ea 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_wav.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_stream_sample.cpp */
+/* audio_stream_wav.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "audio_stream_sample.h"
+#include "audio_stream_wav.h"
#include "core/io/file_access.h"
#include "core/io/marshalls.h"
-void AudioStreamPlaybackSample::start(float p_from_pos) {
- if (base->format == AudioStreamSample::FORMAT_IMA_ADPCM) {
+void AudioStreamPlaybackWAV::start(float p_from_pos) {
+ if (base->format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
//no seeking in IMA_ADPCM
for (int i = 0; i < 2; i++) {
ima_adpcm[i].step_index = 0;
@@ -55,24 +55,24 @@ void AudioStreamPlaybackSample::start(float p_from_pos) {
active = true;
}
-void AudioStreamPlaybackSample::stop() {
+void AudioStreamPlaybackWAV::stop() {
active = false;
}
-bool AudioStreamPlaybackSample::is_playing() const {
+bool AudioStreamPlaybackWAV::is_playing() const {
return active;
}
-int AudioStreamPlaybackSample::get_loop_count() const {
+int AudioStreamPlaybackWAV::get_loop_count() const {
return 0;
}
-float AudioStreamPlaybackSample::get_playback_position() const {
+float AudioStreamPlaybackWAV::get_playback_position() const {
return float(offset >> MIX_FRAC_BITS) / base->mix_rate;
}
-void AudioStreamPlaybackSample::seek(float p_time) {
- if (base->format == AudioStreamSample::FORMAT_IMA_ADPCM) {
+void AudioStreamPlaybackWAV::seek(float p_time) {
+ if (base->format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
return; //no seeking in ima-adpcm
}
@@ -87,7 +87,7 @@ void AudioStreamPlaybackSample::seek(float p_time) {
}
template <class Depth, bool is_stereo, bool is_ima_adpcm>
-void AudioStreamPlaybackSample::do_resample(const Depth *p_src, AudioFrame *p_dst, int64_t &offset, int32_t &increment, uint32_t amount, IMA_ADPCM_State *ima_adpcm) {
+void AudioStreamPlaybackWAV::do_resample(const Depth *p_src, AudioFrame *p_dst, int64_t &offset, int32_t &increment, uint32_t amount, IMA_ADPCM_State *ima_adpcm) {
// this function will be compiled branchless by any decent compiler
int32_t final, final_r, next, next_r;
@@ -124,7 +124,7 @@ void AudioStreamPlaybackSample::do_resample(const Depth *p_src, AudioFrame *p_ds
ima_adpcm[i].last_nibble++;
const uint8_t *src_ptr = (const uint8_t *)base->data;
- src_ptr += AudioStreamSample::DATA_PAD;
+ src_ptr += AudioStreamWAV::DATA_PAD;
uint8_t nbb = src_ptr[(ima_adpcm[i].last_nibble >> 1) * (is_stereo ? 2 : 1) + i];
nibble = (ima_adpcm[i].last_nibble & 1) ? (nbb >> 4) : (nbb & 0xF);
@@ -221,7 +221,7 @@ void AudioStreamPlaybackSample::do_resample(const Depth *p_src, AudioFrame *p_ds
}
}
-int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+int AudioStreamPlaybackWAV::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
if (!base->data || !active) {
for (int i = 0; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0, 0);
@@ -231,13 +231,13 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
int len = base->data_bytes;
switch (base->format) {
- case AudioStreamSample::FORMAT_8_BITS:
+ case AudioStreamWAV::FORMAT_8_BITS:
len /= 1;
break;
- case AudioStreamSample::FORMAT_16_BITS:
+ case AudioStreamWAV::FORMAT_16_BITS:
len /= 2;
break;
- case AudioStreamSample::FORMAT_IMA_ADPCM:
+ case AudioStreamWAV::FORMAT_IMA_ADPCM:
len *= 2;
break;
}
@@ -251,13 +251,13 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
int64_t loop_begin_fp = ((int64_t)base->loop_begin << MIX_FRAC_BITS);
int64_t loop_end_fp = ((int64_t)base->loop_end << MIX_FRAC_BITS);
int64_t length_fp = ((int64_t)len << MIX_FRAC_BITS);
- int64_t begin_limit = (base->loop_mode != AudioStreamSample::LOOP_DISABLED) ? loop_begin_fp : 0;
- int64_t end_limit = (base->loop_mode != AudioStreamSample::LOOP_DISABLED) ? loop_end_fp : length_fp;
+ int64_t begin_limit = (base->loop_mode != AudioStreamWAV::LOOP_DISABLED) ? loop_begin_fp : 0;
+ int64_t end_limit = (base->loop_mode != AudioStreamWAV::LOOP_DISABLED) ? loop_end_fp : length_fp;
bool is_stereo = base->stereo;
int32_t todo = p_frames;
- if (base->loop_mode == AudioStreamSample::LOOP_BACKWARD) {
+ if (base->loop_mode == AudioStreamWAV::LOOP_BACKWARD) {
sign = -1;
}
@@ -271,20 +271,20 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
//looping
- AudioStreamSample::LoopMode loop_format = base->loop_mode;
- AudioStreamSample::Format format = base->format;
+ AudioStreamWAV::LoopMode loop_format = base->loop_mode;
+ AudioStreamWAV::Format format = base->format;
/* audio data */
uint8_t *dataptr = (uint8_t *)base->data;
- const void *data = dataptr + AudioStreamSample::DATA_PAD;
+ const void *data = dataptr + AudioStreamWAV::DATA_PAD;
AudioFrame *dst_buff = p_buffer;
- if (format == AudioStreamSample::FORMAT_IMA_ADPCM) {
- if (loop_format != AudioStreamSample::LOOP_DISABLED) {
+ if (format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
+ if (loop_format != AudioStreamWAV::LOOP_DISABLED) {
ima_adpcm[0].loop_pos = loop_begin_fp >> MIX_FRAC_BITS;
ima_adpcm[1].loop_pos = loop_begin_fp >> MIX_FRAC_BITS;
- loop_format = AudioStreamSample::LOOP_FORWARD;
+ loop_format = AudioStreamWAV::LOOP_FORWARD;
}
}
@@ -297,9 +297,9 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
if (increment < 0) {
/* going backwards */
- if (loop_format != AudioStreamSample::LOOP_DISABLED && offset < loop_begin_fp) {
+ if (loop_format != AudioStreamWAV::LOOP_DISABLED && offset < loop_begin_fp) {
/* loopstart reached */
- if (loop_format == AudioStreamSample::LOOP_PINGPONG) {
+ if (loop_format == AudioStreamWAV::LOOP_PINGPONG) {
/* bounce ping pong */
offset = loop_begin_fp + (loop_begin_fp - offset);
increment = -increment;
@@ -317,10 +317,10 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
}
} else {
/* going forward */
- if (loop_format != AudioStreamSample::LOOP_DISABLED && offset >= loop_end_fp) {
+ if (loop_format != AudioStreamWAV::LOOP_DISABLED && offset >= loop_end_fp) {
/* loopend reached */
- if (loop_format == AudioStreamSample::LOOP_PINGPONG) {
+ if (loop_format == AudioStreamWAV::LOOP_PINGPONG) {
/* bounce ping pong */
offset = loop_end_fp - (offset - loop_end_fp);
increment = -increment;
@@ -328,7 +328,7 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
} else {
/* go to loop-begin */
- if (format == AudioStreamSample::FORMAT_IMA_ADPCM) {
+ if (format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
for (int i = 0; i < 2; i++) {
ima_adpcm[i].step_index = ima_adpcm[i].loop_step_index;
ima_adpcm[i].predictor = ima_adpcm[i].loop_predictor;
@@ -366,14 +366,14 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
todo -= target;
switch (base->format) {
- case AudioStreamSample::FORMAT_8_BITS: {
+ case AudioStreamWAV::FORMAT_8_BITS: {
if (is_stereo) {
do_resample<int8_t, true, false>((int8_t *)data, dst_buff, offset, increment, target, ima_adpcm);
} else {
do_resample<int8_t, false, false>((int8_t *)data, dst_buff, offset, increment, target, ima_adpcm);
}
} break;
- case AudioStreamSample::FORMAT_16_BITS: {
+ case AudioStreamWAV::FORMAT_16_BITS: {
if (is_stereo) {
do_resample<int16_t, true, false>((int16_t *)data, dst_buff, offset, increment, target, ima_adpcm);
} else {
@@ -381,7 +381,7 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
}
} break;
- case AudioStreamSample::FORMAT_IMA_ADPCM: {
+ case AudioStreamWAV::FORMAT_IMA_ADPCM: {
if (is_stereo) {
do_resample<int8_t, true, true>((int8_t *)data, dst_buff, offset, increment, target, ima_adpcm);
} else {
@@ -406,73 +406,73 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int
return p_frames;
}
-void AudioStreamPlaybackSample::tag_used_streams() {
+void AudioStreamPlaybackWAV::tag_used_streams() {
base->tag_used(get_playback_position());
}
-AudioStreamPlaybackSample::AudioStreamPlaybackSample() {}
+AudioStreamPlaybackWAV::AudioStreamPlaybackWAV() {}
/////////////////////
-void AudioStreamSample::set_format(Format p_format) {
+void AudioStreamWAV::set_format(Format p_format) {
format = p_format;
}
-AudioStreamSample::Format AudioStreamSample::get_format() const {
+AudioStreamWAV::Format AudioStreamWAV::get_format() const {
return format;
}
-void AudioStreamSample::set_loop_mode(LoopMode p_loop_mode) {
+void AudioStreamWAV::set_loop_mode(LoopMode p_loop_mode) {
loop_mode = p_loop_mode;
}
-AudioStreamSample::LoopMode AudioStreamSample::get_loop_mode() const {
+AudioStreamWAV::LoopMode AudioStreamWAV::get_loop_mode() const {
return loop_mode;
}
-void AudioStreamSample::set_loop_begin(int p_frame) {
+void AudioStreamWAV::set_loop_begin(int p_frame) {
loop_begin = p_frame;
}
-int AudioStreamSample::get_loop_begin() const {
+int AudioStreamWAV::get_loop_begin() const {
return loop_begin;
}
-void AudioStreamSample::set_loop_end(int p_frame) {
+void AudioStreamWAV::set_loop_end(int p_frame) {
loop_end = p_frame;
}
-int AudioStreamSample::get_loop_end() const {
+int AudioStreamWAV::get_loop_end() const {
return loop_end;
}
-void AudioStreamSample::set_mix_rate(int p_hz) {
+void AudioStreamWAV::set_mix_rate(int p_hz) {
ERR_FAIL_COND(p_hz == 0);
mix_rate = p_hz;
}
-int AudioStreamSample::get_mix_rate() const {
+int AudioStreamWAV::get_mix_rate() const {
return mix_rate;
}
-void AudioStreamSample::set_stereo(bool p_enable) {
+void AudioStreamWAV::set_stereo(bool p_enable) {
stereo = p_enable;
}
-bool AudioStreamSample::is_stereo() const {
+bool AudioStreamWAV::is_stereo() const {
return stereo;
}
-float AudioStreamSample::get_length() const {
+float AudioStreamWAV::get_length() const {
int len = data_bytes;
switch (format) {
- case AudioStreamSample::FORMAT_8_BITS:
+ case AudioStreamWAV::FORMAT_8_BITS:
len /= 1;
break;
- case AudioStreamSample::FORMAT_16_BITS:
+ case AudioStreamWAV::FORMAT_16_BITS:
len /= 2;
break;
- case AudioStreamSample::FORMAT_IMA_ADPCM:
+ case AudioStreamWAV::FORMAT_IMA_ADPCM:
len *= 2;
break;
}
@@ -484,11 +484,11 @@ float AudioStreamSample::get_length() const {
return float(len) / mix_rate;
}
-bool AudioStreamSample::is_monophonic() const {
+bool AudioStreamWAV::is_monophonic() const {
return false;
}
-void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) {
+void AudioStreamWAV::set_data(const Vector<uint8_t> &p_data) {
AudioServer::get_singleton()->lock();
if (data) {
memfree(data);
@@ -510,7 +510,7 @@ void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) {
AudioServer::get_singleton()->unlock();
}
-Vector<uint8_t> AudioStreamSample::get_data() const {
+Vector<uint8_t> AudioStreamWAV::get_data() const {
Vector<uint8_t> pv;
if (data) {
@@ -525,8 +525,8 @@ Vector<uint8_t> AudioStreamSample::get_data() const {
return pv;
}
-Error AudioStreamSample::save_to_wav(const String &p_path) {
- if (format == AudioStreamSample::FORMAT_IMA_ADPCM) {
+Error AudioStreamWAV::save_to_wav(const String &p_path) {
+ if (format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
WARN_PRINT("Saving IMA_ADPC samples are not supported yet");
return ERR_UNAVAILABLE;
}
@@ -544,13 +544,13 @@ Error AudioStreamSample::save_to_wav(const String &p_path) {
int byte_pr_sample = 0;
switch (format) {
- case AudioStreamSample::FORMAT_8_BITS:
+ case AudioStreamWAV::FORMAT_8_BITS:
byte_pr_sample = 1;
break;
- case AudioStreamSample::FORMAT_16_BITS:
+ case AudioStreamWAV::FORMAT_16_BITS:
byte_pr_sample = 2;
break;
- case AudioStreamSample::FORMAT_IMA_ADPCM:
+ case AudioStreamWAV::FORMAT_IMA_ADPCM:
byte_pr_sample = 4;
break;
}
@@ -583,19 +583,19 @@ Error AudioStreamSample::save_to_wav(const String &p_path) {
Vector<uint8_t> data = get_data();
const uint8_t *read_data = data.ptr();
switch (format) {
- case AudioStreamSample::FORMAT_8_BITS:
+ case AudioStreamWAV::FORMAT_8_BITS:
for (unsigned int i = 0; i < data_bytes; i++) {
uint8_t data_point = (read_data[i] + 128);
file->store_8(data_point);
}
break;
- case AudioStreamSample::FORMAT_16_BITS:
+ case AudioStreamWAV::FORMAT_16_BITS:
for (unsigned int i = 0; i < data_bytes / 2; i++) {
uint16_t data_point = decode_uint16(&read_data[i * 2]);
file->store_16(data_point);
}
break;
- case AudioStreamSample::FORMAT_IMA_ADPCM:
+ case AudioStreamWAV::FORMAT_IMA_ADPCM:
//Unimplemented
break;
}
@@ -603,40 +603,40 @@ Error AudioStreamSample::save_to_wav(const String &p_path) {
return OK;
}
-Ref<AudioStreamPlayback> AudioStreamSample::instantiate_playback() {
- Ref<AudioStreamPlaybackSample> sample;
+Ref<AudioStreamPlayback> AudioStreamWAV::instantiate_playback() {
+ Ref<AudioStreamPlaybackWAV> sample;
sample.instantiate();
- sample->base = Ref<AudioStreamSample>(this);
+ sample->base = Ref<AudioStreamWAV>(this);
return sample;
}
-String AudioStreamSample::get_stream_name() const {
+String AudioStreamWAV::get_stream_name() const {
return "";
}
-void AudioStreamSample::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamSample::set_data);
- ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamSample::get_data);
+void AudioStreamWAV::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamWAV::set_data);
+ ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamWAV::get_data);
- ClassDB::bind_method(D_METHOD("set_format", "format"), &AudioStreamSample::set_format);
- ClassDB::bind_method(D_METHOD("get_format"), &AudioStreamSample::get_format);
+ ClassDB::bind_method(D_METHOD("set_format", "format"), &AudioStreamWAV::set_format);
+ ClassDB::bind_method(D_METHOD("get_format"), &AudioStreamWAV::get_format);
- ClassDB::bind_method(D_METHOD("set_loop_mode", "loop_mode"), &AudioStreamSample::set_loop_mode);
- ClassDB::bind_method(D_METHOD("get_loop_mode"), &AudioStreamSample::get_loop_mode);
+ ClassDB::bind_method(D_METHOD("set_loop_mode", "loop_mode"), &AudioStreamWAV::set_loop_mode);
+ ClassDB::bind_method(D_METHOD("get_loop_mode"), &AudioStreamWAV::get_loop_mode);
- ClassDB::bind_method(D_METHOD("set_loop_begin", "loop_begin"), &AudioStreamSample::set_loop_begin);
- ClassDB::bind_method(D_METHOD("get_loop_begin"), &AudioStreamSample::get_loop_begin);
+ ClassDB::bind_method(D_METHOD("set_loop_begin", "loop_begin"), &AudioStreamWAV::set_loop_begin);
+ ClassDB::bind_method(D_METHOD("get_loop_begin"), &AudioStreamWAV::get_loop_begin);
- ClassDB::bind_method(D_METHOD("set_loop_end", "loop_end"), &AudioStreamSample::set_loop_end);
- ClassDB::bind_method(D_METHOD("get_loop_end"), &AudioStreamSample::get_loop_end);
+ ClassDB::bind_method(D_METHOD("set_loop_end", "loop_end"), &AudioStreamWAV::set_loop_end);
+ ClassDB::bind_method(D_METHOD("get_loop_end"), &AudioStreamWAV::get_loop_end);
- ClassDB::bind_method(D_METHOD("set_mix_rate", "mix_rate"), &AudioStreamSample::set_mix_rate);
- ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioStreamSample::get_mix_rate);
+ ClassDB::bind_method(D_METHOD("set_mix_rate", "mix_rate"), &AudioStreamWAV::set_mix_rate);
+ ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioStreamWAV::get_mix_rate);
- ClassDB::bind_method(D_METHOD("set_stereo", "stereo"), &AudioStreamSample::set_stereo);
- ClassDB::bind_method(D_METHOD("is_stereo"), &AudioStreamSample::is_stereo);
+ ClassDB::bind_method(D_METHOD("set_stereo", "stereo"), &AudioStreamWAV::set_stereo);
+ ClassDB::bind_method(D_METHOD("is_stereo"), &AudioStreamWAV::is_stereo);
- ClassDB::bind_method(D_METHOD("save_to_wav", "path"), &AudioStreamSample::save_to_wav);
+ ClassDB::bind_method(D_METHOD("save_to_wav", "path"), &AudioStreamWAV::save_to_wav);
ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_data", "get_data");
ADD_PROPERTY(PropertyInfo(Variant::INT, "format", PROPERTY_HINT_ENUM, "8-Bit,16-Bit,IMA-ADPCM"), "set_format", "get_format");
@@ -656,9 +656,9 @@ void AudioStreamSample::_bind_methods() {
BIND_ENUM_CONSTANT(LOOP_BACKWARD);
}
-AudioStreamSample::AudioStreamSample() {}
+AudioStreamWAV::AudioStreamWAV() {}
-AudioStreamSample::~AudioStreamSample() {
+AudioStreamWAV::~AudioStreamWAV() {
if (data) {
memfree(data);
data = nullptr;
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_wav.h
index 2e694cffe2..d800388d96 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_wav.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* audio_stream_sample.h */
+/* audio_stream_wav.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef AUDIO_STREAM_SAMPLE_H
-#define AUDIO_STREAM_SAMPLE_H
+#ifndef AUDIO_STREAM_WAV_H
+#define AUDIO_STREAM_WAV_H
#include "servers/audio/audio_stream.h"
-class AudioStreamSample;
+class AudioStreamWAV;
-class AudioStreamPlaybackSample : public AudioStreamPlayback {
- GDCLASS(AudioStreamPlaybackSample, AudioStreamPlayback);
+class AudioStreamPlaybackWAV : public AudioStreamPlayback {
+ GDCLASS(AudioStreamPlaybackWAV, AudioStreamPlayback);
enum {
MIX_FRAC_BITS = 13,
MIX_FRAC_LEN = (1 << MIX_FRAC_BITS),
@@ -57,8 +57,8 @@ class AudioStreamPlaybackSample : public AudioStreamPlayback {
int64_t offset = 0;
int sign = 1;
bool active = false;
- friend class AudioStreamSample;
- Ref<AudioStreamSample> base;
+ friend class AudioStreamWAV;
+ Ref<AudioStreamWAV> base;
template <class Depth, bool is_stereo, bool is_ima_adpcm>
void do_resample(const Depth *p_src, AudioFrame *p_dst, int64_t &offset, int32_t &increment, uint32_t amount, IMA_ADPCM_State *ima_adpcm);
@@ -77,11 +77,11 @@ public:
virtual void tag_used_streams() override;
- AudioStreamPlaybackSample();
+ AudioStreamPlaybackWAV();
};
-class AudioStreamSample : public AudioStream {
- GDCLASS(AudioStreamSample, AudioStream);
+class AudioStreamWAV : public AudioStream {
+ GDCLASS(AudioStreamWAV, AudioStream);
RES_BASE_EXTENSION("sample")
public:
@@ -100,7 +100,7 @@ public:
};
private:
- friend class AudioStreamPlaybackSample;
+ friend class AudioStreamPlaybackWAV;
enum {
DATA_PAD = 16 //padding for interpolation
@@ -149,11 +149,11 @@ public:
virtual Ref<AudioStreamPlayback> instantiate_playback() override;
virtual String get_stream_name() const override;
- AudioStreamSample();
- ~AudioStreamSample();
+ AudioStreamWAV();
+ ~AudioStreamWAV();
};
-VARIANT_ENUM_CAST(AudioStreamSample::Format)
-VARIANT_ENUM_CAST(AudioStreamSample::LoopMode)
+VARIANT_ENUM_CAST(AudioStreamWAV::Format)
+VARIANT_ENUM_CAST(AudioStreamWAV::LoopMode)
-#endif // AUDIO_STREAM_SAMPLE_H
+#endif // AUDIO_STREAM_WAV_H
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index f61ac7fcaa..619036d296 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -79,9 +79,9 @@ void Font::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_multiline_string_outline", "canvas_item", "pos", "text", "alignment", "width", "font_size", "max_lines", "size", "modulate", "brk_flags", "jst_flags", "direction", "orientation"), &Font::draw_multiline_string_outline, DEFVAL(HORIZONTAL_ALIGNMENT_LEFT), DEFVAL(-1), DEFVAL(DEFAULT_FONT_SIZE), DEFVAL(-1), DEFVAL(1), DEFVAL(Color(1.0, 1.0, 1.0)), DEFVAL(TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND), DEFVAL(TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND), DEFVAL(TextServer::DIRECTION_AUTO), DEFVAL(TextServer::ORIENTATION_HORIZONTAL));
// Drawing char.
- ClassDB::bind_method(D_METHOD("get_char_size", "char"), &Font::get_char_size);
- ClassDB::bind_method(D_METHOD("draw_char", "canvas_item", "pos", "char", "modulate"), &Font::draw_char, DEFVAL(Color(1.0, 1.0, 1.0)));
- ClassDB::bind_method(D_METHOD("draw_char_outline", "canvas_item", "pos", "char", "size", "modulate"), &Font::draw_char_outline, DEFVAL(-1), DEFVAL(Color(1.0, 1.0, 1.0)));
+ ClassDB::bind_method(D_METHOD("get_char_size", "char", "font_size"), &Font::get_char_size);
+ ClassDB::bind_method(D_METHOD("draw_char", "canvas_item", "pos", "char", "font_size", "modulate"), &Font::draw_char, DEFVAL(Color(1.0, 1.0, 1.0)));
+ ClassDB::bind_method(D_METHOD("draw_char_outline", "canvas_item", "pos", "char", "font_size", "size", "modulate"), &Font::draw_char_outline, DEFVAL(-1), DEFVAL(Color(1.0, 1.0, 1.0)));
// Helper functions.
ClassDB::bind_method(D_METHOD("has_char", "char"), &Font::has_char);
@@ -157,7 +157,7 @@ void Font::set_fallbacks(const TypedArray<Font> &p_fallbacks) {
for (int i = 0; i < fallbacks.size(); i++) {
Ref<Font> f = fallbacks[i];
if (f.is_valid()) {
- f->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Font::_invalidate_rids), varray(), CONNECT_REFERENCE_COUNTED);
+ f->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
}
}
_invalidate_rids();
@@ -2534,7 +2534,7 @@ void FontVariation::set_base_font(const Ref<Font> &p_font) {
}
base_font = p_font;
if (base_font.is_valid()) {
- base_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids), varray(), CONNECT_REFERENCE_COUNTED);
+ base_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
}
_invalidate_rids();
notify_property_list_changed();
@@ -2565,7 +2565,7 @@ Ref<Font> FontVariation::_get_base_font_or_default() const {
Ref<Font> f = Theme::get_project_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E);
if (f.is_valid()) {
theme_font = f;
- theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), varray(), CONNECT_REFERENCE_COUNTED);
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
}
return f;
}
@@ -2582,7 +2582,7 @@ Ref<Font> FontVariation::_get_base_font_or_default() const {
Ref<Font> f = Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E);
if (f.is_valid()) {
theme_font = f;
- theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), varray(), CONNECT_REFERENCE_COUNTED);
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
}
return f;
}
@@ -2592,7 +2592,7 @@ Ref<Font> FontVariation::_get_base_font_or_default() const {
Ref<Font> f = Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", StringName());
if (f.is_valid()) {
theme_font = f;
- theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), varray(), CONNECT_REFERENCE_COUNTED);
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<FontVariation *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
}
return f;
}
@@ -2693,3 +2693,374 @@ FontVariation::FontVariation() {
FontVariation::~FontVariation() {
reset_state();
}
+
+/*************************************************************************/
+/* SystemFont */
+/*************************************************************************/
+
+void SystemFont::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &SystemFont::set_antialiased);
+ ClassDB::bind_method(D_METHOD("is_antialiased"), &SystemFont::is_antialiased);
+
+ ClassDB::bind_method(D_METHOD("set_generate_mipmaps", "generate_mipmaps"), &SystemFont::set_generate_mipmaps);
+ ClassDB::bind_method(D_METHOD("get_generate_mipmaps"), &SystemFont::get_generate_mipmaps);
+
+ ClassDB::bind_method(D_METHOD("set_force_autohinter", "force_autohinter"), &SystemFont::set_force_autohinter);
+ ClassDB::bind_method(D_METHOD("is_force_autohinter"), &SystemFont::is_force_autohinter);
+
+ ClassDB::bind_method(D_METHOD("set_hinting", "hinting"), &SystemFont::set_hinting);
+ ClassDB::bind_method(D_METHOD("get_hinting"), &SystemFont::get_hinting);
+
+ ClassDB::bind_method(D_METHOD("set_subpixel_positioning", "subpixel_positioning"), &SystemFont::set_subpixel_positioning);
+ ClassDB::bind_method(D_METHOD("get_subpixel_positioning"), &SystemFont::get_subpixel_positioning);
+
+ ClassDB::bind_method(D_METHOD("set_oversampling", "oversampling"), &SystemFont::set_oversampling);
+ ClassDB::bind_method(D_METHOD("get_oversampling"), &SystemFont::get_oversampling);
+
+ ClassDB::bind_method(D_METHOD("get_font_names"), &SystemFont::get_font_names);
+ ClassDB::bind_method(D_METHOD("set_font_names", "names"), &SystemFont::set_font_names);
+
+ ClassDB::bind_method(D_METHOD("set_font_style", "style"), &SystemFont::set_font_style);
+
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "font_names"), "set_font_names", "get_font_names");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "font_style", PROPERTY_HINT_FLAGS, "Bold,Italic"), "set_font_style", "get_font_style");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "is_antialiased");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "generate_mipmaps"), "set_generate_mipmaps", "get_generate_mipmaps");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "force_autohinter"), "set_force_autohinter", "is_force_autohinter");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), "set_hinting", "get_hinting");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One half of a pixel,One quarter of a pixel"), "set_subpixel_positioning", "get_subpixel_positioning");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "0,10,0.1"), "set_oversampling", "get_oversampling");
+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "fallbacks", PROPERTY_HINT_ARRAY_TYPE, vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, "Font")), "set_fallbacks", "get_fallbacks");
+}
+
+void SystemFont::_update_rids() const {
+ Ref<Font> f = _get_base_font_or_default();
+
+ rids.clear();
+ if (fallbacks.is_empty() && f.is_valid()) {
+ RID rid = _get_rid();
+ if (rid.is_valid()) {
+ rids.push_back(rid);
+ }
+
+ const TypedArray<Font> &base_fallbacks = f->get_fallbacks();
+ for (int i = 0; i < base_fallbacks.size(); i++) {
+ _update_rids_fb(base_fallbacks[i], 0);
+ }
+ } else {
+ _update_rids_fb(const_cast<SystemFont *>(this), 0);
+ }
+ dirty_rids = false;
+}
+
+void SystemFont::_update_base_font() {
+ if (base_font.is_valid()) {
+ base_font->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids));
+ base_font.unref();
+ }
+
+ face_indeces.clear();
+ ftr_weight = 0;
+ ftr_italic = 0;
+ for (const String &E : names) {
+ if (E.is_empty()) {
+ continue;
+ }
+
+ String path = OS::get_singleton()->get_system_font_path(E, style & TextServer::FONT_BOLD, style & TextServer::FONT_ITALIC);
+ if (path.is_empty()) {
+ continue;
+ }
+ Ref<FontFile> file;
+ file.instantiate();
+ Error err = file->load_dynamic_font(path);
+ if (err != OK) {
+ continue;
+ }
+
+ // If it's a font collection check all faces to match requested style.
+ for (int i = 0; i < file->get_face_count(); i++) {
+ file->set_face_index(0, i);
+ if (((file->get_font_style() & TextServer::FONT_BOLD) == (style & TextServer::FONT_BOLD)) && ((file->get_font_style() & TextServer::FONT_ITALIC) == (style & TextServer::FONT_ITALIC))) {
+ face_indeces.push_back(i);
+ }
+ }
+ if (face_indeces.is_empty()) {
+ face_indeces.push_back(0);
+ }
+ file->set_face_index(0, face_indeces[0]);
+
+ // If it's a variable font, apply weight and italic coordinates to match requested style.
+ Dictionary ftr = file->get_supported_variation_list();
+ if ((style & TextServer::FONT_BOLD) && ftr.has(TS->name_to_tag("weight"))) {
+ ftr_weight = 700;
+ }
+ if ((style & TextServer::FONT_ITALIC) && ftr.has(TS->name_to_tag("italic"))) {
+ ftr_italic = 1;
+ }
+
+ // Apply font rendering settings.
+ file->set_antialiased(antialiased);
+ file->set_generate_mipmaps(mipmaps);
+ file->set_force_autohinter(force_autohinter);
+ file->set_hinting(hinting);
+ file->set_subpixel_positioning(subpixel_positioning);
+ file->set_oversampling(oversampling);
+
+ base_font = file;
+ }
+
+ if (base_font.is_valid()) {
+ base_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
+ }
+
+ _invalidate_rids();
+ notify_property_list_changed();
+}
+
+void SystemFont::reset_state() {
+ if (base_font.is_valid()) {
+ base_font->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids));
+ base_font.unref();
+ }
+
+ if (theme_font.is_valid()) {
+ theme_font->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids));
+ theme_font.unref();
+ }
+
+ names.clear();
+ face_indeces.clear();
+ ftr_weight = 0;
+ ftr_italic = 0;
+ style = 0;
+ antialiased = true;
+ mipmaps = false;
+ force_autohinter = false;
+ hinting = TextServer::HINTING_LIGHT;
+ subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_DISABLED;
+ oversampling = 0.f;
+
+ Font::reset_state();
+}
+
+Ref<Font> SystemFont::_get_base_font_or_default() const {
+ if (theme_font.is_valid()) {
+ theme_font->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<SystemFont *>(this)), &Font::_invalidate_rids));
+ theme_font.unref();
+ }
+
+ if (base_font.is_valid()) {
+ return base_font;
+ }
+
+ // Check the project-defined Theme resource.
+ if (Theme::get_project_default().is_valid()) {
+ List<StringName> theme_types;
+ Theme::get_project_default()->get_type_dependencies(get_class_name(), StringName(), &theme_types);
+
+ for (const StringName &E : theme_types) {
+ if (Theme::get_project_default()->has_theme_item(Theme::DATA_TYPE_FONT, "font", E)) {
+ Ref<Font> f = Theme::get_project_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E);
+ if (f.is_valid()) {
+ theme_font = f;
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<SystemFont *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
+ }
+ return f;
+ }
+ }
+ }
+
+ // Lastly, fall back on the items defined in the default Theme, if they exist.
+ if (Theme::get_default().is_valid()) {
+ List<StringName> theme_types;
+ Theme::get_default()->get_type_dependencies(get_class_name(), StringName(), &theme_types);
+
+ for (const StringName &E : theme_types) {
+ if (Theme::get_default()->has_theme_item(Theme::DATA_TYPE_FONT, "font", E)) {
+ Ref<Font> f = Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", E);
+ if (f.is_valid()) {
+ theme_font = f;
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<SystemFont *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
+ }
+ return f;
+ }
+ }
+
+ // If they don't exist, use any type to return the default/empty value.
+ Ref<Font> f = Theme::get_default()->get_theme_item(Theme::DATA_TYPE_FONT, "font", StringName());
+ if (f.is_valid()) {
+ theme_font = f;
+ theme_font->connect(CoreStringNames::get_singleton()->changed, callable_mp(reinterpret_cast<Font *>(const_cast<SystemFont *>(this)), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
+ }
+ return f;
+ }
+
+ return Ref<Font>();
+}
+
+void SystemFont::set_antialiased(bool p_antialiased) {
+ if (antialiased != p_antialiased) {
+ antialiased = p_antialiased;
+ if (base_font.is_valid()) {
+ base_font->set_antialiased(antialiased);
+ }
+ emit_changed();
+ }
+}
+
+bool SystemFont::is_antialiased() const {
+ return antialiased;
+}
+
+void SystemFont::set_generate_mipmaps(bool p_generate_mipmaps) {
+ if (mipmaps != p_generate_mipmaps) {
+ mipmaps = p_generate_mipmaps;
+ if (base_font.is_valid()) {
+ base_font->set_generate_mipmaps(mipmaps);
+ }
+ emit_changed();
+ }
+}
+
+bool SystemFont::get_generate_mipmaps() const {
+ return mipmaps;
+}
+
+void SystemFont::set_force_autohinter(bool p_force_autohinter) {
+ if (force_autohinter != p_force_autohinter) {
+ force_autohinter = p_force_autohinter;
+ if (base_font.is_valid()) {
+ base_font->set_force_autohinter(force_autohinter);
+ }
+ emit_changed();
+ }
+}
+
+bool SystemFont::is_force_autohinter() const {
+ return force_autohinter;
+}
+
+void SystemFont::set_hinting(TextServer::Hinting p_hinting) {
+ if (hinting != p_hinting) {
+ hinting = p_hinting;
+ if (base_font.is_valid()) {
+ base_font->set_hinting(hinting);
+ }
+ emit_changed();
+ }
+}
+
+TextServer::Hinting SystemFont::get_hinting() const {
+ return hinting;
+}
+
+void SystemFont::set_subpixel_positioning(TextServer::SubpixelPositioning p_subpixel) {
+ if (subpixel_positioning != p_subpixel) {
+ subpixel_positioning = p_subpixel;
+ if (base_font.is_valid()) {
+ base_font->set_subpixel_positioning(subpixel_positioning);
+ }
+ emit_changed();
+ }
+}
+
+TextServer::SubpixelPositioning SystemFont::get_subpixel_positioning() const {
+ return subpixel_positioning;
+}
+
+void SystemFont::set_oversampling(real_t p_oversampling) {
+ if (oversampling != p_oversampling) {
+ oversampling = p_oversampling;
+ if (base_font.is_valid()) {
+ base_font->set_oversampling(oversampling);
+ }
+ emit_changed();
+ }
+}
+
+real_t SystemFont::get_oversampling() const {
+ return oversampling;
+}
+
+void SystemFont::set_font_names(const PackedStringArray &p_names) {
+ if (names != p_names) {
+ names = p_names;
+ _update_base_font();
+ }
+}
+
+PackedStringArray SystemFont::get_font_names() const {
+ return names;
+}
+
+void SystemFont::set_font_style(BitField<TextServer::FontStyle> p_style) {
+ if (style != p_style) {
+ style = p_style;
+ _update_base_font();
+ }
+}
+
+BitField<TextServer::FontStyle> SystemFont::get_font_style() const {
+ return style;
+}
+
+int SystemFont::get_spacing(TextServer::SpacingType p_spacing) const {
+ if (base_font.is_valid()) {
+ return base_font->get_spacing(p_spacing);
+ } else {
+ return 0;
+ }
+}
+
+RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_face_index, float p_strength, Transform2D p_transform) const {
+ Ref<Font> f = _get_base_font_or_default();
+ if (f.is_valid()) {
+ Dictionary var = p_variation_coordinates;
+ if (ftr_weight > 0 && !var.has(TS->name_to_tag("weight"))) {
+ var[TS->name_to_tag("weight")] = ftr_weight;
+ }
+ if (ftr_italic > 0 && !var.has(TS->name_to_tag("italic"))) {
+ var[TS->name_to_tag("italic")] = ftr_italic;
+ }
+
+ if (!face_indeces.is_empty()) {
+ int face_index = CLAMP(p_face_index, 0, face_indeces.size() - 1);
+ return f->find_variation(var, face_indeces[face_index], p_strength, p_transform);
+ } else {
+ return f->find_variation(var, 0, p_strength, p_transform);
+ }
+ }
+ return RID();
+}
+
+RID SystemFont::_get_rid() const {
+ Ref<Font> f = _get_base_font_or_default();
+ if (f.is_valid()) {
+ if (!face_indeces.is_empty()) {
+ Dictionary var;
+ if (ftr_weight > 0) {
+ var[TS->name_to_tag("weight")] = ftr_weight;
+ }
+ if (ftr_italic > 0) {
+ var[TS->name_to_tag("italic")] = ftr_italic;
+ }
+ return f->find_variation(var, face_indeces[0]);
+ } else {
+ return f->_get_rid();
+ }
+ }
+ return RID();
+}
+
+int64_t SystemFont::get_face_count() const {
+ return face_indeces.size();
+}
+
+SystemFont::SystemFont() {
+ /* NOP */
+}
+
+SystemFont::~SystemFont() {
+ reset_state();
+}
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 8a2f83c414..260b4e521f 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -41,7 +41,7 @@ class TextLine;
class TextParagraph;
/*************************************************************************/
-/* Font */
+/* Font */
/*************************************************************************/
class Font : public Resource {
@@ -381,4 +381,74 @@ public:
~FontVariation();
};
+/*************************************************************************/
+/* SystemFont */
+/*************************************************************************/
+
+class SystemFont : public Font {
+ GDCLASS(SystemFont, Font);
+
+ PackedStringArray names;
+ BitField<TextServer::FontStyle> style = 0;
+
+ mutable Ref<Font> theme_font;
+
+ Ref<FontFile> base_font;
+ Vector<int> face_indeces;
+ int ftr_weight = 0;
+ int ftr_italic = 0;
+
+ bool antialiased = true;
+ bool mipmaps = false;
+ bool force_autohinter = false;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
+ real_t oversampling = 0.f;
+
+protected:
+ static void _bind_methods();
+
+ virtual void _update_base_font();
+ virtual void _update_rids() const override;
+
+ virtual void reset_state() override;
+
+public:
+ virtual Ref<Font> _get_base_font_or_default() const;
+
+ virtual void set_antialiased(bool p_antialiased);
+ virtual bool is_antialiased() const;
+
+ virtual void set_generate_mipmaps(bool p_generate_mipmaps);
+ virtual bool get_generate_mipmaps() const;
+
+ virtual void set_force_autohinter(bool p_force_autohinter);
+ virtual bool is_force_autohinter() const;
+
+ virtual void set_hinting(TextServer::Hinting p_hinting);
+ virtual TextServer::Hinting get_hinting() const;
+
+ virtual void set_subpixel_positioning(TextServer::SubpixelPositioning p_subpixel);
+ virtual TextServer::SubpixelPositioning get_subpixel_positioning() const;
+
+ virtual void set_oversampling(real_t p_oversampling);
+ virtual real_t get_oversampling() const;
+
+ virtual void set_font_names(const PackedStringArray &p_names);
+ virtual PackedStringArray get_font_names() const;
+
+ virtual void set_font_style(BitField<TextServer::FontStyle> p_style);
+ virtual BitField<TextServer::FontStyle> get_font_style() const override;
+
+ virtual int get_spacing(TextServer::SpacingType p_spacing) const override;
+
+ virtual RID find_variation(const Dictionary &p_variation_coordinates, int p_face_index = 0, float p_strength = 0.0, Transform2D p_transform = Transform2D()) const override;
+ virtual RID _get_rid() const override;
+
+ int64_t get_face_count() const override;
+
+ SystemFont();
+ ~SystemFont();
+};
+
#endif // FONT_H
diff --git a/scene/resources/label_settings.cpp b/scene/resources/label_settings.cpp
index e8b986b431..ef380a68f9 100644
--- a/scene/resources/label_settings.cpp
+++ b/scene/resources/label_settings.cpp
@@ -99,7 +99,7 @@ void LabelSettings::set_font(const Ref<Font> &p_font) {
}
font = p_font;
if (font.is_valid()) {
- font->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &LabelSettings::_font_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ font->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &LabelSettings::_font_changed), CONNECT_REFERENCE_COUNTED);
}
emit_changed();
}
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index f07232a3ad..fa3f3476e8 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -1793,12 +1793,21 @@ void BaseMaterial3D::set_flag(Flags p_flag, bool p_enabled) {
}
flags[p_flag] = p_enabled;
- if (p_flag == FLAG_USE_SHADOW_TO_OPACITY || p_flag == FLAG_USE_TEXTURE_REPEAT || p_flag == FLAG_SUBSURFACE_MODE_SKIN || p_flag == FLAG_USE_POINT_SIZE) {
+
+ if (
+ p_flag == FLAG_USE_SHADOW_TO_OPACITY ||
+ p_flag == FLAG_USE_TEXTURE_REPEAT ||
+ p_flag == FLAG_SUBSURFACE_MODE_SKIN ||
+ p_flag == FLAG_USE_POINT_SIZE ||
+ p_flag == FLAG_UV1_USE_TRIPLANAR ||
+ p_flag == FLAG_UV2_USE_TRIPLANAR) {
notify_property_list_changed();
}
+
if (p_flag == FLAG_PARTICLE_TRAILS_MODE) {
update_configuration_warning();
}
+
_queue_shader_change();
}
@@ -1924,6 +1933,14 @@ void BaseMaterial3D::_validate_property(PropertyInfo &property) const {
property.usage = PROPERTY_USAGE_NO_EDITOR;
}
+ if ((property.name == "uv1_triplanar_sharpness" || property.name == "uv1_world_triplanar") && !flags[FLAG_UV1_USE_TRIPLANAR]) {
+ property.usage = PROPERTY_USAGE_NO_EDITOR;
+ }
+
+ if ((property.name == "uv2_triplanar_sharpness" || property.name == "uv2_world_triplanar") && !flags[FLAG_UV2_USE_TRIPLANAR]) {
+ property.usage = PROPERTY_USAGE_NO_EDITOR;
+ }
+
// you can only enable anti-aliasing (in materials) on alpha scissor and alpha hash
const bool can_select_aa = (transparency == TRANSPARENCY_ALPHA_SCISSOR || transparency == TRANSPARENCY_ALPHA_HASH);
// alpha anti aliasiasing is only enabled when you can select aa
@@ -2684,7 +2701,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_on_uv2"), "set_flag", "get_flag", FLAG_EMISSION_ON_UV2);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "emission_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_EMISSION);
- ADD_GROUP("NormalMap", "normal_");
+ ADD_GROUP("Normal Map", "normal_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "normal_enabled"), "set_feature", "get_feature", FEATURE_NORMAL_MAPPING);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_NORMAL);
@@ -2724,7 +2741,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "heightmap_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_HEIGHTMAP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "heightmap_flip_texture"), "set_flag", "get_flag", FLAG_INVERT_HEIGHTMAP);
- ADD_GROUP("Subsurf Scatter", "subsurf_scatter_");
+ ADD_GROUP("Subsurface Scattering", "subsurf_scatter_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "subsurf_scatter_enabled"), "set_feature", "get_feature", FEATURE_SUBSURFACE_SCATTERING);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "subsurf_scatter_skin_mode"), "set_flag", "get_flag", FLAG_SUBSURFACE_MODE_SKIN);
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 3e7b0a2808..ec9db89794 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -260,6 +260,64 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
return triangle_mesh;
}
+Ref<TriangleMesh> Mesh::generate_surface_triangle_mesh(int p_surface) const {
+ ERR_FAIL_INDEX_V(p_surface, get_surface_count(), Ref<TriangleMesh>());
+
+ if (surface_triangle_meshes.size() != get_surface_count()) {
+ surface_triangle_meshes.resize(get_surface_count());
+ }
+
+ if (surface_triangle_meshes[p_surface].is_valid()) {
+ return surface_triangle_meshes[p_surface];
+ }
+
+ int facecount = 0;
+
+ if (surface_get_primitive_type(p_surface) != PRIMITIVE_TRIANGLES) {
+ return Ref<TriangleMesh>();
+ }
+
+ if (surface_get_format(p_surface) & ARRAY_FORMAT_INDEX) {
+ facecount += surface_get_array_index_len(p_surface);
+ } else {
+ facecount += surface_get_array_len(p_surface);
+ }
+
+ Vector<Vector3> faces;
+ faces.resize(facecount);
+ Vector3 *facesw = faces.ptrw();
+
+ Array a = surface_get_arrays(p_surface);
+ ERR_FAIL_COND_V(a.is_empty(), Ref<TriangleMesh>());
+
+ int vc = surface_get_array_len(p_surface);
+ Vector<Vector3> vertices = a[ARRAY_VERTEX];
+ const Vector3 *vr = vertices.ptr();
+ int widx = 0;
+
+ if (surface_get_format(p_surface) & ARRAY_FORMAT_INDEX) {
+ int ic = surface_get_array_index_len(p_surface);
+ Vector<int> indices = a[ARRAY_INDEX];
+ const int *ir = indices.ptr();
+
+ for (int j = 0; j < ic; j++) {
+ int index = ir[j];
+ facesw[widx++] = vr[index];
+ }
+
+ } else {
+ for (int j = 0; j < vc; j++) {
+ facesw[widx++] = vr[j];
+ }
+ }
+
+ Ref<TriangleMesh> triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh));
+ triangle_mesh->create(faces);
+ surface_triangle_meshes.set(p_surface, triangle_mesh);
+
+ return triangle_mesh;
+}
+
void Mesh::generate_debug_mesh_lines(Vector<Vector3> &r_lines) {
if (debug_lines.size() > 0) {
r_lines = debug_lines;
@@ -320,6 +378,14 @@ Vector<Face3> Mesh::get_faces() const {
return Vector<Face3>();
}
+Vector<Face3> Mesh::get_surface_faces(int p_surface) const {
+ Ref<TriangleMesh> tm = generate_surface_triangle_mesh(p_surface);
+ if (tm.is_valid()) {
+ return tm->get_faces();
+ }
+ return Vector<Face3>();
+}
+
Ref<Shape3D> Mesh::create_convex_shape(bool p_clean, bool p_simplify) const {
if (p_simplify) {
ConvexDecompositionSettings settings;
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 0f3fae4179..142373ce7f 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -42,6 +42,7 @@ class Mesh : public Resource {
GDCLASS(Mesh, Resource);
mutable Ref<TriangleMesh> triangle_mesh; //cached
+ mutable Vector<Ref<TriangleMesh>> surface_triangle_meshes; //cached
mutable Vector<Vector3> debug_lines;
Size2i lightmap_size_hint;
@@ -161,7 +162,9 @@ public:
virtual AABB get_aabb() const;
Vector<Face3> get_faces() const;
+ Vector<Face3> get_surface_faces(int p_surface) const;
Ref<TriangleMesh> generate_triangle_mesh() const;
+ Ref<TriangleMesh> generate_surface_triangle_mesh(int p_surface) const;
void generate_debug_mesh_lines(Vector<Vector3> &r_lines);
void generate_debug_mesh_indices(Vector<Vector3> &r_points);
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index a808ead66b..ac5493efdc 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -30,6 +30,10 @@
#include "navigation_mesh.h"
+#ifdef DEBUG_ENABLED
+#include "servers/navigation_server_3d.h"
+#endif
+
void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) {
ERR_FAIL_COND(p_mesh.is_null());
@@ -337,6 +341,7 @@ void NavigationMesh::clear_polygons() {
polygons.clear();
}
+#ifndef DISABLE_DEPRECATED
Ref<Mesh> NavigationMesh::get_debug_mesh() {
if (debug_mesh.is_valid()) {
return debug_mesh;
@@ -420,6 +425,102 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
return debug_mesh;
}
+#endif // DISABLE_DEPRECATED
+
+#ifdef DEBUG_ENABLED
+Ref<ArrayMesh> NavigationMesh::_get_debug_mesh() {
+ if (debug_mesh.is_valid()) {
+ // Blocks further updates for now, code below is intended for dynamic updates e.g. when settings change.
+ return debug_mesh;
+ }
+
+ if (!debug_mesh.is_valid()) {
+ debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ } else {
+ debug_mesh->clear_surfaces();
+ }
+
+ if (vertices.size() == 0) {
+ return debug_mesh;
+ }
+
+ int polygon_count = get_polygon_count();
+
+ if (polygon_count < 1) {
+ // no face, no play
+ return debug_mesh;
+ }
+
+ // build geometry face surface
+ Vector<Vector3> face_vertex_array;
+ face_vertex_array.resize(polygon_count * 3);
+
+ for (int i = 0; i < polygon_count; i++) {
+ Vector<int> polygon = get_polygon(i);
+
+ face_vertex_array.push_back(vertices[polygon[0]]);
+ face_vertex_array.push_back(vertices[polygon[1]]);
+ face_vertex_array.push_back(vertices[polygon[2]]);
+ }
+
+ Array face_mesh_array;
+ face_mesh_array.resize(Mesh::ARRAY_MAX);
+ face_mesh_array[Mesh::ARRAY_VERTEX] = face_vertex_array;
+
+ // if enabled add vertex colors to colorize each face individually
+ bool enabled_geometry_face_random_color = NavigationServer3D::get_singleton()->get_debug_navigation_enable_geometry_face_random_color();
+ if (enabled_geometry_face_random_color) {
+ Color debug_navigation_geometry_face_color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color();
+ Color polygon_color = debug_navigation_geometry_face_color;
+
+ Vector<Color> face_color_array;
+ face_color_array.resize(polygon_count * 3);
+
+ for (int i = 0; i < polygon_count; i++) {
+ polygon_color = debug_navigation_geometry_face_color * (Color(Math::randf(), Math::randf(), Math::randf()));
+
+ Vector<int> polygon = get_polygon(i);
+
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ face_color_array.push_back(polygon_color);
+ }
+ face_mesh_array[Mesh::ARRAY_COLOR] = face_color_array;
+ }
+
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, face_mesh_array);
+ Ref<StandardMaterial3D> debug_geometry_face_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_face_material();
+ debug_mesh->surface_set_material(debug_mesh->get_surface_count(), debug_geometry_face_material);
+
+ // if enabled build geometry edge line surface
+ bool enabled_edge_lines = NavigationServer3D::get_singleton()->get_debug_navigation_enable_edge_lines();
+
+ if (enabled_edge_lines) {
+ Vector<Vector3> line_vertex_array;
+ line_vertex_array.resize(polygon_count * 6);
+
+ for (int i = 0; i < polygon_count; i++) {
+ Vector<int> polygon = get_polygon(i);
+
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[1]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[2]]);
+ line_vertex_array.push_back(vertices[polygon[0]]);
+ }
+
+ Array line_mesh_array;
+ line_mesh_array.resize(Mesh::ARRAY_MAX);
+ line_mesh_array[Mesh::ARRAY_VERTEX] = line_vertex_array;
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, line_mesh_array);
+ Ref<StandardMaterial3D> debug_geometry_edge_material = NavigationServer3D::get_singleton_mut()->get_debug_navigation_geometry_edge_material();
+ debug_mesh->surface_set_material(debug_mesh->get_surface_count(), debug_geometry_edge_material);
+ }
+
+ return debug_mesh;
+}
+#endif
void NavigationMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_sample_partition_type", "sample_partition_type"), &NavigationMesh::set_sample_partition_type);
diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h
index 40b275c792..79d8962d24 100644
--- a/scene/resources/navigation_mesh.h
+++ b/scene/resources/navigation_mesh.h
@@ -204,7 +204,11 @@ public:
Vector<int> get_polygon(int p_idx);
void clear_polygons();
+#ifndef DISABLE_DEPRECATED
Ref<Mesh> get_debug_mesh();
+#endif // DISABLE_DEPRECATED
+
+ Ref<ArrayMesh> _get_debug_mesh();
NavigationMesh();
};
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 2c58aa83a9..ac67e6e5e9 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -434,10 +434,10 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
for (int j = 0; j < binds.size(); j++) {
argptrs[j] = &binds[j];
}
- callable = callable.bind(argptrs, binds.size());
+ callable = callable.bindp(argptrs, binds.size());
}
- cfrom->connect(snames[c.signal], callable, varray(), CONNECT_PERSIST | c.flags);
+ cfrom->connect(snames[c.signal], callable, CONNECT_PERSIST | c.flags);
}
//Node *s = ret_nodes[0];
@@ -892,9 +892,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMap<String
cd.signal = _nm_get_string(c.signal.get_name(), name_map);
cd.flags = c.flags;
cd.unbinds = unbinds;
- for (int i = 0; i < c.binds.size(); i++) { // TODO: This could be removed now.
- cd.binds.push_back(_vm_get_variant(c.binds[i], variant_map));
- }
+
for (int i = 0; i < binds.size(); i++) {
cd.binds.push_back(_vm_get_variant(binds[i], variant_map));
}
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 100e8ea7c6..2b1d91e4ef 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -2211,7 +2211,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
return OK;
}
-Error ResourceFormatSaverText::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverText::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
if (p_path.ends_with(".tscn") && !Ref<PackedScene>(p_resource).is_valid()) {
return ERR_FILE_UNRECOGNIZED;
}
diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h
index 69bb40502f..9154bcf795 100644
--- a/scene/resources/resource_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -194,7 +194,7 @@ public:
class ResourceFormatSaverText : public ResourceFormatSaver {
public:
static ResourceFormatSaverText *singleton;
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual bool recognize(const Ref<Resource> &p_resource) const;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
diff --git a/scene/resources/separation_ray_shape_2d.cpp b/scene/resources/separation_ray_shape_2d.cpp
index 0d6aee47d8..fea41061fd 100644
--- a/scene/resources/separation_ray_shape_2d.cpp
+++ b/scene/resources/separation_ray_shape_2d.cpp
@@ -57,7 +57,7 @@ void SeparationRayShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Transform2D xf;
xf.rotate(target_position.angle());
- xf.translate(Vector2(no_line ? 0 : target_position.length() - arrow_size, 0));
+ xf.translate_local(Vector2(no_line ? 0 : target_position.length() - arrow_size, 0));
Vector<Vector2> pts = {
xf.xform(Vector2(arrow_size, 0)),
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 74031e02d7..18fd6c8d25 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -251,7 +251,7 @@ String ResourceFormatLoaderShader::get_resource_type(const String &p_path) const
return "";
}
-Error ResourceFormatSaverShader::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverShader::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<Shader> shader = p_resource;
ERR_FAIL_COND_V(shader.is_null(), ERR_INVALID_PARAMETER);
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index 7aa14651a5..082b37d355 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -117,7 +117,7 @@ public:
class ResourceFormatSaverShader : public ResourceFormatSaver {
public:
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
virtual bool recognize(const Ref<Resource> &p_resource) const;
};
diff --git a/scene/resources/shader_include.cpp b/scene/resources/shader_include.cpp
index b819128af3..42435fe3c7 100644
--- a/scene/resources/shader_include.cpp
+++ b/scene/resources/shader_include.cpp
@@ -113,7 +113,7 @@ String ResourceFormatLoaderShaderInclude::get_resource_type(const String &p_path
// ResourceFormatSaverShaderInclude
-Error ResourceFormatSaverShaderInclude::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
+Error ResourceFormatSaverShaderInclude::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
Ref<ShaderInclude> shader_inc = p_resource;
ERR_FAIL_COND_V(shader_inc.is_null(), ERR_INVALID_PARAMETER);
diff --git a/scene/resources/shader_include.h b/scene/resources/shader_include.h
index 6f0deeef4e..b0865e3a61 100644
--- a/scene/resources/shader_include.h
+++ b/scene/resources/shader_include.h
@@ -63,7 +63,7 @@ public:
class ResourceFormatSaverShaderInclude : public ResourceFormatSaver {
public:
- virtual Error save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags = 0);
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
virtual bool recognize(const Ref<Resource> &p_resource) const;
};
diff --git a/scene/resources/skeleton_profile.cpp b/scene/resources/skeleton_profile.cpp
index 0714de470c..bfb4bb6e2b 100644
--- a/scene/resources/skeleton_profile.cpp
+++ b/scene/resources/skeleton_profile.cpp
@@ -123,12 +123,20 @@ bool SkeletonProfile::_get(const StringName &p_path, Variant &r_ret) const {
void SkeletonProfile::_validate_property(PropertyInfo &property) const {
if (is_read_only) {
- if (property.name == ("group_size") || property.name == ("bone_size")) {
+ if (property.name == ("group_size") || property.name == ("bone_size") || property.name == ("root_bone") || property.name == ("scale_base_bone")) {
property.usage = PROPERTY_USAGE_NO_EDITOR;
return;
}
}
+ if (property.name == ("root_bone") || property.name == ("scale_base_bone")) {
+ String hint = "";
+ for (int i = 0; i < bones.size(); i++) {
+ hint += i == 0 ? String(bones[i].bone_name) : "," + String(bones[i].bone_name);
+ }
+ property.hint_string = hint;
+ }
+
PackedStringArray split = property.name.split("/");
if (split.size() == 3 && split[0] == "bones") {
if (split[2] == "bone_tail" && get_tail_direction(split[1].to_int()) != TAIL_DIRECTION_SPECIFIC_CHILD) {
@@ -168,6 +176,28 @@ void SkeletonProfile::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
+StringName SkeletonProfile::get_root_bone() {
+ return root_bone;
+}
+
+void SkeletonProfile::set_root_bone(StringName p_bone_name) {
+ if (is_read_only) {
+ return;
+ }
+ root_bone = p_bone_name;
+}
+
+StringName SkeletonProfile::get_scale_base_bone() {
+ return scale_base_bone;
+}
+
+void SkeletonProfile::set_scale_base_bone(StringName p_bone_name) {
+ if (is_read_only) {
+ return;
+ }
+ scale_base_bone = p_bone_name;
+}
+
int SkeletonProfile::get_group_size() {
return groups.size();
}
@@ -361,6 +391,12 @@ bool SkeletonProfile::has_bone(StringName p_bone_name) {
}
void SkeletonProfile::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_root_bone", "bone_name"), &SkeletonProfile::set_root_bone);
+ ClassDB::bind_method(D_METHOD("get_root_bone"), &SkeletonProfile::get_root_bone);
+
+ ClassDB::bind_method(D_METHOD("set_scale_base_bone", "bone_name"), &SkeletonProfile::set_scale_base_bone);
+ ClassDB::bind_method(D_METHOD("get_scale_base_bone"), &SkeletonProfile::get_scale_base_bone);
+
ClassDB::bind_method(D_METHOD("set_group_size", "size"), &SkeletonProfile::set_group_size);
ClassDB::bind_method(D_METHOD("get_group_size"), &SkeletonProfile::get_group_size);
@@ -396,6 +432,9 @@ void SkeletonProfile::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_group", "bone_idx"), &SkeletonProfile::get_group);
ClassDB::bind_method(D_METHOD("set_group", "bone_idx", "group"), &SkeletonProfile::set_group);
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "root_bone", PROPERTY_HINT_ENUM_SUGGESTION, ""), "set_root_bone", "get_root_bone");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "scale_base_bone", PROPERTY_HINT_ENUM_SUGGESTION, ""), "set_scale_base_bone", "get_scale_base_bone");
+
ADD_PROPERTY(PropertyInfo(Variant::INT, "group_size", PROPERTY_HINT_RANGE, "0,100,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_ARRAY, "Groups,groups/"), "set_group_size", "get_group_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bone_size", PROPERTY_HINT_RANGE, "0,100,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_ARRAY, "Bones,bones/"), "set_bone_size", "get_bone_size");
@@ -415,6 +454,9 @@ SkeletonProfile::~SkeletonProfile() {
SkeletonProfileHumanoid::SkeletonProfileHumanoid() {
is_read_only = true;
+ root_bone = "Root";
+ scale_base_bone = "Hips";
+
groups.resize(4);
groups.write[0].group_name = "Body";
diff --git a/scene/resources/skeleton_profile.h b/scene/resources/skeleton_profile.h
index d305311538..84dfca458e 100644
--- a/scene/resources/skeleton_profile.h
+++ b/scene/resources/skeleton_profile.h
@@ -64,6 +64,9 @@ protected:
bool require = false;
};
+ StringName root_bone;
+ StringName scale_base_bone;
+
Vector<SkeletonProfileGroup> groups;
Vector<SkeletonProfileBone> bones;
@@ -74,6 +77,12 @@ protected:
static void _bind_methods();
public:
+ StringName get_root_bone();
+ void set_root_bone(StringName p_bone_name);
+
+ StringName get_scale_base_bone();
+ void set_scale_base_bone(StringName p_bone_name);
+
int get_group_size();
void set_group_size(int p_size);
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 0aefe34f7d..05ed9238b8 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -2009,7 +2009,7 @@ void CurveXYZTexture::set_curve_x(Ref<Curve> p_curve) {
}
_curve_x = p_curve;
if (_curve_x.is_valid()) {
- _curve_x->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), varray(), CONNECT_REFERENCE_COUNTED);
+ _curve_x->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), CONNECT_REFERENCE_COUNTED);
}
_update();
}
@@ -2022,7 +2022,7 @@ void CurveXYZTexture::set_curve_y(Ref<Curve> p_curve) {
}
_curve_y = p_curve;
if (_curve_y.is_valid()) {
- _curve_y->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), varray(), CONNECT_REFERENCE_COUNTED);
+ _curve_y->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), CONNECT_REFERENCE_COUNTED);
}
_update();
}
@@ -2035,7 +2035,7 @@ void CurveXYZTexture::set_curve_z(Ref<Curve> p_curve) {
}
_curve_z = p_curve;
if (_curve_z.is_valid()) {
- _curve_z->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), varray(), CONNECT_REFERENCE_COUNTED);
+ _curve_z->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CurveXYZTexture::_update), CONNECT_REFERENCE_COUNTED);
}
_update();
}
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 39b77568cf..3f6eec8497 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -295,7 +295,7 @@ void Theme::set_default_font(const Ref<Font> &p_default_font) {
default_font = p_default_font;
if (default_font.is_valid()) {
- default_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
+ default_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed).bind(false), CONNECT_REFERENCE_COUNTED);
}
_emit_theme_changed();
@@ -341,7 +341,7 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_theme_type, c
icon_map[p_theme_type][p_name] = p_icon;
if (p_icon.is_valid()) {
- icon_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
+ icon_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed).bind(false), CONNECT_REFERENCE_COUNTED);
}
_emit_theme_changed(!existing);
@@ -451,7 +451,7 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_theme_typ
style_map[p_theme_type][p_name] = p_style;
if (p_style.is_valid()) {
- style_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
+ style_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed).bind(false), CONNECT_REFERENCE_COUNTED);
}
_emit_theme_changed(!existing);
@@ -561,7 +561,7 @@ void Theme::set_font(const StringName &p_name, const StringName &p_theme_type, c
font_map[p_theme_type][p_name] = p_font;
if (p_font.is_valid()) {
- font_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
+ font_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed).bind(false), CONNECT_REFERENCE_COUNTED);
}
_emit_theme_changed(!existing);
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index a59870f4a9..b0b9f1228f 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -1048,13 +1048,13 @@ int TileSet::get_custom_data_layer_by_name(String p_value) const {
}
}
-void TileSet::set_custom_data_name(int p_layer_id, String p_value) {
+void TileSet::set_custom_data_layer_name(int p_layer_id, String p_value) {
ERR_FAIL_INDEX(p_layer_id, custom_data_layers.size());
// Exit if another property has the same name.
if (!p_value.is_empty()) {
for (int other_layer_id = 0; other_layer_id < get_custom_data_layers_count(); other_layer_id++) {
- if (other_layer_id != p_layer_id && get_custom_data_name(other_layer_id) == p_value) {
+ if (other_layer_id != p_layer_id && get_custom_data_layer_name(other_layer_id) == p_value) {
ERR_FAIL_MSG(vformat("There is already a custom property named %s", p_value));
}
}
@@ -1070,12 +1070,12 @@ void TileSet::set_custom_data_name(int p_layer_id, String p_value) {
emit_changed();
}
-String TileSet::get_custom_data_name(int p_layer_id) const {
+String TileSet::get_custom_data_layer_name(int p_layer_id) const {
ERR_FAIL_INDEX_V(p_layer_id, custom_data_layers.size(), "");
return custom_data_layers[p_layer_id].name;
}
-void TileSet::set_custom_data_type(int p_layer_id, Variant::Type p_value) {
+void TileSet::set_custom_data_layer_type(int p_layer_id, Variant::Type p_value) {
ERR_FAIL_INDEX(p_layer_id, custom_data_layers.size());
custom_data_layers.write[p_layer_id].type = p_value;
@@ -1086,7 +1086,7 @@ void TileSet::set_custom_data_type(int p_layer_id, Variant::Type p_value) {
emit_changed();
}
-Variant::Type TileSet::get_custom_data_type(int p_layer_id) const {
+Variant::Type TileSet::get_custom_data_layer_type(int p_layer_id) const {
ERR_FAIL_INDEX_V(p_layer_id, custom_data_layers.size(), Variant::NIL);
return custom_data_layers[p_layer_id].type;
}
@@ -3036,14 +3036,14 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
while (index >= custom_data_layers.size()) {
add_custom_data_layer();
}
- set_custom_data_name(index, p_value);
+ set_custom_data_layer_name(index, p_value);
return true;
} else if (components[1] == "type") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
while (index >= custom_data_layers.size()) {
add_custom_data_layer();
}
- set_custom_data_type(index, Variant::Type(int(p_value)));
+ set_custom_data_layer_type(index, Variant::Type(int(p_value)));
return true;
}
} else if (components.size() == 2 && components[0] == "sources" && components[1].is_valid_int()) {
@@ -3165,10 +3165,10 @@ bool TileSet::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
if (components[1] == "name") {
- r_ret = get_custom_data_name(index);
+ r_ret = get_custom_data_layer_name(index);
return true;
} else if (components[1] == "type") {
- r_ret = get_custom_data_type(index);
+ r_ret = get_custom_data_layer_type(index);
return true;
}
} else if (components.size() == 2 && components[0] == "sources" && components[1].is_valid_int()) {
@@ -3391,6 +3391,11 @@ void TileSet::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_custom_data_layer", "to_position"), &TileSet::add_custom_data_layer, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("move_custom_data_layer", "layer_index", "to_position"), &TileSet::move_custom_data_layer);
ClassDB::bind_method(D_METHOD("remove_custom_data_layer", "layer_index"), &TileSet::remove_custom_data_layer);
+ ClassDB::bind_method(D_METHOD("get_custom_data_layer_by_name", "layer_name"), &TileSet::get_custom_data_layer_by_name);
+ ClassDB::bind_method(D_METHOD("set_custom_data_layer_name", "layer_index", "layer_name"), &TileSet::set_custom_data_layer_name);
+ ClassDB::bind_method(D_METHOD("get_custom_data_layer_name", "layer_index"), &TileSet::get_custom_data_layer_name);
+ ClassDB::bind_method(D_METHOD("set_custom_data_layer_type", "layer_index", "layer_type"), &TileSet::set_custom_data_layer_type);
+ ClassDB::bind_method(D_METHOD("get_custom_data_layer_type", "layer_index"), &TileSet::get_custom_data_layer_type);
// Tile proxies
ClassDB::bind_method(D_METHOD("set_source_level_tile_proxy", "source_from", "source_to"), &TileSet::set_source_level_tile_proxy);
@@ -4847,14 +4852,14 @@ void TileData::notify_tile_data_properties_should_change() {
// Convert custom data to the new type.
custom_data.resize(tile_set->get_custom_data_layers_count());
for (int i = 0; i < custom_data.size(); i++) {
- if (custom_data[i].get_type() != tile_set->get_custom_data_type(i)) {
+ if (custom_data[i].get_type() != tile_set->get_custom_data_layer_type(i)) {
Variant new_val;
Callable::CallError error;
- if (Variant::can_convert(custom_data[i].get_type(), tile_set->get_custom_data_type(i))) {
+ if (Variant::can_convert(custom_data[i].get_type(), tile_set->get_custom_data_layer_type(i))) {
const Variant *args[] = { &custom_data[i] };
- Variant::construct(tile_set->get_custom_data_type(i), new_val, args, 1, error);
+ Variant::construct(tile_set->get_custom_data_layer_type(i), new_val, args, 1, error);
} else {
- Variant::construct(tile_set->get_custom_data_type(i), new_val, nullptr, 0, error);
+ Variant::construct(tile_set->get_custom_data_layer_type(i), new_val, nullptr, 0, error);
}
custom_data.write[i] = new_val;
}
@@ -5661,7 +5666,7 @@ void TileData::_get_property_list(List<PropertyInfo> *p_list) const {
Variant default_val;
Callable::CallError error;
Variant::construct(custom_data[i].get_type(), default_val, nullptr, 0, error);
- property_info = PropertyInfo(tile_set->get_custom_data_type(i), vformat("custom_data_%d", i), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
+ property_info = PropertyInfo(tile_set->get_custom_data_layer_type(i), vformat("custom_data_%d", i), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
if (custom_data[i] == default_val) {
property_info.usage ^= PROPERTY_USAGE_STORAGE;
}
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index bfd21190d8..6ea3889fce 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -479,10 +479,10 @@ public:
void move_custom_data_layer(int p_from_index, int p_to_pos);
void remove_custom_data_layer(int p_index);
int get_custom_data_layer_by_name(String p_value) const;
- void set_custom_data_name(int p_layer_id, String p_value);
- String get_custom_data_name(int p_layer_id) const;
- void set_custom_data_type(int p_layer_id, Variant::Type p_value);
- Variant::Type get_custom_data_type(int p_layer_id) const;
+ void set_custom_data_layer_name(int p_layer_id, String p_value);
+ String get_custom_data_layer_name(int p_layer_id) const;
+ void set_custom_data_layer_type(int p_layer_id, Variant::Type p_value);
+ Variant::Type get_custom_data_layer_type(int p_layer_id) const;
// Tiles proxies.
void set_source_level_tile_proxy(int p_source_from, int p_source_to);
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index b68cce9dda..5e0627a7d9 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -967,6 +967,12 @@ void VisualShader::connect_nodes_forced(Type p_type, int p_from_node, int p_from
ERR_FAIL_COND(!g->nodes.has(p_to_node));
ERR_FAIL_INDEX(p_to_port, g->nodes[p_to_node].node->get_input_port_count());
+ for (const Connection &E : g->connections) {
+ if (E.from_node == p_from_node && E.from_port == p_from_port && E.to_node == p_to_node && E.to_port == p_to_port) {
+ return;
+ }
+ }
+
Connection c;
c.from_node = p_from_node;
c.from_port = p_from_port;
@@ -3745,7 +3751,7 @@ String VisualShaderNodeUniform::get_warning(Shader::Mode p_mode, VisualShader::T
}
return vformat(RTR("This uniform type does not support the '%s' qualifier."), qualifier_str);
} else if (qualifier == Qualifier::QUAL_GLOBAL) {
- RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(uniform_name);
+ RS::GlobalShaderUniformType gvt = RS::get_singleton()->global_shader_uniform_get_type(uniform_name);
if (gvt == RS::GLOBAL_VAR_TYPE_MAX) {
return vformat(RTR("Global uniform '%s' does not exist.\nCreate it in the Project Settings."), uniform_name);
}
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp
index a6553e1431..fff6dbc32a 100644
--- a/servers/audio/effects/audio_effect_record.cpp
+++ b/servers/audio/effects/audio_effect_record.cpp
@@ -199,16 +199,16 @@ bool AudioEffectRecord::is_recording_active() const {
return recording_active;
}
-void AudioEffectRecord::set_format(AudioStreamSample::Format p_format) {
+void AudioEffectRecord::set_format(AudioStreamWAV::Format p_format) {
format = p_format;
}
-AudioStreamSample::Format AudioEffectRecord::get_format() const {
+AudioStreamWAV::Format AudioEffectRecord::get_format() const {
return format;
}
-Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
- AudioStreamSample::Format dst_format = format;
+Ref<AudioStreamWAV> AudioEffectRecord::get_recording() const {
+ AudioStreamWAV::Format dst_format = format;
bool stereo = true; //forcing mono is not implemented
Vector<uint8_t> dst_data;
@@ -216,7 +216,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
ERR_FAIL_COND_V(current_instance.is_null(), nullptr);
ERR_FAIL_COND_V(current_instance->recording_data.size() == 0, nullptr);
- if (dst_format == AudioStreamSample::FORMAT_8_BITS) {
+ if (dst_format == AudioStreamWAV::FORMAT_8_BITS) {
int data_size = current_instance->recording_data.size();
dst_data.resize(data_size);
uint8_t *w = dst_data.ptrw();
@@ -225,7 +225,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
int8_t v = CLAMP(current_instance->recording_data[i] * 128, -128, 127);
w[i] = v;
}
- } else if (dst_format == AudioStreamSample::FORMAT_16_BITS) {
+ } else if (dst_format == AudioStreamWAV::FORMAT_16_BITS) {
int data_size = current_instance->recording_data.size();
dst_data.resize(data_size * 2);
uint8_t *w = dst_data.ptrw();
@@ -234,7 +234,7 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
int16_t v = CLAMP(current_instance->recording_data[i] * 32768, -32768, 32767);
encode_uint16(v, &w[i * 2]);
}
- } else if (dst_format == AudioStreamSample::FORMAT_IMA_ADPCM) {
+ } else if (dst_format == AudioStreamWAV::FORMAT_IMA_ADPCM) {
//byte interleave
Vector<float> left;
Vector<float> right;
@@ -273,12 +273,12 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const {
ERR_PRINT("Format not implemented.");
}
- Ref<AudioStreamSample> sample;
+ Ref<AudioStreamWAV> sample;
sample.instantiate();
sample->set_data(dst_data);
sample->set_format(dst_format);
sample->set_mix_rate(AudioServer::get_singleton()->get_mix_rate());
- sample->set_loop_mode(AudioStreamSample::LOOP_DISABLED);
+ sample->set_loop_mode(AudioStreamWAV::LOOP_DISABLED);
sample->set_loop_begin(0);
sample->set_loop_end(0);
sample->set_stereo(stereo);
@@ -297,6 +297,6 @@ void AudioEffectRecord::_bind_methods() {
}
AudioEffectRecord::AudioEffectRecord() {
- format = AudioStreamSample::FORMAT_16_BITS;
+ format = AudioStreamWAV::FORMAT_16_BITS;
recording_active = false;
}
diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h
index b23b63dbd8..e89d8adbde 100644
--- a/servers/audio/effects/audio_effect_record.h
+++ b/servers/audio/effects/audio_effect_record.h
@@ -35,7 +35,7 @@
#include "core/io/marshalls.h"
#include "core/os/os.h"
#include "core/os/thread.h"
-#include "scene/resources/audio_stream_sample.h"
+#include "scene/resources/audio_stream_wav.h"
#include "servers/audio/audio_effect.h"
#include "servers/audio_server.h"
@@ -85,7 +85,7 @@ class AudioEffectRecord : public AudioEffect {
bool recording_active;
Ref<AudioEffectRecordInstance> current_instance;
- AudioStreamSample::Format format;
+ AudioStreamWAV::Format format;
void ensure_thread_stopped();
@@ -96,9 +96,9 @@ public:
Ref<AudioEffectInstance> instantiate() override;
void set_recording_active(bool p_record);
bool is_recording_active() const;
- void set_format(AudioStreamSample::Format p_format);
- AudioStreamSample::Format get_format() const;
- Ref<AudioStreamSample> get_recording() const;
+ void set_format(AudioStreamWAV::Format p_format);
+ AudioStreamWAV::Format get_format() const;
+ Ref<AudioStreamWAV> get_recording() const;
AudioEffectRecord();
};
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 1054073377..9052f8e05e 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -39,7 +39,7 @@
#include "core/os/os.h"
#include "core/string/string_name.h"
#include "core/templates/pair.h"
-#include "scene/resources/audio_stream_sample.h"
+#include "scene/resources/audio_stream_wav.h"
#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio/effects/audio_effect_compressor.h"
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 287a18ecde..5613267909 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -43,7 +43,7 @@
class AudioDriverDummy;
class AudioStream;
-class AudioStreamSample;
+class AudioStreamWAV;
class AudioStreamPlayback;
class AudioDriver {
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 59f88844e9..e9bc28873b 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -278,7 +278,7 @@ void DisplayServer::tts_post_utterance_event(TTSUtteranceEvent p_event, int p_id
Variant args[1];
args[0] = p_id;
const Variant *argp[] = { &args[0] };
- utterance_callback[p_event].call_deferred(argp, 1); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession.
+ utterance_callback[p_event].call_deferredp(argp, 1); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession.
}
} break;
case DisplayServer::TTS_UTTERANCE_BOUNDARY: {
@@ -287,7 +287,7 @@ void DisplayServer::tts_post_utterance_event(TTSUtteranceEvent p_event, int p_id
args[0] = p_pos;
args[1] = p_id;
const Variant *argp[] = { &args[0], &args[1] };
- utterance_callback[p_event].call_deferred(argp, 2); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession.
+ utterance_callback[p_event].call_deferredp(argp, 2); // Should be deferred, on some platforms utterance events can be called from different threads in a rapid succession.
}
} break;
default:
diff --git a/servers/movie_writer/movie_writer.cpp b/servers/movie_writer/movie_writer.cpp
index 93f9f8ea08..40b2b2539e 100644
--- a/servers/movie_writer/movie_writer.cpp
+++ b/servers/movie_writer/movie_writer.cpp
@@ -31,6 +31,7 @@
#include "movie_writer.h"
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
+#include "core/os/time.h"
#include "servers/display_server.h"
MovieWriter *MovieWriter::writers[MovieWriter::MAX_WRITERS];
@@ -183,4 +184,29 @@ void MovieWriter::add_frame(const Ref<Image> &p_image) {
void MovieWriter::end() {
write_end();
+
+ // Print a report with various statistics.
+ print_line("----------------");
+ String movie_path = Engine::get_singleton()->get_write_movie_path();
+ if (movie_path.is_relative_path()) {
+ // Print absolute path to make finding the file easier,
+ // and to make it clickable in terminal emulators that support this.
+ movie_path = ProjectSettings::get_singleton()->globalize_path("res://").plus_file(movie_path);
+ }
+ print_line(vformat("Done recording movie at path: %s", movie_path));
+
+ const int movie_time_seconds = Engine::get_singleton()->get_frames_drawn() / fps;
+ const String movie_time = vformat("%s:%s:%s",
+ String::num(movie_time_seconds / 3600).pad_zeros(2),
+ String::num((movie_time_seconds % 3600) / 60).pad_zeros(2),
+ String::num(movie_time_seconds % 60).pad_zeros(2));
+
+ const int real_time_seconds = Time::get_singleton()->get_ticks_msec() / 1000;
+ const String real_time = vformat("%s:%s:%s",
+ String::num(real_time_seconds / 3600).pad_zeros(2),
+ String::num((real_time_seconds % 3600) / 60).pad_zeros(2),
+ String::num(real_time_seconds % 60).pad_zeros(2));
+
+ print_line(vformat("%d frames at %d FPS (movie length: %s), recorded in %s (%d%% of real-time speed).", Engine::get_singleton()->get_frames_drawn(), fps, movie_time, real_time, (float(movie_time_seconds) / real_time_seconds) * 100));
+ print_line("----------------");
}
diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp
index 6c48c4a8de..52855c5931 100644
--- a/servers/navigation_server_3d.cpp
+++ b/servers/navigation_server_3d.cpp
@@ -30,6 +30,10 @@
#include "navigation_server_3d.h"
+#ifdef DEBUG_ENABLED
+#include "core/config/project_settings.h"
+#endif // DEBUG_ENABLED
+
NavigationServer3D *NavigationServer3D::singleton = nullptr;
void NavigationServer3D::_bind_methods() {
@@ -92,6 +96,8 @@ void NavigationServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("process", "delta_time"), &NavigationServer3D::process);
ADD_SIGNAL(MethodInfo("map_changed", PropertyInfo(Variant::RID, "map")));
+
+ ADD_SIGNAL(MethodInfo("navigation_debug_changed"));
}
const NavigationServer3D *NavigationServer3D::get_singleton() {
@@ -105,6 +111,19 @@ NavigationServer3D *NavigationServer3D::get_singleton_mut() {
NavigationServer3D::NavigationServer3D() {
ERR_FAIL_COND(singleton != nullptr);
singleton = this;
+
+#ifdef DEBUG_ENABLED
+ debug_navigation_edge_connection_color = GLOBAL_DEF("debug/shapes/navigation/edge_connection_color", Color(1.0, 0.0, 1.0, 1.0));
+ debug_navigation_geometry_edge_color = GLOBAL_DEF("debug/shapes/navigation/geometry_edge_color", Color(0.5, 1.0, 1.0, 1.0));
+ debug_navigation_geometry_face_color = GLOBAL_DEF("debug/shapes/navigation/geometry_face_color", Color(0.5, 1.0, 1.0, 0.4));
+ debug_navigation_geometry_edge_disabled_color = GLOBAL_DEF("debug/shapes/navigation/geometry_edge_disabled_color", Color(0.5, 0.5, 0.5, 1.0));
+ debug_navigation_geometry_face_disabled_color = GLOBAL_DEF("debug/shapes/navigation/geometry_face_disabled_color", Color(0.5, 0.5, 0.5, 0.4));
+ debug_navigation_enable_edge_connections = GLOBAL_DEF("debug/shapes/navigation/enable_edge_connections", true);
+ debug_navigation_enable_edge_connections_xray = GLOBAL_DEF("debug/shapes/navigation/enable_edge_connections_xray", true);
+ debug_navigation_enable_edge_lines = GLOBAL_DEF("debug/shapes/navigation/enable_edge_lines", true);
+ debug_navigation_enable_edge_lines_xray = GLOBAL_DEF("debug/shapes/navigation/enable_edge_lines_xray", true);
+ debug_navigation_enable_geometry_face_random_color = GLOBAL_DEF("debug/shapes/navigation/enable_geometry_face_random_color", true);
+#endif // DEBUG_ENABLED
}
NavigationServer3D::~NavigationServer3D() {
@@ -121,3 +140,241 @@ NavigationServer3D *NavigationServer3DManager::new_default_server() {
ERR_FAIL_COND_V(create_callback == nullptr, nullptr);
return create_callback();
}
+
+#ifdef DEBUG_ENABLED
+void NavigationServer3D::_emit_navigation_debug_changed_signal() {
+ if (debug_dirty) {
+ debug_dirty = false;
+ emit_signal(SNAME("navigation_debug_changed"));
+ }
+}
+#endif // DEBUG_ENABLED
+
+#ifdef DEBUG_ENABLED
+Ref<StandardMaterial3D> NavigationServer3D::get_debug_navigation_geometry_face_material() {
+ if (debug_navigation_geometry_face_material.is_valid()) {
+ return debug_navigation_geometry_face_material;
+ }
+
+ bool enabled_geometry_face_random_color = get_debug_navigation_enable_geometry_face_random_color();
+
+ Color debug_navigation_geometry_face_color = get_debug_navigation_geometry_face_color();
+
+ Ref<StandardMaterial3D> face_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
+ face_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ face_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
+ face_material->set_albedo(debug_navigation_geometry_face_color);
+ if (enabled_geometry_face_random_color) {
+ face_material->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
+ face_material->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ }
+
+ debug_navigation_geometry_face_material = face_material;
+
+ return debug_navigation_geometry_face_material;
+}
+
+Ref<StandardMaterial3D> NavigationServer3D::get_debug_navigation_geometry_edge_material() {
+ if (debug_navigation_geometry_edge_material.is_valid()) {
+ return debug_navigation_geometry_edge_material;
+ }
+
+ bool enabled_edge_lines_xray = get_debug_navigation_enable_edge_lines_xray();
+
+ Color debug_navigation_geometry_edge_color = get_debug_navigation_geometry_edge_color();
+
+ Ref<StandardMaterial3D> line_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
+ line_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ line_material->set_albedo(debug_navigation_geometry_edge_color);
+ if (enabled_edge_lines_xray) {
+ line_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true);
+ }
+
+ debug_navigation_geometry_edge_material = line_material;
+
+ return debug_navigation_geometry_edge_material;
+}
+
+Ref<StandardMaterial3D> NavigationServer3D::get_debug_navigation_geometry_face_disabled_material() {
+ if (debug_navigation_geometry_face_disabled_material.is_valid()) {
+ return debug_navigation_geometry_face_disabled_material;
+ }
+
+ Color debug_navigation_geometry_face_disabled_color = get_debug_navigation_geometry_face_disabled_color();
+
+ Ref<StandardMaterial3D> face_disabled_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
+ face_disabled_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ face_disabled_material->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
+ face_disabled_material->set_albedo(debug_navigation_geometry_face_disabled_color);
+
+ debug_navigation_geometry_face_disabled_material = face_disabled_material;
+
+ return debug_navigation_geometry_face_disabled_material;
+}
+
+Ref<StandardMaterial3D> NavigationServer3D::get_debug_navigation_geometry_edge_disabled_material() {
+ if (debug_navigation_geometry_edge_disabled_material.is_valid()) {
+ return debug_navigation_geometry_edge_disabled_material;
+ }
+
+ bool enabled_edge_lines_xray = get_debug_navigation_enable_edge_lines_xray();
+
+ Color debug_navigation_geometry_edge_disabled_color = get_debug_navigation_geometry_edge_disabled_color();
+
+ Ref<StandardMaterial3D> line_disabled_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
+ line_disabled_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ line_disabled_material->set_albedo(debug_navigation_geometry_edge_disabled_color);
+ if (enabled_edge_lines_xray) {
+ line_disabled_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true);
+ }
+
+ debug_navigation_geometry_edge_disabled_material = line_disabled_material;
+
+ return debug_navigation_geometry_edge_disabled_material;
+}
+
+Ref<StandardMaterial3D> NavigationServer3D::get_debug_navigation_edge_connections_material() {
+ if (debug_navigation_edge_connections_material.is_valid()) {
+ return debug_navigation_edge_connections_material;
+ }
+
+ bool enabled_edge_connections_xray = get_debug_navigation_enable_edge_connections_xray();
+
+ Color debug_navigation_edge_connection_color = get_debug_navigation_edge_connection_color();
+
+ Ref<StandardMaterial3D> edge_connections_material = Ref<StandardMaterial3D>(memnew(StandardMaterial3D));
+ edge_connections_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ edge_connections_material->set_albedo(debug_navigation_edge_connection_color);
+ if (enabled_edge_connections_xray) {
+ edge_connections_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, true);
+ }
+ edge_connections_material->set_render_priority(StandardMaterial3D::RENDER_PRIORITY_MAX - 2);
+
+ debug_navigation_edge_connections_material = edge_connections_material;
+
+ return debug_navigation_edge_connections_material;
+}
+
+void NavigationServer3D::set_debug_navigation_edge_connection_color(const Color &p_color) {
+ debug_navigation_edge_connection_color = p_color;
+ if (debug_navigation_edge_connections_material.is_valid()) {
+ debug_navigation_edge_connections_material->set_albedo(debug_navigation_edge_connection_color);
+ }
+}
+
+Color NavigationServer3D::get_debug_navigation_edge_connection_color() const {
+ return debug_navigation_edge_connection_color;
+}
+
+void NavigationServer3D::set_debug_navigation_geometry_edge_color(const Color &p_color) {
+ debug_navigation_geometry_edge_color = p_color;
+ if (debug_navigation_geometry_edge_material.is_valid()) {
+ debug_navigation_geometry_edge_material->set_albedo(debug_navigation_geometry_edge_color);
+ }
+}
+
+Color NavigationServer3D::get_debug_navigation_geometry_edge_color() const {
+ return debug_navigation_geometry_edge_color;
+}
+
+void NavigationServer3D::set_debug_navigation_geometry_face_color(const Color &p_color) {
+ debug_navigation_geometry_face_color = p_color;
+ if (debug_navigation_geometry_face_material.is_valid()) {
+ debug_navigation_geometry_face_material->set_albedo(debug_navigation_geometry_face_color);
+ }
+}
+
+Color NavigationServer3D::get_debug_navigation_geometry_face_color() const {
+ return debug_navigation_geometry_face_color;
+}
+
+void NavigationServer3D::set_debug_navigation_geometry_edge_disabled_color(const Color &p_color) {
+ debug_navigation_geometry_edge_disabled_color = p_color;
+ if (debug_navigation_geometry_edge_disabled_material.is_valid()) {
+ debug_navigation_geometry_edge_disabled_material->set_albedo(debug_navigation_geometry_edge_disabled_color);
+ }
+}
+
+Color NavigationServer3D::get_debug_navigation_geometry_edge_disabled_color() const {
+ return debug_navigation_geometry_edge_disabled_color;
+}
+
+void NavigationServer3D::set_debug_navigation_geometry_face_disabled_color(const Color &p_color) {
+ debug_navigation_geometry_face_disabled_color = p_color;
+ if (debug_navigation_geometry_face_disabled_material.is_valid()) {
+ debug_navigation_geometry_face_disabled_material->set_albedo(debug_navigation_geometry_face_disabled_color);
+ }
+}
+
+Color NavigationServer3D::get_debug_navigation_geometry_face_disabled_color() const {
+ return debug_navigation_geometry_face_disabled_color;
+}
+
+void NavigationServer3D::set_debug_navigation_enable_edge_connections(const bool p_value) {
+ debug_navigation_enable_edge_connections = p_value;
+ debug_dirty = true;
+ call_deferred("_emit_navigation_debug_changed_signal");
+}
+
+bool NavigationServer3D::get_debug_navigation_enable_edge_connections() const {
+ return debug_navigation_enable_edge_connections;
+}
+
+void NavigationServer3D::set_debug_navigation_enable_edge_connections_xray(const bool p_value) {
+ debug_navigation_enable_edge_connections_xray = p_value;
+ if (debug_navigation_edge_connections_material.is_valid()) {
+ debug_navigation_edge_connections_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, debug_navigation_enable_edge_connections_xray);
+ }
+}
+
+bool NavigationServer3D::get_debug_navigation_enable_edge_connections_xray() const {
+ return debug_navigation_enable_edge_connections_xray;
+}
+
+void NavigationServer3D::set_debug_navigation_enable_edge_lines(const bool p_value) {
+ debug_navigation_enable_edge_lines = p_value;
+ debug_dirty = true;
+ call_deferred("_emit_navigation_debug_changed_signal");
+}
+
+bool NavigationServer3D::get_debug_navigation_enable_edge_lines() const {
+ return debug_navigation_enable_edge_lines;
+}
+
+void NavigationServer3D::set_debug_navigation_enable_edge_lines_xray(const bool p_value) {
+ debug_navigation_enable_edge_lines_xray = p_value;
+ if (debug_navigation_geometry_edge_material.is_valid()) {
+ debug_navigation_geometry_edge_material->set_flag(StandardMaterial3D::FLAG_DISABLE_DEPTH_TEST, debug_navigation_enable_edge_lines_xray);
+ }
+}
+
+bool NavigationServer3D::get_debug_navigation_enable_edge_lines_xray() const {
+ return debug_navigation_enable_edge_lines_xray;
+}
+
+void NavigationServer3D::set_debug_navigation_enable_geometry_face_random_color(const bool p_value) {
+ debug_navigation_enable_geometry_face_random_color = p_value;
+ debug_dirty = true;
+ call_deferred("_emit_navigation_debug_changed_signal");
+}
+
+bool NavigationServer3D::get_debug_navigation_enable_geometry_face_random_color() const {
+ return debug_navigation_enable_geometry_face_random_color;
+}
+
+void NavigationServer3D::set_debug_enabled(bool p_enabled) {
+ if (debug_enabled != p_enabled) {
+ debug_dirty = true;
+ }
+
+ debug_enabled = p_enabled;
+
+ if (debug_dirty) {
+ call_deferred("_emit_navigation_debug_changed_signal");
+ }
+}
+
+bool NavigationServer3D::get_debug_enabled() const {
+ return debug_enabled;
+}
+#endif // DEBUG_ENABLED
diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h
index cf91596604..f24c0117d1 100644
--- a/servers/navigation_server_3d.h
+++ b/servers/navigation_server_3d.h
@@ -207,6 +207,68 @@ public:
NavigationServer3D();
virtual ~NavigationServer3D();
+
+#ifdef DEBUG_ENABLED
+ bool debug_enabled = false;
+ bool debug_dirty = true;
+ void _emit_navigation_debug_changed_signal();
+
+ void set_debug_enabled(bool p_enabled);
+ bool get_debug_enabled() const;
+
+ Color debug_navigation_edge_connection_color = Color(1.0, 0.0, 1.0, 1.0);
+ Color debug_navigation_geometry_edge_color = Color(0.5, 1.0, 1.0, 1.0);
+ Color debug_navigation_geometry_face_color = Color(0.5, 1.0, 1.0, 0.4);
+ Color debug_navigation_geometry_edge_disabled_color = Color(0.5, 0.5, 0.5, 1.0);
+ Color debug_navigation_geometry_face_disabled_color = Color(0.5, 0.5, 0.5, 0.4);
+ bool debug_navigation_enable_edge_connections = true;
+ bool debug_navigation_enable_edge_connections_xray = true;
+ bool debug_navigation_enable_edge_lines = true;
+ bool debug_navigation_enable_edge_lines_xray = true;
+ bool debug_navigation_enable_geometry_face_random_color = true;
+
+ Ref<StandardMaterial3D> debug_navigation_geometry_edge_material;
+ Ref<StandardMaterial3D> debug_navigation_geometry_face_material;
+ Ref<StandardMaterial3D> debug_navigation_geometry_edge_disabled_material;
+ Ref<StandardMaterial3D> debug_navigation_geometry_face_disabled_material;
+ Ref<StandardMaterial3D> debug_navigation_edge_connections_material;
+
+ void set_debug_navigation_edge_connection_color(const Color &p_color);
+ Color get_debug_navigation_edge_connection_color() const;
+
+ void set_debug_navigation_geometry_edge_color(const Color &p_color);
+ Color get_debug_navigation_geometry_edge_color() const;
+
+ void set_debug_navigation_geometry_face_color(const Color &p_color);
+ Color get_debug_navigation_geometry_face_color() const;
+
+ void set_debug_navigation_geometry_edge_disabled_color(const Color &p_color);
+ Color get_debug_navigation_geometry_edge_disabled_color() const;
+
+ void set_debug_navigation_geometry_face_disabled_color(const Color &p_color);
+ Color get_debug_navigation_geometry_face_disabled_color() const;
+
+ void set_debug_navigation_enable_edge_connections(const bool p_value);
+ bool get_debug_navigation_enable_edge_connections() const;
+
+ void set_debug_navigation_enable_edge_connections_xray(const bool p_value);
+ bool get_debug_navigation_enable_edge_connections_xray() const;
+
+ void set_debug_navigation_enable_edge_lines(const bool p_value);
+ bool get_debug_navigation_enable_edge_lines() const;
+
+ void set_debug_navigation_enable_edge_lines_xray(const bool p_value);
+ bool get_debug_navigation_enable_edge_lines_xray() const;
+
+ void set_debug_navigation_enable_geometry_face_random_color(const bool p_value);
+ bool get_debug_navigation_enable_geometry_face_random_color() const;
+
+ Ref<StandardMaterial3D> get_debug_navigation_geometry_face_material();
+ Ref<StandardMaterial3D> get_debug_navigation_geometry_edge_material();
+ Ref<StandardMaterial3D> get_debug_navigation_geometry_face_disabled_material();
+ Ref<StandardMaterial3D> get_debug_navigation_geometry_edge_disabled_material();
+ Ref<StandardMaterial3D> get_debug_navigation_edge_connections_material();
+#endif // DEBUG_ENABLED
};
typedef NavigationServer3D *(*NavigationServer3DCallback)();
diff --git a/servers/physics_2d/godot_area_2d.cpp b/servers/physics_2d/godot_area_2d.cpp
index 11208f2d5b..96c8dfc69e 100644
--- a/servers/physics_2d/godot_area_2d.cpp
+++ b/servers/physics_2d/godot_area_2d.cpp
@@ -247,7 +247,7 @@ void GodotArea2D::call_queries() {
Callable::CallError ce;
Variant ret;
- monitor_callback.call((const Variant **)resptr, 5, ret, ce);
+ monitor_callback.callp((const Variant **)resptr, 5, ret, ce);
}
} else {
monitored_bodies.clear();
@@ -285,7 +285,7 @@ void GodotArea2D::call_queries() {
Callable::CallError ce;
Variant ret;
- area_monitor_callback.call((const Variant **)resptr, 5, ret, ce);
+ area_monitor_callback.callp((const Variant **)resptr, 5, ret, ce);
}
} else {
monitored_areas.clear();
diff --git a/servers/physics_2d/godot_body_2d.cpp b/servers/physics_2d/godot_body_2d.cpp
index 6873504f70..268beb1a55 100644
--- a/servers/physics_2d/godot_body_2d.cpp
+++ b/servers/physics_2d/godot_body_2d.cpp
@@ -683,10 +683,10 @@ void GodotBody2D::call_queries() {
Callable::CallError ce;
Variant rv;
if (fi_callback_data->udata.get_type() != Variant::NIL) {
- fi_callback_data->callable.call(vp, 2, rv, ce);
+ fi_callback_data->callable.callp(vp, 2, rv, ce);
} else {
- fi_callback_data->callable.call(vp, 1, rv, ce);
+ fi_callback_data->callable.callp(vp, 1, rv, ce);
}
}
}
diff --git a/servers/physics_3d/godot_area_3d.cpp b/servers/physics_3d/godot_area_3d.cpp
index e2ad765d62..fdb9f42b40 100644
--- a/servers/physics_3d/godot_area_3d.cpp
+++ b/servers/physics_3d/godot_area_3d.cpp
@@ -276,7 +276,7 @@ void GodotArea3D::call_queries() {
Callable::CallError ce;
Variant ret;
- monitor_callback.call((const Variant **)resptr, 5, ret, ce);
+ monitor_callback.callp((const Variant **)resptr, 5, ret, ce);
}
} else {
monitored_bodies.clear();
@@ -314,7 +314,7 @@ void GodotArea3D::call_queries() {
Callable::CallError ce;
Variant ret;
- area_monitor_callback.call((const Variant **)resptr, 5, ret, ce);
+ area_monitor_callback.callp((const Variant **)resptr, 5, ret, ce);
}
} else {
monitored_areas.clear();
diff --git a/servers/physics_3d/godot_body_3d.cpp b/servers/physics_3d/godot_body_3d.cpp
index ad97533f44..4c89106839 100644
--- a/servers/physics_3d/godot_body_3d.cpp
+++ b/servers/physics_3d/godot_body_3d.cpp
@@ -766,7 +766,7 @@ void GodotBody3D::call_queries() {
Callable::CallError ce;
int argc = (fi_callback_data->udata.get_type() == Variant::NIL) ? 1 : 2;
Variant rv;
- fi_callback_data->callable.call(vp, argc, rv, ce);
+ fi_callback_data->callable.callp(vp, argc, rv, ce);
}
}
diff --git a/servers/rendering/dummy/rasterizer_scene_dummy.h b/servers/rendering/dummy/rasterizer_scene_dummy.h
index b803dd6f96..be98770b90 100644
--- a/servers/rendering/dummy/rasterizer_scene_dummy.h
+++ b/servers/rendering/dummy/rasterizer_scene_dummy.h
@@ -35,33 +35,10 @@
class RasterizerSceneDummy : public RendererSceneRender {
public:
- GeometryInstance *geometry_instance_create(RID p_base) override { return nullptr; }
- void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) override {}
- void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) override {}
- void geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_override) override {}
- void geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_material) override {}
- void geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) override {}
- void geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) override {}
- void geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) override {}
- void geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) override {}
- void geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) override {}
- void geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) override {}
- void geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override {}
- void geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) override {}
- void geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) override {}
- void geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) override {}
- void geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override {}
- void geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) override {}
- void geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) override {}
+ RenderGeometryInstance *geometry_instance_create(RID p_base) override { return nullptr; }
+ void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override {}
uint32_t geometry_instance_get_pair_mask() override { return 0; }
- void geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) override {}
- void geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override {}
- void geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) override {}
- void geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override {}
- void geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) override {}
-
- void geometry_instance_free(GeometryInstance *p_geometry_instance) override {}
/* SHADOW ATLAS API */
@@ -92,49 +69,24 @@ public:
/* ENVIRONMENT API */
- RID environment_allocate() override { return RID(); }
- void environment_initialize(RID p_rid) override {}
- void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) override {}
- void environment_set_sky(RID p_env, RID p_sky) override {}
- void environment_set_sky_custom_fov(RID p_env, float p_scale) override {}
- void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) override {}
- void environment_set_bg_color(RID p_env, const Color &p_color) override {}
- void environment_set_bg_energy(RID p_env, float p_energy) override {}
- void environment_set_canvas_max_layer(RID p_env, int p_max_layer) override {}
- void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG) override {}
-
- void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) override {}
void environment_glow_set_use_bicubic_upscale(bool p_enable) override {}
void environment_glow_set_use_high_quality(bool p_enable) override {}
- void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) override {}
void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override {}
- void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) override {}
+
void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {}
- void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) override {}
- void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {}
- void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {}
+ void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {}
void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override {}
void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override {}
void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) override {}
- void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) override {}
-
- void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) override {}
-
- void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) override {}
- void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) override {}
void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) override {}
void environment_set_volumetric_fog_filter_active(bool p_enable) override {}
Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) override { return Ref<Image>(); }
- bool is_environment(RID p_env) const override { return false; }
- RS::EnvironmentBG environment_get_background(RID p_env) const override { return RS::ENV_BG_KEEP; }
- int environment_get_canvas_max_layer(RID p_env) const override { return 0; }
-
RID camera_effects_allocate() override { return RID(); }
void camera_effects_initialize(RID p_rid) override {}
void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) override {}
@@ -179,20 +131,20 @@ public:
RID voxel_gi_instance_create(RID p_voxel_gi) override { return RID(); }
void voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform) override {}
bool voxel_gi_needs_update(RID p_probe) const override { return false; }
- void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects) override {}
+ void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) override {}
void voxel_gi_set_quality(RS::VoxelGIQuality) override {}
- void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_info = nullptr) override {}
- void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override {}
- void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) override {}
+ void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_info = nullptr) override {}
+ void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override {}
+ void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) override {}
void set_scene_pass(uint64_t p_pass) override {}
void set_time(double p_time, double p_step) override {}
void set_debug_draw_mode(RS::ViewportDebugDraw p_debug_draw) override {}
RID render_buffers_create() override { return RID(); }
- void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override {}
+ void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override {}
void gi_set_use_half_resolution(bool p_enable) override {}
void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) override {}
@@ -203,7 +155,14 @@ public:
TypedArray<Image> bake_render_uv2(RID p_base, const Vector<RID> &p_material_overrides, const Size2i &p_image_size) override { return TypedArray<Image>(); }
- bool free(RID p_rid) override { return false; }
+ bool free(RID p_rid) override {
+ if (is_environment(p_rid)) {
+ environment_free(p_rid);
+ return true;
+ } else {
+ return false;
+ }
+ }
void update() override {}
void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) override {}
diff --git a/servers/rendering/dummy/storage/material_storage.h b/servers/rendering/dummy/storage/material_storage.h
index 6721284b23..55c42330cf 100644
--- a/servers/rendering/dummy/storage/material_storage.h
+++ b/servers/rendering/dummy/storage/material_storage.h
@@ -38,23 +38,23 @@ namespace RendererDummy {
class MaterialStorage : public RendererMaterialStorage {
public:
- /* GLOBAL VARIABLE API */
+ /* GLOBAL SHADER UNIFORM API */
- virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) override {}
- virtual void global_variable_remove(const StringName &p_name) override {}
- virtual Vector<StringName> global_variable_get_list() const override { return Vector<StringName>(); }
+ virtual void global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) override {}
+ virtual void global_shader_uniform_remove(const StringName &p_name) override {}
+ virtual Vector<StringName> global_shader_uniform_get_list() const override { return Vector<StringName>(); }
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) override {}
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) override {}
- virtual Variant global_variable_get(const StringName &p_name) const override { return Variant(); }
- virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const override { return RS::GLOBAL_VAR_TYPE_MAX; }
+ virtual void global_shader_uniform_set(const StringName &p_name, const Variant &p_value) override {}
+ virtual void global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) override {}
+ virtual Variant global_shader_uniform_get(const StringName &p_name) const override { return Variant(); }
+ virtual RS::GlobalShaderUniformType global_shader_uniform_get_type(const StringName &p_name) const override { return RS::GLOBAL_VAR_TYPE_MAX; }
- virtual void global_variables_load_settings(bool p_load_textures = true) override {}
- virtual void global_variables_clear() override {}
+ virtual void global_shader_uniforms_load_settings(bool p_load_textures = true) override {}
+ virtual void global_shader_uniforms_clear() override {}
- virtual int32_t global_variables_instance_allocate(RID p_instance) override { return 0; }
- virtual void global_variables_instance_free(RID p_instance) override {}
- virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) override {}
+ virtual int32_t global_shader_uniforms_instance_allocate(RID p_instance) override { return 0; }
+ virtual void global_shader_uniforms_instance_free(RID p_instance) override {}
+ virtual void global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) override {}
/* SHADER API */
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index dea68ac61c..6da48fde9c 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -1906,11 +1906,11 @@ void RendererCanvasCull::update_visibility_notifiers() {
if (!visibility_notifier->enter_callable.is_null()) {
if (RSG::threaded) {
- visibility_notifier->enter_callable.call_deferred(nullptr, 0);
+ visibility_notifier->enter_callable.call_deferredp(nullptr, 0);
} else {
Callable::CallError ce;
Variant ret;
- visibility_notifier->enter_callable.call(nullptr, 0, ret, ce);
+ visibility_notifier->enter_callable.callp(nullptr, 0, ret, ce);
}
}
} else {
@@ -1919,11 +1919,11 @@ void RendererCanvasCull::update_visibility_notifiers() {
if (!visibility_notifier->exit_callable.is_null()) {
if (RSG::threaded) {
- visibility_notifier->exit_callable.call_deferred(nullptr, 0);
+ visibility_notifier->exit_callable.call_deferredp(nullptr, 0);
} else {
Callable::CallError ce;
Variant ret;
- visibility_notifier->exit_callable.call(nullptr, 0, ret, ce);
+ visibility_notifier->exit_callable.callp(nullptr, 0, ret, ce);
}
}
}
diff --git a/servers/rendering/renderer_compositor.cpp b/servers/rendering/renderer_compositor.cpp
index b331ec2c1d..80e71a0df3 100644
--- a/servers/rendering/renderer_compositor.cpp
+++ b/servers/rendering/renderer_compositor.cpp
@@ -33,6 +33,7 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
+#include "servers/xr_server.h"
RendererCompositor *(*RendererCompositor::_create_func)() = nullptr;
bool RendererCompositor::low_end = false;
@@ -46,7 +47,11 @@ bool RendererCompositor::is_xr_enabled() const {
}
RendererCompositor::RendererCompositor() {
- xr_enabled = GLOBAL_GET("xr/shaders/enabled");
+ if (XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT) {
+ xr_enabled = GLOBAL_GET("xr/shaders/enabled");
+ } else {
+ xr_enabled = XRServer::get_xr_mode() == XRServer::XRMODE_ON;
+ }
}
RendererCanvasRender *RendererCanvasRender::singleton = nullptr;
diff --git a/servers/rendering/renderer_geometry_instance.cpp b/servers/rendering/renderer_geometry_instance.cpp
new file mode 100644
index 0000000000..3a9bab022c
--- /dev/null
+++ b/servers/rendering/renderer_geometry_instance.cpp
@@ -0,0 +1,138 @@
+/*************************************************************************/
+/* renderer_geometry_instance.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 "servers/rendering/renderer_geometry_instance.h"
+
+void RenderGeometryInstanceBase::set_skeleton(RID p_skeleton) {
+ data->skeleton = p_skeleton;
+
+ _mark_dirty();
+ data->dirty_dependencies = true;
+}
+
+void RenderGeometryInstanceBase::set_material_override(RID p_override) {
+ data->material_override = p_override;
+
+ _mark_dirty();
+ data->dirty_dependencies = true;
+}
+
+void RenderGeometryInstanceBase::set_material_overlay(RID p_overlay) {
+ data->material_overlay = p_overlay;
+
+ _mark_dirty();
+ data->dirty_dependencies = true;
+}
+
+void RenderGeometryInstanceBase::set_surface_materials(const Vector<RID> &p_materials) {
+ data->surface_materials = p_materials;
+
+ _mark_dirty();
+ data->dirty_dependencies = true;
+}
+
+void RenderGeometryInstanceBase::set_mesh_instance(RID p_mesh_instance) {
+ mesh_instance = p_mesh_instance;
+
+ _mark_dirty();
+}
+
+void RenderGeometryInstanceBase::set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) {
+ transform = p_transform;
+ mirror = p_transform.basis.determinant() < 0;
+ data->aabb = p_aabb;
+ transformed_aabb = p_transformed_aabb;
+
+ Vector3 model_scale_vec = p_transform.basis.get_scale_abs();
+ // handle non uniform scale here
+
+ float max_scale = MAX(model_scale_vec.x, MAX(model_scale_vec.y, model_scale_vec.z));
+ float min_scale = MIN(model_scale_vec.x, MIN(model_scale_vec.y, model_scale_vec.z));
+ non_uniform_scale = max_scale >= 0.0 && (min_scale / max_scale) < 0.9;
+
+ lod_model_scale = max_scale;
+}
+
+void RenderGeometryInstanceBase::set_lod_bias(float p_lod_bias) {
+ lod_bias = p_lod_bias;
+}
+
+void RenderGeometryInstanceBase::set_layer_mask(uint32_t p_layer_mask) {
+ layer_mask = p_layer_mask;
+}
+
+void RenderGeometryInstanceBase::set_fade_range(bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) {
+ fade_near = p_enable_near;
+ fade_near_begin = p_near_begin;
+ fade_near_end = p_near_end;
+ fade_far = p_enable_far;
+ fade_far_begin = p_far_begin;
+ fade_far_end = p_far_end;
+}
+
+void RenderGeometryInstanceBase::set_parent_fade_alpha(float p_alpha) {
+ parent_fade_alpha = p_alpha;
+}
+
+void RenderGeometryInstanceBase::set_transparency(float p_transparency) {
+ force_alpha = CLAMP(1.0 - p_transparency, 0, 1);
+}
+
+void RenderGeometryInstanceBase::set_use_baked_light(bool p_enable) {
+ data->use_baked_light = p_enable;
+
+ _mark_dirty();
+}
+
+void RenderGeometryInstanceBase::set_use_dynamic_gi(bool p_enable) {
+ data->use_dynamic_gi = p_enable;
+
+ _mark_dirty();
+}
+
+void RenderGeometryInstanceBase::set_instance_shader_parameters_offset(int32_t p_offset) {
+ shader_parameters_offset = p_offset;
+
+ _mark_dirty();
+}
+
+void RenderGeometryInstanceBase::set_cast_double_sided_shadows(bool p_enable) {
+ data->cast_double_sided_shadows = p_enable;
+
+ _mark_dirty();
+}
+
+Transform3D RenderGeometryInstanceBase::get_transform() {
+ return transform;
+}
+
+AABB RenderGeometryInstanceBase::get_aabb() {
+ return data->aabb;
+}
diff --git a/servers/rendering/renderer_geometry_instance.h b/servers/rendering/renderer_geometry_instance.h
new file mode 100644
index 0000000000..279566d5c9
--- /dev/null
+++ b/servers/rendering/renderer_geometry_instance.h
@@ -0,0 +1,150 @@
+/*************************************************************************/
+/* renderer_geometry_instance.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 RENDERER_GEOMETRY_INSTANCE_H
+#define RENDERER_GEOMETRY_INSTANCE_H
+
+#include "core/math/rect2.h"
+#include "core/math/transform_3d.h"
+#include "core/math/vector3.h"
+#include "core/templates/rid.h"
+#include "storage/utilities.h"
+
+// API definition for our RenderGeometryInstance class so we can expose this through GDExternal in the near future
+class RenderGeometryInstance {
+public:
+ virtual ~RenderGeometryInstance() {}
+
+ virtual void _mark_dirty() = 0;
+
+ virtual void set_skeleton(RID p_skeleton) = 0;
+ virtual void set_material_override(RID p_override) = 0;
+ virtual void set_material_overlay(RID p_overlay) = 0;
+ virtual void set_surface_materials(const Vector<RID> &p_materials) = 0;
+ virtual void set_mesh_instance(RID p_mesh_instance) = 0;
+ virtual void set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) = 0;
+ virtual void set_lod_bias(float p_lod_bias) = 0;
+ virtual void set_layer_mask(uint32_t p_layer_mask) = 0;
+ virtual void set_fade_range(bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) = 0;
+ virtual void set_parent_fade_alpha(float p_alpha) = 0;
+ virtual void set_transparency(float p_transparency) = 0;
+ virtual void set_use_baked_light(bool p_enable) = 0;
+ virtual void set_use_dynamic_gi(bool p_enable) = 0;
+ virtual void set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) = 0;
+ virtual void set_lightmap_capture(const Color *p_sh9) = 0;
+ virtual void set_instance_shader_parameters_offset(int32_t p_offset) = 0;
+ virtual void set_cast_double_sided_shadows(bool p_enable) = 0;
+
+ virtual Transform3D get_transform() = 0;
+ virtual AABB get_aabb() = 0;
+
+ virtual void pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) = 0;
+ virtual void pair_reflection_probe_instances(const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) = 0;
+ virtual void pair_decal_instances(const RID *p_decal_instances, uint32_t p_decal_instance_count) = 0;
+ virtual void pair_voxel_gi_instances(const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) = 0;
+
+ virtual void set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) = 0;
+};
+
+// Base implementation of RenderGeometryInstance shared by internal renderers.
+class RenderGeometryInstanceBase : public RenderGeometryInstance {
+public:
+ // setup
+ uint32_t base_flags = 0;
+ uint32_t flags_cache = 0;
+
+ // used during rendering
+ float depth = 0;
+
+ RID mesh_instance;
+
+ Transform3D transform;
+ bool mirror = false; // move into data?
+ AABB transformed_aabb; //needed for LOD
+ bool non_uniform_scale = false;
+ float lod_model_scale = 1.0;
+ float lod_bias = 0.0;
+
+ uint32_t layer_mask = 1;
+
+ bool fade_near = false;
+ float fade_near_begin = 0;
+ float fade_near_end = 0;
+ bool fade_far = false;
+ float fade_far_begin = 0;
+ float fade_far_end = 0;
+
+ float parent_fade_alpha = 1.0;
+ float force_alpha = 1.0;
+
+ int32_t shader_parameters_offset = -1;
+
+ struct Data {
+ //data used less often goes into regular heap
+ RID base;
+ RS::InstanceType base_type;
+
+ RID skeleton;
+ Vector<RID> surface_materials;
+ RID material_override;
+ RID material_overlay;
+ AABB aabb;
+
+ bool use_baked_light = false;
+ bool use_dynamic_gi = false;
+ bool cast_double_sided_shadows = false;
+ bool dirty_dependencies = false;
+
+ DependencyTracker dependency_tracker;
+ };
+
+ Data *data = nullptr;
+
+ virtual void set_skeleton(RID p_skeleton) override;
+ virtual void set_material_override(RID p_override) override;
+ virtual void set_material_overlay(RID p_overlay) override;
+ virtual void set_surface_materials(const Vector<RID> &p_materials) override;
+ virtual void set_mesh_instance(RID p_mesh_instance) override;
+ virtual void set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) override;
+ virtual void set_lod_bias(float p_lod_bias) override;
+ virtual void set_layer_mask(uint32_t p_layer_mask) override;
+ virtual void set_fade_range(bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override;
+ virtual void set_parent_fade_alpha(float p_alpha) override;
+ virtual void set_transparency(float p_transparency) override;
+ virtual void set_use_baked_light(bool p_enable) override;
+ virtual void set_use_dynamic_gi(bool p_enable) override;
+ virtual void set_instance_shader_parameters_offset(int32_t p_offset) override;
+ virtual void set_cast_double_sided_shadows(bool p_enable) override;
+
+ virtual Transform3D get_transform() override;
+ virtual AABB get_aabb() override;
+};
+
+#endif // RENDERER_GEOMETRY_INSTANCE_H
diff --git a/servers/rendering/renderer_rd/environment/fog.cpp b/servers/rendering/renderer_rd/environment/fog.cpp
index 987c1dbb52..fba04c0db4 100644
--- a/servers/rendering/renderer_rd/environment/fog.cpp
+++ b/servers/rendering/renderer_rd/environment/fog.cpp
@@ -276,7 +276,7 @@ ALBEDO = vec3(1.0);
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
- u.append_id(RendererRD::MaterialStorage::get_singleton()->global_variables_get_storage_buffer());
+ u.append_id(RendererRD::MaterialStorage::get_singleton()->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
@@ -602,7 +602,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
Vector2 frustum_far_size = p_cam_projection.get_far_plane_half_extents();
float z_near = p_cam_projection.get_z_near();
float z_far = p_cam_projection.get_z_far();
- float fog_end = p_settings.env->volumetric_fog_length;
+ float fog_end = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_length(p_settings.env);
Vector2 fog_far_size = frustum_near_size.lerp(frustum_far_size, (fog_end - z_near) / (z_far - z_near));
Vector2 fog_near_size;
@@ -627,10 +627,10 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
params.fog_volume_size[1] = p_settings.vfog->height;
params.fog_volume_size[2] = p_settings.vfog->depth;
- params.use_temporal_reprojection = p_settings.env->volumetric_fog_temporal_reprojection;
+ params.use_temporal_reprojection = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection(p_settings.env);
params.temporal_frame = RSG::rasterizer->get_frame_number() % VolumetricFog::MAX_TEMPORAL_FRAMES;
- params.detail_spread = p_settings.env->volumetric_fog_detail_spread;
- params.temporal_blend = p_settings.env->volumetric_fog_temporal_reprojection_amount;
+ params.detail_spread = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_detail_spread(p_settings.env);
+ params.temporal_blend = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection_amount(p_settings.env);
Transform3D to_prev_cam_view = p_prev_cam_inv_transform * p_cam_transform;
RendererRD::MaterialStorage::store_transform(to_prev_cam_view, params.to_prev_view);
@@ -732,14 +732,15 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
// Local fog volume.
Vector3i points[8];
Vector3 fog_size = Vector3(p_settings.vfog->width, p_settings.vfog->height, p_settings.vfog->depth);
- points[0] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[1] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[2] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, -extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[3] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, -extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[4] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[5] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[6] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, -extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
- points[7] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, -extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, p_settings.env->volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ float volumetric_fog_detail_spread = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_detail_spread(p_settings.env);
+ points[0] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[1] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[2] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, -extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[3] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, -extents.y, extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[4] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[5] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[6] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(extents.x, -extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
+ points[7] = _point_get_position_in_froxel_volume(fog_volume_instance->transform.xform(Vector3(-extents.x, -extents.y, -extents.z)), fog_end, fog_near_size, fog_far_size, volumetric_fog_detail_spread, fog_size, p_cam_transform);
min = Vector3i(int32_t(p_settings.vfog->width) - 1, int32_t(p_settings.vfog->height) - 1, int32_t(p_settings.vfog->depth) - 1);
max = Vector3i(1, 1, 1);
@@ -785,7 +786,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
RD::get_singleton()->compute_list_dispatch_threads(compute_list, kernel_size.x, kernel_size.y, kernel_size.z);
}
- if (any_uses_time || p_settings.env->volumetric_fog_temporal_reprojection) {
+ if (any_uses_time || RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection(p_settings.env)) {
RenderingServerDefault::redraw_request();
}
@@ -986,7 +987,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 19;
RID radiance_texture = texture_storage->texture_rd_get_default(p_settings.is_using_radiance_cubemap_array ? RendererRD::DEFAULT_RD_TEXTURE_CUBEMAP_ARRAY_BLACK : RendererRD::DEFAULT_RD_TEXTURE_CUBEMAP_BLACK);
- RID sky_texture = p_settings.env->sky.is_valid() ? p_settings.sky->sky_get_radiance_texture_rd(p_settings.env->sky) : RID();
+ RID sky_texture = RendererSceneRenderRD::get_singleton()->environment_get_sky(p_settings.env).is_valid() ? p_settings.sky->sky_get_radiance_texture_rd(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_settings.env)) : RID();
u.append_id(sky_texture.is_valid() ? sky_texture : radiance_texture);
uniforms.push_back(u);
}
@@ -1008,7 +1009,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
p_settings.vfog->process_uniform_set_density = RD::get_singleton()->uniform_set_create(uniforms, volumetric_fog.process_shader.version_get_shader(volumetric_fog.process_shader_version, VolumetricFogShader::VOLUMETRIC_FOG_PROCESS_SHADER_DENSITY), 0);
}
- bool using_sdfgi = p_settings.env->volumetric_fog_gi_inject > 0.0001 && p_settings.env->sdfgi_enabled && (p_settings.sdfgi != nullptr);
+ bool using_sdfgi = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_gi_inject(p_settings.env) > 0.0001 && RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_enabled(p_settings.env) && (p_settings.sdfgi != nullptr);
if (using_sdfgi) {
if (p_settings.vfog->sdfgi_uniform_set.is_null() || !RD::get_singleton()->uniform_set_is_valid(p_settings.vfog->sdfgi_uniform_set)) {
@@ -1042,8 +1043,8 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
}
}
- p_settings.vfog->length = p_settings.env->volumetric_fog_length;
- p_settings.vfog->spread = p_settings.env->volumetric_fog_detail_spread;
+ p_settings.vfog->length = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_length(p_settings.env);
+ p_settings.vfog->spread = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_detail_spread(p_settings.env);
VolumetricFogShader::ParamsUBO params;
@@ -1051,7 +1052,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
Vector2 frustum_far_size = p_cam_projection.get_far_plane_half_extents();
float z_near = p_cam_projection.get_z_near();
float z_far = p_cam_projection.get_z_far();
- float fog_end = p_settings.env->volumetric_fog_length;
+ float fog_end = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_length(p_settings.env);
Vector2 fog_far_size = frustum_near_size.lerp(frustum_far_size, (fog_end - z_near) / (z_far - z_near));
Vector2 fog_near_size;
@@ -1067,16 +1068,16 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
params.fog_frustum_size_end[0] = fog_far_size.x;
params.fog_frustum_size_end[1] = fog_far_size.y;
- params.ambient_inject = p_settings.env->volumetric_fog_ambient_inject * p_settings.env->ambient_light_energy;
+ params.ambient_inject = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_ambient_inject(p_settings.env) * RendererSceneRenderRD::get_singleton()->environment_get_ambient_light_energy(p_settings.env);
params.z_far = z_far;
params.fog_frustum_end = fog_end;
- Color ambient_color = p_settings.env->ambient_light.srgb_to_linear();
+ Color ambient_color = RendererSceneRenderRD::get_singleton()->environment_get_ambient_light(p_settings.env).srgb_to_linear();
params.ambient_color[0] = ambient_color.r;
params.ambient_color[1] = ambient_color.g;
params.ambient_color[2] = ambient_color.b;
- params.sky_contribution = p_settings.env->ambient_sky_contribution;
+ params.sky_contribution = RendererSceneRenderRD::get_singleton()->environment_get_ambient_sky_contribution(p_settings.env);
params.fog_volume_size[0] = p_settings.vfog->width;
params.fog_volume_size[1] = p_settings.vfog->height;
@@ -1084,20 +1085,20 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
params.directional_light_count = p_directional_light_count;
- Color emission = p_settings.env->volumetric_fog_emission.srgb_to_linear();
- params.base_emission[0] = emission.r * p_settings.env->volumetric_fog_emission_energy;
- params.base_emission[1] = emission.g * p_settings.env->volumetric_fog_emission_energy;
- params.base_emission[2] = emission.b * p_settings.env->volumetric_fog_emission_energy;
- params.base_density = p_settings.env->volumetric_fog_density;
+ Color emission = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_emission(p_settings.env).srgb_to_linear();
+ params.base_emission[0] = emission.r * RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_emission_energy(p_settings.env);
+ params.base_emission[1] = emission.g * RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_emission_energy(p_settings.env);
+ params.base_emission[2] = emission.b * RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_emission_energy(p_settings.env);
+ params.base_density = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_density(p_settings.env);
- Color base_scattering = p_settings.env->volumetric_fog_scattering.srgb_to_linear();
+ Color base_scattering = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_scattering(p_settings.env).srgb_to_linear();
params.base_scattering[0] = base_scattering.r;
params.base_scattering[1] = base_scattering.g;
params.base_scattering[2] = base_scattering.b;
- params.phase_g = p_settings.env->volumetric_fog_anisotropy;
+ params.phase_g = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_anisotropy(p_settings.env);
- params.detail_spread = p_settings.env->volumetric_fog_detail_spread;
- params.gi_inject = p_settings.env->volumetric_fog_gi_inject;
+ params.detail_spread = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_detail_spread(p_settings.env);
+ params.gi_inject = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_gi_inject(p_settings.env);
params.cam_rotation[0] = p_cam_transform.basis[0][0];
params.cam_rotation[1] = p_cam_transform.basis[1][0];
@@ -1112,14 +1113,14 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
params.cam_rotation[10] = p_cam_transform.basis[2][2];
params.cam_rotation[11] = 0;
params.filter_axis = 0;
- params.max_voxel_gi_instances = p_settings.env->volumetric_fog_gi_inject > 0.001 ? p_voxel_gi_count : 0;
+ params.max_voxel_gi_instances = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_gi_inject(p_settings.env) > 0.001 ? p_voxel_gi_count : 0;
params.temporal_frame = RSG::rasterizer->get_frame_number() % VolumetricFog::MAX_TEMPORAL_FRAMES;
Transform3D to_prev_cam_view = p_prev_cam_inv_transform * p_cam_transform;
RendererRD::MaterialStorage::store_transform(to_prev_cam_view, params.to_prev_view);
- params.use_temporal_reprojection = p_settings.env->volumetric_fog_temporal_reprojection;
- params.temporal_blend = p_settings.env->volumetric_fog_temporal_reprojection_amount;
+ params.use_temporal_reprojection = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection(p_settings.env);
+ params.temporal_blend = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection_amount(p_settings.env);
{
uint32_t cluster_size = p_settings.cluster_builder->get_cluster_size();
@@ -1135,7 +1136,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
params.screen_size[1] = p_settings.rb_size.y;
}
- Basis sky_transform = p_settings.env->sky_orientation;
+ Basis sky_transform = RendererSceneRenderRD::get_singleton()->environment_get_sky_orientation(p_settings.env);
sky_transform = sky_transform.inverse() * p_cam_transform.basis;
RendererRD::MaterialStorage::store_transform_3x3(sky_transform, params.radiance_inverse_xform);
@@ -1157,7 +1158,7 @@ void Fog::volumetric_fog_update(const VolumetricFogSettings &p_settings, const P
RD::get_singleton()->compute_list_add_barrier(compute_list);
// Copy fog to history buffer
- if (p_settings.env->volumetric_fog_temporal_reprojection) {
+ if (RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_temporal_reprojection(p_settings.env)) {
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, volumetric_fog.process_pipelines[VolumetricFogShader::VOLUMETRIC_FOG_PROCESS_SHADER_COPY]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, p_settings.vfog->copy_uniform_set, 0);
RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_settings.vfog->width, p_settings.vfog->height, p_settings.vfog->depth);
diff --git a/servers/rendering/renderer_rd/environment/fog.h b/servers/rendering/renderer_rd/environment/fog.h
index 61a5d80d20..e777a1d383 100644
--- a/servers/rendering/renderer_rd/environment/fog.h
+++ b/servers/rendering/renderer_rd/environment/fog.h
@@ -36,7 +36,6 @@
#include "servers/rendering/environment/renderer_fog.h"
#include "servers/rendering/renderer_rd/cluster_builder_rd.h"
#include "servers/rendering/renderer_rd/environment/gi.h"
-#include "servers/rendering/renderer_rd/renderer_scene_environment_rd.h"
#include "servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl.gen.h"
#include "servers/rendering/storage/utilities.h"
@@ -318,7 +317,7 @@ public:
GI *gi;
GI::SDFGI *sdfgi;
GI::RenderBuffersGI *rbgi;
- RendererSceneEnvironmentRD *env;
+ RID env;
SkyRD *sky;
};
void volumetric_fog_update(const VolumetricFogSettings &p_settings, const Projection &p_cam_projection, const Transform3D &p_cam_transform, const Transform3D &p_prev_cam_inv_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_voxel_gi_count, const PagedArray<RID> &p_fog_volumes);
diff --git a/servers/rendering/renderer_rd/environment/gi.cpp b/servers/rendering/renderer_rd/environment/gi.cpp
index cb3de07c31..7b4f61bd17 100644
--- a/servers/rendering/renderer_rd/environment/gi.cpp
+++ b/servers/rendering/renderer_rd/environment/gi.cpp
@@ -374,15 +374,15 @@ RID GI::voxel_gi_get_sdf_texture(RID p_voxel_gi) {
////////////////////////////////////////////////////////////////////////////////
// SDFGI
-void GI::SDFGI::create(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, GI *p_gi) {
+void GI::SDFGI::create(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, GI *p_gi) {
RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton();
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
gi = p_gi;
- num_cascades = p_env->sdfgi_cascades;
- min_cell_size = p_env->sdfgi_min_cell_size;
- uses_occlusion = p_env->sdfgi_use_occlusion;
- y_scale_mode = p_env->sdfgi_y_scale;
+ num_cascades = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_cascades(p_env);
+ min_cell_size = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_min_cell_size(p_env);
+ uses_occlusion = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_use_occlusion(p_env);
+ y_scale_mode = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_y_scale(p_env);
static const float y_scale[3] = { 2.0, 1.5, 1.0 };
y_mult = y_scale[y_scale_mode];
cascades.resize(num_cascades);
@@ -1101,11 +1101,11 @@ void GI::SDFGI::create(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world
cascades[i].integrate_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, gi->sdfgi_shader.integrate.version_get_shader(gi->sdfgi_shader.integrate_shader, 0), 0);
}
- bounce_feedback = p_env->sdfgi_bounce_feedback;
- energy = p_env->sdfgi_energy;
- normal_bias = p_env->sdfgi_normal_bias;
- probe_bias = p_env->sdfgi_probe_bias;
- reads_sky = p_env->sdfgi_read_sky_light;
+ bounce_feedback = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_bounce_feedback(p_env);
+ energy = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_energy(p_env);
+ normal_bias = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_normal_bias(p_env);
+ probe_bias = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_probe_bias(p_env);
+ reads_sky = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_read_sky_light(p_env);
}
void GI::SDFGI::erase() {
@@ -1163,12 +1163,12 @@ void GI::SDFGI::erase() {
}
}
-void GI::SDFGI::update(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position) {
- bounce_feedback = p_env->sdfgi_bounce_feedback;
- energy = p_env->sdfgi_energy;
- normal_bias = p_env->sdfgi_normal_bias;
- probe_bias = p_env->sdfgi_probe_bias;
- reads_sky = p_env->sdfgi_read_sky_light;
+void GI::SDFGI::update(RID p_env, const Vector3 &p_world_position) {
+ bounce_feedback = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_bounce_feedback(p_env);
+ energy = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_energy(p_env);
+ normal_bias = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_normal_bias(p_env);
+ probe_bias = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_probe_bias(p_env);
+ reads_sky = RendererSceneRenderRD::get_singleton()->environment_get_sdfgi_read_sky_light(p_env);
int32_t drag_margin = (cascade_size / SDFGI::PROBE_DIVISOR) / 2;
@@ -1268,7 +1268,7 @@ void GI::SDFGI::update_light() {
RD::get_singleton()->draw_command_end_label();
}
-void GI::SDFGI::update_probes(RendererSceneEnvironmentRD *p_env, SkyRD::Sky *p_sky) {
+void GI::SDFGI::update_probes(RID p_env, SkyRD::Sky *p_sky) {
RD::get_singleton()->draw_command_begin_label("SDFGI Update Probes");
SDFGIShader::IntegratePushConstant push_constant;
@@ -1284,29 +1284,29 @@ void GI::SDFGI::update_probes(RendererSceneEnvironmentRD *p_env, SkyRD::Sky *p_s
push_constant.ray_bias = probe_bias;
push_constant.image_size[0] = probe_axis_count * probe_axis_count;
push_constant.image_size[1] = probe_axis_count;
- push_constant.store_ambient_texture = p_env->volumetric_fog_enabled;
+ push_constant.store_ambient_texture = RendererSceneRenderRD::get_singleton()->environment_get_volumetric_fog_enabled(p_env);
RID sky_uniform_set = gi->sdfgi_shader.integrate_default_sky_uniform_set;
push_constant.sky_mode = SDFGIShader::IntegratePushConstant::SKY_MODE_DISABLED;
push_constant.y_mult = y_mult;
- if (reads_sky && p_env) {
- push_constant.sky_energy = p_env->bg_energy;
+ if (reads_sky && p_env.is_valid()) {
+ push_constant.sky_energy = RendererSceneRenderRD::get_singleton()->environment_get_bg_energy(p_env);
- if (p_env->background == RS::ENV_BG_CLEAR_COLOR) {
+ if (RendererSceneRenderRD::get_singleton()->environment_get_background(p_env) == RS::ENV_BG_CLEAR_COLOR) {
push_constant.sky_mode = SDFGIShader::IntegratePushConstant::SKY_MODE_COLOR;
Color c = RSG::texture_storage->get_default_clear_color().srgb_to_linear();
push_constant.sky_color[0] = c.r;
push_constant.sky_color[1] = c.g;
push_constant.sky_color[2] = c.b;
- } else if (p_env->background == RS::ENV_BG_COLOR) {
+ } else if (RendererSceneRenderRD::get_singleton()->environment_get_background(p_env) == RS::ENV_BG_COLOR) {
push_constant.sky_mode = SDFGIShader::IntegratePushConstant::SKY_MODE_COLOR;
- Color c = p_env->bg_color;
+ Color c = RendererSceneRenderRD::get_singleton()->environment_get_bg_color(p_env);
push_constant.sky_color[0] = c.r;
push_constant.sky_color[1] = c.g;
push_constant.sky_color[2] = c.b;
- } else if (p_env->background == RS::ENV_BG_SKY) {
+ } else if (RendererSceneRenderRD::get_singleton()->environment_get_background(p_env) == RS::ENV_BG_SKY) {
if (p_sky && p_sky->radiance.is_valid()) {
if (integrate_sky_uniform_set.is_null() || !RD::get_singleton()->uniform_set_is_valid(integrate_sky_uniform_set)) {
Vector<RD::Uniform> uniforms;
@@ -1947,7 +1947,7 @@ void GI::SDFGI::pre_process_gi(const Transform3D &p_transform, RenderDataRD *p_r
}
}
-void GI::SDFGI::render_region(RID p_render_buffers, int p_region, const PagedArray<RendererSceneRender::GeometryInstance *> &p_instances, RendererSceneRenderRD *p_scene_render) {
+void GI::SDFGI::render_region(RID p_render_buffers, int p_region, const PagedArray<RenderGeometryInstance *> &p_instances, RendererSceneRenderRD *p_scene_render) {
//print_line("rendering region " + itos(p_region));
RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb); // we wouldn't be here if this failed but...
@@ -2428,7 +2428,7 @@ void GI::SDFGI::render_static_lights(RID p_render_buffers, uint32_t p_cascade_co
////////////////////////////////////////////////////////////////////////////////
// VoxelGIInstance
-void GI::VoxelGIInstance::update(bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render) {
+void GI::VoxelGIInstance::update(bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
uint32_t data_version = gi->voxel_gi_get_data_version(probe);
@@ -2951,10 +2951,10 @@ void GI::VoxelGIInstance::update(bool p_update_light_instances, const Vector<RID
//this could probably be better parallelized in compute..
for (int i = 0; i < (int)p_dynamic_objects.size(); i++) {
- RendererSceneRender::GeometryInstance *instance = p_dynamic_objects[i];
+ RenderGeometryInstance *instance = p_dynamic_objects[i];
//transform aabb to voxel_gi
- AABB aabb = (to_probe_xform * p_scene_render->geometry_instance_get_transform(instance)).xform(p_scene_render->geometry_instance_get_aabb(instance));
+ AABB aabb = (to_probe_xform * instance->get_transform()).xform(instance->get_aabb());
//this needs to wrap to grid resolution to avoid jitter
//also extend margin a bit just in case
@@ -3477,7 +3477,7 @@ void GI::free() {
}
}
-GI::SDFGI *GI::create_sdfgi(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size) {
+GI::SDFGI *GI::create_sdfgi(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size) {
SDFGI *sdfgi = memnew(SDFGI);
sdfgi->create(p_env, p_world_position, p_requested_history_size, this);
@@ -3960,7 +3960,7 @@ bool GI::voxel_gi_needs_update(RID p_probe) const {
return voxel_gi->last_probe_version != voxel_gi_get_version(voxel_gi->probe);
}
-void GI::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render) {
+void GI::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render) {
VoxelGIInstance *voxel_gi = get_probe_instance(p_probe);
ERR_FAIL_COND(!voxel_gi);
diff --git a/servers/rendering/renderer_rd/environment/gi.h b/servers/rendering/renderer_rd/environment/gi.h
index f4e32a8dd0..d4d4182950 100644
--- a/servers/rendering/renderer_rd/environment/gi.h
+++ b/servers/rendering/renderer_rd/environment/gi.h
@@ -36,7 +36,6 @@
#include "servers/rendering/environment/renderer_gi.h"
#include "servers/rendering/renderer_compositor.h"
#include "servers/rendering/renderer_rd/environment/sky.h"
-#include "servers/rendering/renderer_rd/renderer_scene_environment_rd.h"
#include "servers/rendering/renderer_rd/shaders/environment/gi.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/environment/sdfgi_debug.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/environment/sdfgi_debug_probes.glsl.gen.h"
@@ -79,9 +78,9 @@ public:
float energy = 1.0;
float bias = 1.4;
float normal_bias = 0.0;
- float propagation = 0.7;
+ float propagation = 0.5;
bool interior = false;
- bool use_two_bounces = false;
+ bool use_two_bounces = true;
uint32_t version = 1;
uint32_t data_version = 1;
@@ -471,7 +470,7 @@ public:
Transform3D transform;
- void update(bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render);
+ void update(bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render);
void debug(RD::DrawListID p_draw_list, RID p_framebuffer, const Projection &p_camera_with_transform, bool p_lighting, bool p_emission, float p_alpha);
};
@@ -614,11 +613,11 @@ public:
int32_t cascade_dynamic_light_count[SDFGI::MAX_CASCADES]; //used dynamically
RID integrate_sky_uniform_set;
- void create(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, GI *p_gi);
+ void create(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size, GI *p_gi);
void erase();
- void update(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position);
+ void update(RID p_env, const Vector3 &p_world_position);
void update_light();
- void update_probes(RendererSceneEnvironmentRD *p_env, RendererRD::SkyRD::Sky *p_sky);
+ void update_probes(RID p_env, RendererRD::SkyRD::Sky *p_sky);
void store_probes();
int get_pending_region_data(int p_region, Vector3i &r_local_offset, Vector3i &r_local_size, AABB &r_bounds) const;
void update_cascades();
@@ -627,7 +626,7 @@ public:
void debug_probes(RID p_framebuffer, const uint32_t p_view_count, const Projection *p_camera_with_transforms, bool p_will_continue_color, bool p_will_continue_depth);
void pre_process_gi(const Transform3D &p_transform, RenderDataRD *p_render_data, RendererSceneRenderRD *p_scene_render);
- void render_region(RID p_render_buffers, int p_region, const PagedArray<RendererSceneRender::GeometryInstance *> &p_instances, RendererSceneRenderRD *p_scene_render);
+ void render_region(RID p_render_buffers, int p_region, const PagedArray<RenderGeometryInstance *> &p_instances, RendererSceneRenderRD *p_scene_render);
void render_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result, RendererSceneRenderRD *p_scene_render);
};
@@ -772,7 +771,7 @@ public:
void init(RendererRD::SkyRD *p_sky);
void free();
- SDFGI *create_sdfgi(RendererSceneEnvironmentRD *p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size);
+ SDFGI *create_sdfgi(RID p_env, const Vector3 &p_world_position, uint32_t p_requested_history_size);
void setup_voxel_gi_instances(RID p_render_buffers, const Transform3D &p_transform, const PagedArray<RID> &p_voxel_gi_instances, uint32_t &r_voxel_gi_instances_used, RendererSceneRenderRD *p_scene_render);
void process_gi(RID p_render_buffers, const RID *p_normal_roughness_slices, RID p_voxel_gi_buffer, const RID *p_vrs_slices, RID p_environment, uint32_t p_view_count, const Projection *p_projections, const Vector3 *p_eye_offsets, const Transform3D &p_cam_transform, const PagedArray<RID> &p_voxel_gi_instances, RendererSceneRenderRD *p_scene_render);
@@ -780,7 +779,7 @@ public:
RID voxel_gi_instance_create(RID p_base);
void voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform);
bool voxel_gi_needs_update(RID p_probe) const;
- void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render);
+ void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects, RendererSceneRenderRD *p_scene_render);
void debug_voxel_gi(RID p_voxel_gi, RD::DrawListID p_draw_list, RID p_framebuffer, const Projection &p_camera_with_transform, bool p_lighting, bool p_emission, float p_alpha);
};
diff --git a/servers/rendering/renderer_rd/environment/sky.cpp b/servers/rendering/renderer_rd/environment/sky.cpp
index 6f32c15d95..228d2673f2 100644
--- a/servers/rendering/renderer_rd/environment/sky.cpp
+++ b/servers/rendering/renderer_rd/environment/sky.cpp
@@ -419,21 +419,22 @@ void SkyRD::ReflectionData::update_reflection_data(int p_size, int p_mipmaps, bo
radiance_base_cubemap = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), p_base_cube, p_base_layer, 0, 1, RD::TEXTURE_SLICE_CUBEMAP);
RD::get_singleton()->set_resource_name(radiance_base_cubemap, "radiance base cubemap");
+
RD::TextureFormat tf;
tf.format = p_texture_format;
- tf.width = 64; // Always 64x64
- tf.height = 64;
+ tf.width = p_low_quality ? 64 : p_size >> 1; // Always 64x64 when using REALTIME.
+ tf.height = p_low_quality ? 64 : p_size >> 1;
tf.texture_type = RD::TEXTURE_TYPE_CUBE;
tf.array_layers = 6;
- tf.mipmaps = 7;
+ tf.mipmaps = p_low_quality ? 7 : mipmaps - 1;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT;
downsampled_radiance_cubemap = RD::get_singleton()->texture_create(tf, RD::TextureView());
RD::get_singleton()->set_resource_name(downsampled_radiance_cubemap, "downsampled radiance cubemap");
{
- uint32_t mmw = 64;
- uint32_t mmh = 64;
- downsampled_layer.mipmaps.resize(7);
+ uint32_t mmw = tf.width;
+ uint32_t mmh = tf.height;
+ downsampled_layer.mipmaps.resize(tf.mipmaps);
for (int j = 0; j < downsampled_layer.mipmaps.size(); j++) {
ReflectionData::DownsampleLayer::Mipmap &mm = downsampled_layer.mipmaps.write[j];
mm.size.width = mmw;
@@ -911,7 +912,7 @@ void SkyRD::init() {
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
sky_shader.compiler.initialize(actions);
}
@@ -969,7 +970,7 @@ void sky() {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 1;
- u.append_id(RendererRD::MaterialStorage::get_singleton()->global_variables_get_storage_buffer());
+ u.append_id(RendererRD::MaterialStorage::get_singleton()->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
@@ -1105,20 +1106,20 @@ SkyRD::~SkyRD() {
RD::get_singleton()->free(index_buffer); //array gets freed as dependency
}
-void SkyRD::setup(RendererSceneEnvironmentRD *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size, RendererSceneRenderRD *p_scene_render) {
+void SkyRD::setup(RID p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size, RendererSceneRenderRD *p_scene_render) {
RendererRD::LightStorage *light_storage = RendererRD::LightStorage::get_singleton();
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
SkyMaterialData *material = nullptr;
- Sky *sky = get_sky(p_env->sky);
+ Sky *sky = get_sky(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
RID sky_material;
SkyShaderData *shader_data = nullptr;
if (sky) {
- sky_material = sky_get_material(p_env->sky);
+ sky_material = sky_get_material(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
if (sky_material.is_valid()) {
material = static_cast<SkyMaterialData *>(material_storage->material_get_data(sky_material, RendererRD::SHADER_TYPE_SKY));
@@ -1304,27 +1305,27 @@ void SkyRD::setup(RendererSceneEnvironmentRD *p_env, RID p_render_buffers, const
}
sky_scene_state.ubo.z_far = p_projection.get_z_far();
- sky_scene_state.ubo.fog_enabled = p_env->fog_enabled;
- sky_scene_state.ubo.fog_density = p_env->fog_density;
- sky_scene_state.ubo.fog_aerial_perspective = p_env->fog_aerial_perspective;
- Color fog_color = p_env->fog_light_color.srgb_to_linear();
- float fog_energy = p_env->fog_light_energy;
+ sky_scene_state.ubo.fog_enabled = RendererSceneRenderRD::get_singleton()->environment_get_fog_enabled(p_env);
+ sky_scene_state.ubo.fog_density = RendererSceneRenderRD::get_singleton()->environment_get_fog_density(p_env);
+ sky_scene_state.ubo.fog_aerial_perspective = RendererSceneRenderRD::get_singleton()->environment_get_fog_aerial_perspective(p_env);
+ Color fog_color = RendererSceneRenderRD::get_singleton()->environment_get_fog_light_color(p_env).srgb_to_linear();
+ float fog_energy = RendererSceneRenderRD::get_singleton()->environment_get_fog_light_energy(p_env);
sky_scene_state.ubo.fog_light_color[0] = fog_color.r * fog_energy;
sky_scene_state.ubo.fog_light_color[1] = fog_color.g * fog_energy;
sky_scene_state.ubo.fog_light_color[2] = fog_color.b * fog_energy;
- sky_scene_state.ubo.fog_sun_scatter = p_env->fog_sun_scatter;
+ sky_scene_state.ubo.fog_sun_scatter = RendererSceneRenderRD::get_singleton()->environment_get_fog_sun_scatter(p_env);
RD::get_singleton()->buffer_update(sky_scene_state.uniform_buffer, 0, sizeof(SkySceneState::UBO), &sky_scene_state.ubo);
}
-void SkyRD::update(RendererSceneEnvironmentRD *p_env, const Projection &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
+void SkyRD::update(RID p_env, const Projection &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
- Sky *sky = get_sky(p_env->sky);
+ Sky *sky = get_sky(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
ERR_FAIL_COND(!sky);
- RID sky_material = sky_get_material(p_env->sky);
+ RID sky_material = sky_get_material(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
SkyMaterialData *material = nullptr;
@@ -1346,7 +1347,7 @@ void SkyRD::update(RendererSceneEnvironmentRD *p_env, const Projection &p_projec
ERR_FAIL_COND(!shader_data);
- float multiplier = p_env->bg_energy;
+ float multiplier = RendererSceneRenderRD::get_singleton()->environment_get_bg_energy(p_env);
bool update_single_frame = sky->mode == RS::SKY_MODE_REALTIME || sky->mode == RS::SKY_MODE_QUALITY;
RS::SkyMode sky_mode = sky->mode;
@@ -1486,23 +1487,23 @@ void SkyRD::update(RendererSceneEnvironmentRD *p_env, const Projection &p_projec
}
}
-void SkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time) {
+void SkyRD::draw(RID p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
ERR_FAIL_COND(p_view_count == 0);
ERR_FAIL_COND(p_view_count > RendererSceneRender::MAX_RENDER_VIEWS);
- Sky *sky = get_sky(p_env->sky);
+ Sky *sky = get_sky(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
SkyMaterialData *material = nullptr;
RID sky_material;
- RS::EnvironmentBG background = p_env->background;
+ RS::EnvironmentBG background = RendererSceneRenderRD::get_singleton()->environment_get_background(p_env);
if (!(background == RS::ENV_BG_CLEAR_COLOR || background == RS::ENV_BG_COLOR) || sky) {
ERR_FAIL_COND(!sky);
- sky_material = sky_get_material(p_env->sky);
+ sky_material = sky_get_material(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
if (sky_material.is_valid()) {
material = static_cast<SkyMaterialData *>(material_storage->material_get_data(sky_material, RendererRD::SHADER_TYPE_SKY));
@@ -1528,11 +1529,11 @@ void SkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, b
ERR_FAIL_COND(!shader_data);
- Basis sky_transform = p_env->sky_orientation;
+ Basis sky_transform = RendererSceneRenderRD::get_singleton()->environment_get_sky_orientation(p_env);
sky_transform.invert();
- float multiplier = p_env->bg_energy;
- float custom_fov = p_env->sky_custom_fov;
+ float multiplier = RendererSceneRenderRD::get_singleton()->environment_get_bg_energy(p_env);
+ float custom_fov = RendererSceneRenderRD::get_singleton()->environment_get_sky_custom_fov(p_env);
// Camera
Projection camera;
@@ -1593,20 +1594,20 @@ void SkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, b
RD::get_singleton()->draw_list_end();
}
-void SkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
+void SkyRD::update_res_buffers(RID p_env, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
ERR_FAIL_COND(p_view_count == 0);
ERR_FAIL_COND(p_view_count > RendererSceneRender::MAX_RENDER_VIEWS);
- Sky *sky = get_sky(p_env->sky);
+ Sky *sky = get_sky(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
ERR_FAIL_COND(!sky);
SkyMaterialData *material = nullptr;
RID sky_material;
- sky_material = sky_get_material(p_env->sky);
+ sky_material = sky_get_material(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
if (sky_material.is_valid()) {
material = static_cast<SkyMaterialData *>(material_storage->material_get_data(sky_material, RendererRD::SHADER_TYPE_SKY));
@@ -1626,11 +1627,11 @@ void SkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_vie
ERR_FAIL_COND(!shader_data);
- Basis sky_transform = p_env->sky_orientation;
+ Basis sky_transform = RendererSceneRenderRD::get_singleton()->environment_get_sky_orientation(p_env);
sky_transform.invert();
- float multiplier = p_env->bg_energy;
- float custom_fov = p_env->sky_custom_fov;
+ float multiplier = RendererSceneRenderRD::get_singleton()->environment_get_bg_energy(p_env);
+ float custom_fov = RendererSceneRenderRD::get_singleton()->environment_get_sky_custom_fov(p_env);
// Camera
Projection camera;
@@ -1678,23 +1679,23 @@ void SkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_vie
}
}
-void SkyRD::draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
+void SkyRD::draw(RD::DrawListID p_draw_list, RID p_env, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
- ERR_FAIL_COND(!p_env);
+ ERR_FAIL_COND(p_env.is_null());
ERR_FAIL_COND(p_view_count == 0);
ERR_FAIL_COND(p_view_count > RendererSceneRender::MAX_RENDER_VIEWS);
- Sky *sky = get_sky(p_env->sky);
+ Sky *sky = get_sky(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
SkyMaterialData *material = nullptr;
RID sky_material;
- RS::EnvironmentBG background = p_env->background;
+ RS::EnvironmentBG background = RendererSceneRenderRD::get_singleton()->environment_get_background(p_env);
if (!(background == RS::ENV_BG_CLEAR_COLOR || background == RS::ENV_BG_COLOR) || sky) {
ERR_FAIL_COND(!sky);
- sky_material = sky_get_material(p_env->sky);
+ sky_material = sky_get_material(RendererSceneRenderRD::get_singleton()->environment_get_sky(p_env));
if (sky_material.is_valid()) {
material = static_cast<SkyMaterialData *>(material_storage->material_get_data(sky_material, RendererRD::SHADER_TYPE_SKY));
@@ -1720,11 +1721,11 @@ void SkyRD::draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env,
ERR_FAIL_COND(!shader_data);
- Basis sky_transform = p_env->sky_orientation;
+ Basis sky_transform = RendererSceneRenderRD::get_singleton()->environment_get_sky_orientation(p_env);
sky_transform.invert();
- float multiplier = p_env->bg_energy;
- float custom_fov = p_env->sky_custom_fov;
+ float multiplier = RendererSceneRenderRD::get_singleton()->environment_get_bg_energy(p_env);
+ float custom_fov = RendererSceneRenderRD::get_singleton()->environment_get_sky_custom_fov(p_env);
// Camera
Projection camera;
diff --git a/servers/rendering/renderer_rd/environment/sky.h b/servers/rendering/renderer_rd/environment/sky.h
index c3962f20b7..5402705918 100644
--- a/servers/rendering/renderer_rd/environment/sky.h
+++ b/servers/rendering/renderer_rd/environment/sky.h
@@ -34,7 +34,6 @@
#include "core/templates/rid_owner.h"
#include "servers/rendering/renderer_compositor.h"
#include "servers/rendering/renderer_rd/pipeline_cache_rd.h"
-#include "servers/rendering/renderer_rd/renderer_scene_environment_rd.h"
#include "servers/rendering/renderer_rd/shaders/environment/sky.glsl.gen.h"
#include "servers/rendering/renderer_rd/storage_rd/material_storage.h"
#include "servers/rendering/renderer_scene_render.h"
@@ -297,11 +296,11 @@ public:
void set_texture_format(RD::DataFormat p_texture_format);
~SkyRD();
- void setup(RendererSceneEnvironmentRD *p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size, RendererSceneRenderRD *p_scene_render);
- void update(RendererSceneEnvironmentRD *p_env, const Projection &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
- void draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time); // only called by clustered renderer
- void update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
- void draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
+ void setup(RID p_env, RID p_render_buffers, const PagedArray<RID> &p_lights, const Projection &p_projection, const Transform3D &p_transform, const Size2i p_screen_size, RendererSceneRenderRD *p_scene_render);
+ void update(RID p_env, const Projection &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
+ void draw(RID p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time); // only called by clustered renderer
+ void update_res_buffers(RID p_env, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
+ void draw(RD::DrawListID p_draw_list, RID p_env, RID p_fb, uint32_t p_view_count, const Projection *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
void invalidate_sky(Sky *p_sky);
void update_dirty_skys();
diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
index 4a55a04cd4..6f200220f0 100644
--- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
@@ -923,7 +923,7 @@ void RenderForwardClustered::_setup_environment(const RenderDataRD *p_render_dat
scene_state.ubo.use_ambient_cubemap = false;
} else {
float energy = environment_get_ambient_light_energy(p_render_data->environment);
- Color color = environment_get_ambient_light_color(p_render_data->environment);
+ Color color = environment_get_ambient_light(p_render_data->environment);
color = color.srgb_to_linear();
scene_state.ubo.ambient_light_color_energy[0] = color.r * energy;
scene_state.ubo.ambient_light_color_energy[1] = color.g * energy;
@@ -945,16 +945,16 @@ void RenderForwardClustered::_setup_environment(const RenderDataRD *p_render_dat
scene_state.ubo.use_reflection_cubemap = false;
}
- scene_state.ubo.ssao_ao_affect = environment_get_ssao_ao_affect(p_render_data->environment);
- scene_state.ubo.ssao_light_affect = environment_get_ssao_light_affect(p_render_data->environment);
+ scene_state.ubo.ssao_ao_affect = environment_get_ssao_ao_channel_affect(p_render_data->environment);
+ scene_state.ubo.ssao_light_affect = environment_get_ssao_direct_light_affect(p_render_data->environment);
uint32_t ss_flags = 0;
if (p_opaque_render_buffers) {
- ss_flags |= environment_is_ssao_enabled(p_render_data->environment) ? 1 : 0;
- ss_flags |= environment_is_ssil_enabled(p_render_data->environment) ? 2 : 0;
+ ss_flags |= environment_get_ssao_enabled(p_render_data->environment) ? 1 : 0;
+ ss_flags |= environment_get_ssil_enabled(p_render_data->environment) ? 2 : 0;
}
scene_state.ubo.ss_effects_flags = ss_flags;
- scene_state.ubo.fog_enabled = environment_is_fog_enabled(p_render_data->environment);
+ scene_state.ubo.fog_enabled = environment_get_fog_enabled(p_render_data->environment);
scene_state.ubo.fog_density = environment_get_fog_density(p_render_data->environment);
scene_state.ubo.fog_height = environment_get_fog_height(p_render_data->environment);
scene_state.ubo.fog_height_density = environment_get_fog_height_density(p_render_data->environment);
@@ -1410,7 +1410,6 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
if (p_render_data->render_buffers.is_valid()) {
render_buffer = static_cast<RenderBufferDataForwardClustered *>(render_buffers_get_data(p_render_data->render_buffers));
}
- RendererSceneEnvironmentRD *env = get_environment(p_render_data->environment);
static const int texture_multisamples[RS::VIEWPORT_MSAA_MAX] = { 1, 2, 4, 8 };
//first of all, make a new render pass
@@ -1435,7 +1434,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
bool using_sdfgi = false;
bool using_voxelgi = false;
bool reverse_cull = false;
- bool using_ssil = p_render_data->environment.is_valid() && environment_is_ssil_enabled(p_render_data->environment);
+ bool using_ssil = p_render_data->environment.is_valid() && environment_get_ssil_enabled(p_render_data->environment);
if (render_buffer) {
screen_size.x = render_buffer->width;
@@ -1449,21 +1448,21 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
using_voxelgi = true;
}
- if (!p_render_data->environment.is_valid() && using_voxelgi) {
+ if (p_render_data->environment.is_null() && using_voxelgi) {
depth_pass_mode = PASS_MODE_DEPTH_NORMAL_ROUGHNESS_VOXEL_GI;
- } else if (p_render_data->environment.is_valid() && (environment_is_ssr_enabled(p_render_data->environment) || environment_is_sdfgi_enabled(p_render_data->environment) || using_voxelgi)) {
- if (environment_is_sdfgi_enabled(p_render_data->environment)) {
+ } else if (p_render_data->environment.is_valid() && (environment_get_ssr_enabled(p_render_data->environment) || environment_get_sdfgi_enabled(p_render_data->environment) || using_voxelgi)) {
+ if (environment_get_sdfgi_enabled(p_render_data->environment)) {
depth_pass_mode = using_voxelgi ? PASS_MODE_DEPTH_NORMAL_ROUGHNESS_VOXEL_GI : PASS_MODE_DEPTH_NORMAL_ROUGHNESS; // also voxelgi
using_sdfgi = true;
} else {
depth_pass_mode = using_voxelgi ? PASS_MODE_DEPTH_NORMAL_ROUGHNESS_VOXEL_GI : PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
}
- if (environment_is_ssr_enabled(p_render_data->environment)) {
+ if (environment_get_ssr_enabled(p_render_data->environment)) {
using_separate_specular = true;
using_ssr = true;
color_pass_flags |= COLOR_PASS_FLAG_SEPARATE_SPECULAR;
}
- } else if (p_render_data->environment.is_valid() && (environment_is_ssao_enabled(p_render_data->environment) || using_ssil || get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER)) {
+ } else if (p_render_data->environment.is_valid() && (environment_get_ssao_enabled(p_render_data->environment) || using_ssil || get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER)) {
depth_pass_mode = PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
}
@@ -1504,7 +1503,6 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
if (RendererRD::LightStorage::get_singleton()->reflection_probe_is_interior(reflection_probe_instance_get_probe(p_render_data->reflection_probe))) {
p_render_data->environment = RID(); //no environment on interiors
- env = nullptr;
}
reverse_cull = true; // for some reason our views are inverted
@@ -1556,7 +1554,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
clear_color.r *= bg_energy;
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
- if ((p_render_data->render_buffers.is_valid() && render_buffers_has_volumetric_fog(p_render_data->render_buffers)) || environment_is_fog_enabled(p_render_data->environment)) {
+ if ((p_render_data->render_buffers.is_valid() && render_buffers_has_volumetric_fog(p_render_data->render_buffers)) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true;
RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
}
@@ -1566,7 +1564,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
clear_color.r *= bg_energy;
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
- if ((p_render_data->render_buffers.is_valid() && render_buffers_has_volumetric_fog(p_render_data->render_buffers)) || environment_is_fog_enabled(p_render_data->environment)) {
+ if ((p_render_data->render_buffers.is_valid() && render_buffers_has_volumetric_fog(p_render_data->render_buffers)) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true;
RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
}
@@ -1596,11 +1594,11 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
projection = correction * p_render_data->cam_projection;
}
- sky.setup(env, p_render_data->render_buffers, *p_render_data->lights, projection, p_render_data->cam_transform, screen_size, this);
+ sky.setup(p_render_data->environment, p_render_data->render_buffers, *p_render_data->lights, projection, p_render_data->cam_transform, screen_size, this);
- RID sky_rid = env->sky;
+ RID sky_rid = environment_get_sky(p_render_data->environment);
if (sky_rid.is_valid()) {
- sky.update(env, projection, p_render_data->cam_transform, time);
+ sky.update(p_render_data->environment, projection, p_render_data->cam_transform, time);
radiance_texture = sky.sky_get_radiance_texture_rd(sky_rid);
} else {
// do not try to draw sky if invalid
@@ -1616,7 +1614,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
bool debug_sdfgi_probes = get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_SDFGI_PROBES;
bool depth_pre_pass = bool(GLOBAL_GET("rendering/driver/depth_prepass/enable")) && depth_framebuffer.is_valid();
- bool using_ssao = depth_pre_pass && p_render_data->render_buffers.is_valid() && p_render_data->environment.is_valid() && environment_is_ssao_enabled(p_render_data->environment);
+ bool using_ssao = depth_pre_pass && p_render_data->render_buffers.is_valid() && p_render_data->environment.is_valid() && environment_get_ssao_enabled(p_render_data->environment);
bool continue_depth = false;
if (depth_pre_pass) { //depth pre pass
@@ -1755,9 +1753,9 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
Projection correction;
correction.set_depth_correction(true);
Projection projection = correction * p_render_data->cam_projection;
- sky.draw(env, can_continue_color, can_continue_depth, color_only_framebuffer, 1, &projection, p_render_data->cam_transform, time);
+ sky.draw(p_render_data->environment, can_continue_color, can_continue_depth, color_only_framebuffer, 1, &projection, p_render_data->cam_transform, time);
} else {
- sky.draw(env, can_continue_color, can_continue_depth, color_only_framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time);
+ sky.draw(p_render_data->environment, can_continue_color, can_continue_depth, color_only_framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time);
}
RD::get_singleton()->draw_command_end_label();
}
@@ -1873,7 +1871,7 @@ void RenderForwardClustered::_render_shadow_begin() {
scene_state.instance_data[RENDER_LIST_SECONDARY].clear();
}
-void RenderForwardClustered::_render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end, RendererScene::RenderInfo *p_render_info) {
+void RenderForwardClustered::_render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end, RendererScene::RenderInfo *p_render_info) {
uint32_t shadow_pass_index = scene_state.shadow_passes.size();
SceneState::ShadowPass shadow_pass;
@@ -1963,7 +1961,7 @@ void RenderForwardClustered::_render_shadow_end(uint32_t p_barrier) {
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardClustered::_render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) {
+void RenderForwardClustered::_render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<RenderGeometryInstance *> &p_instances) {
RENDER_TIMESTAMP("Setup GPUParticlesCollisionHeightField3D");
RD::get_singleton()->draw_command_begin_label("Render Collider Heightfield");
@@ -2002,7 +2000,7 @@ void RenderForwardClustered::_render_particle_collider_heightfield(RID p_fb, con
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardClustered::_render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RenderForwardClustered::_render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering 3D Material");
RD::get_singleton()->draw_command_begin_label("Render 3D Material");
@@ -2051,7 +2049,7 @@ void RenderForwardClustered::_render_material(const Transform3D &p_cam_transform
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardClustered::_render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RenderForwardClustered::_render_uv2(const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering UV2");
RD::get_singleton()->draw_command_begin_label("Render UV2");
@@ -2121,7 +2119,7 @@ void RenderForwardClustered::_render_uv2(const PagedArray<GeometryInstance *> &p
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardClustered::_render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) {
+void RenderForwardClustered::_render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<RenderGeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) {
RENDER_TIMESTAMP("Render SDFGI");
RD::get_singleton()->draw_command_begin_label("Render SDFGI Voxel");
@@ -2383,7 +2381,7 @@ void RenderForwardClustered::_update_render_base_uniform_set() {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 14;
- u.append_id(RendererRD::MaterialStorage::get_singleton()->global_variables_get_storage_buffer());
+ u.append_id(RendererRD::MaterialStorage::get_singleton()->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
@@ -2792,24 +2790,23 @@ RID RenderForwardClustered::_render_buffers_get_velocity_texture(RID p_render_bu
RenderForwardClustered *RenderForwardClustered::singleton = nullptr;
-void RenderForwardClustered::_geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- if (ginstance->dirty_list_element.in_list()) {
+void RenderForwardClustered::GeometryInstanceForwardClustered::_mark_dirty() {
+ if (dirty_list_element.in_list()) {
return;
}
//clear surface caches
- GeometryInstanceSurfaceDataCache *surf = ginstance->surface_caches;
+ GeometryInstanceSurfaceDataCache *surf = surface_caches;
while (surf) {
GeometryInstanceSurfaceDataCache *next = surf->next;
- geometry_instance_surface_alloc.free(surf);
+ RenderForwardClustered::get_singleton()->geometry_instance_surface_alloc.free(surf);
surf = next;
}
- ginstance->surface_caches = nullptr;
+ surface_caches = nullptr;
- geometry_instance_dirty_list.add(&ginstance->dirty_list_element);
+ RenderForwardClustered::get_singleton()->geometry_instance_dirty_list.add(&dirty_list_element);
}
void RenderForwardClustered::_geometry_instance_add_surface_with_material(GeometryInstanceForwardClustered *ginstance, uint32_t p_surface, SceneShaderForwardClustered::MaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh) {
@@ -2977,7 +2974,7 @@ void RenderForwardClustered::_geometry_instance_add_surface(GeometryInstanceForw
}
}
-void RenderForwardClustered::_geometry_instance_update(GeometryInstance *p_geometry_instance) {
+void RenderForwardClustered::_geometry_instance_update(RenderGeometryInstance *p_geometry_instance) {
RendererRD::MeshStorage *mesh_storage = RendererRD::MeshStorage::get_singleton();
RendererRD::ParticlesStorage *particles_storage = RendererRD::ParticlesStorage::get_singleton();
GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
@@ -3136,7 +3133,7 @@ void RenderForwardClustered::_geometry_instance_dependency_changed(Dependency::D
case Dependency::DEPENDENCY_CHANGED_PARTICLES:
case Dependency::DEPENDENCY_CHANGED_MULTIMESH:
case Dependency::DEPENDENCY_CHANGED_SKELETON_DATA: {
- static_cast<RenderForwardClustered *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
} break;
case Dependency::DEPENDENCY_CHANGED_MULTIMESH_VISIBLE_INSTANCES: {
GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_tracker->userdata);
@@ -3150,10 +3147,10 @@ void RenderForwardClustered::_geometry_instance_dependency_changed(Dependency::D
}
}
void RenderForwardClustered::_geometry_instance_dependency_deleted(const RID &p_dependency, DependencyTracker *p_tracker) {
- static_cast<RenderForwardClustered *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
}
-RendererSceneRender::GeometryInstance *RenderForwardClustered::geometry_instance_create(RID p_base) {
+RenderGeometryInstance *RenderForwardClustered::geometry_instance_create(RID p_base) {
RS::InstanceType type = RSG::utilities->get_base_type(p_base);
ERR_FAIL_COND_V(!((1 << type) & RS::INSTANCE_GEOMETRY_MASK), nullptr);
@@ -3166,155 +3163,47 @@ RendererSceneRender::GeometryInstance *RenderForwardClustered::geometry_instance
ginstance->data->dependency_tracker.changed_callback = _geometry_instance_dependency_changed;
ginstance->data->dependency_tracker.deleted_callback = _geometry_instance_dependency_deleted;
- _geometry_instance_mark_dirty(ginstance);
+ ginstance->_mark_dirty();
return ginstance;
}
-void RenderForwardClustered::geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->skeleton = p_skeleton;
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-void RenderForwardClustered::geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_override = p_override;
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-void RenderForwardClustered::geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_overlay = p_overlay;
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-void RenderForwardClustered::geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->surface_materials = p_materials;
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-void RenderForwardClustered::geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->mesh_instance = p_mesh_instance;
- _geometry_instance_mark_dirty(ginstance);
-}
-void RenderForwardClustered::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
+void RenderForwardClustered::GeometryInstanceForwardClustered::set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) {
uint64_t frame = RSG::rasterizer->get_frame_number();
- if (frame != ginstance->prev_transform_change_frame) {
- ginstance->prev_transform = ginstance->transform;
- ginstance->prev_transform_change_frame = frame;
- ginstance->prev_transform_dirty = true;
+ if (frame != prev_transform_change_frame) {
+ prev_transform = transform;
+ prev_transform_change_frame = frame;
+ prev_transform_dirty = true;
}
- ginstance->transform = p_transform;
- ginstance->mirror = p_transform.basis.determinant() < 0;
- ginstance->data->aabb = p_aabb;
- ginstance->transformed_aabb = p_transformed_aabb;
-
- Vector3 model_scale_vec = p_transform.basis.get_scale_abs();
- // handle non uniform scale here
-
- float max_scale = MAX(model_scale_vec.x, MAX(model_scale_vec.y, model_scale_vec.z));
- float min_scale = MIN(model_scale_vec.x, MIN(model_scale_vec.y, model_scale_vec.z));
- ginstance->non_uniform_scale = max_scale >= 0.0 && (min_scale / max_scale) < 0.9;
-
- ginstance->lod_model_scale = max_scale;
-}
-void RenderForwardClustered::geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->lod_bias = p_lod_bias;
-}
-void RenderForwardClustered::geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->fade_near = p_enable_near;
- ginstance->fade_near_begin = p_near_begin;
- ginstance->fade_near_end = p_near_end;
- ginstance->fade_far = p_enable_far;
- ginstance->fade_far_begin = p_far_begin;
- ginstance->fade_far_end = p_far_end;
+ RenderGeometryInstanceBase::set_transform(p_transform, p_aabb, p_transformed_aabbb);
}
-void RenderForwardClustered::geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->parent_fade_alpha = p_alpha;
-}
+void RenderForwardClustered::GeometryInstanceForwardClustered::set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
+ lightmap_instance = p_lightmap_instance;
+ lightmap_uv_scale = p_lightmap_uv_scale;
+ lightmap_slice_index = p_lightmap_slice_index;
-void RenderForwardClustered::geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->force_alpha = CLAMP(1.0 - p_transparency, 0, 1);
+ _mark_dirty();
}
-void RenderForwardClustered::geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->use_baked_light = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-void RenderForwardClustered::geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->use_dynamic_gi = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-void RenderForwardClustered::geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->lightmap_instance = p_lightmap_instance;
- ginstance->lightmap_uv_scale = p_lightmap_uv_scale;
- ginstance->lightmap_slice_index = p_lightmap_slice_index;
- _geometry_instance_mark_dirty(ginstance);
-}
-void RenderForwardClustered::geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
+void RenderForwardClustered::GeometryInstanceForwardClustered::set_lightmap_capture(const Color *p_sh9) {
if (p_sh9) {
- if (ginstance->lightmap_sh == nullptr) {
- ginstance->lightmap_sh = geometry_instance_lightmap_sh.alloc();
+ if (lightmap_sh == nullptr) {
+ lightmap_sh = RenderForwardClustered::get_singleton()->geometry_instance_lightmap_sh.alloc();
}
- memcpy(ginstance->lightmap_sh->sh, p_sh9, sizeof(Color) * 9);
+ memcpy(lightmap_sh->sh, p_sh9, sizeof(Color) * 9);
} else {
- if (ginstance->lightmap_sh != nullptr) {
- geometry_instance_lightmap_sh.free(ginstance->lightmap_sh);
- ginstance->lightmap_sh = nullptr;
+ if (lightmap_sh != nullptr) {
+ RenderForwardClustered::get_singleton()->geometry_instance_lightmap_sh.free(lightmap_sh);
+ lightmap_sh = nullptr;
}
}
- _geometry_instance_mark_dirty(ginstance);
-}
-void RenderForwardClustered::geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->shader_parameters_offset = p_offset;
- _geometry_instance_mark_dirty(ginstance);
+ _mark_dirty();
}
-void RenderForwardClustered::geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->cast_double_sided_shadows = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardClustered::geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->layer_mask = p_layer_mask;
-}
-
-void RenderForwardClustered::geometry_instance_free(GeometryInstance *p_geometry_instance) {
+void RenderForwardClustered::geometry_instance_free(RenderGeometryInstance *p_geometry_instance) {
GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
if (ginstance->lightmap_sh != nullptr) {
@@ -3333,47 +3222,25 @@ void RenderForwardClustered::geometry_instance_free(GeometryInstance *p_geometry
uint32_t RenderForwardClustered::geometry_instance_get_pair_mask() {
return (1 << RS::INSTANCE_VOXEL_GI);
}
-void RenderForwardClustered::geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) {
-}
-void RenderForwardClustered::geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) {
-}
-void RenderForwardClustered::geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) {
-}
-Transform3D RenderForwardClustered::geometry_instance_get_transform(GeometryInstance *p_instance) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_instance);
- ERR_FAIL_COND_V(!ginstance, Transform3D());
- return ginstance->transform;
-}
-
-AABB RenderForwardClustered::geometry_instance_get_aabb(GeometryInstance *p_instance) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_instance);
- ERR_FAIL_COND_V(!ginstance, AABB());
- return ginstance->data->aabb;
-}
-
-void RenderForwardClustered::geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
+void RenderForwardClustered::GeometryInstanceForwardClustered::pair_voxel_gi_instances(const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) {
if (p_voxel_gi_instance_count > 0) {
- ginstance->voxel_gi_instances[0] = p_voxel_gi_instances[0];
+ voxel_gi_instances[0] = p_voxel_gi_instances[0];
} else {
- ginstance->voxel_gi_instances[0] = RID();
+ voxel_gi_instances[0] = RID();
}
if (p_voxel_gi_instance_count > 1) {
- ginstance->voxel_gi_instances[1] = p_voxel_gi_instances[1];
+ voxel_gi_instances[1] = p_voxel_gi_instances[1];
} else {
- ginstance->voxel_gi_instances[1] = RID();
+ voxel_gi_instances[1] = RID();
}
}
-void RenderForwardClustered::geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) {
- GeometryInstanceForwardClustered *ginstance = static_cast<GeometryInstanceForwardClustered *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->using_projectors = p_projector;
- ginstance->using_softshadows = p_softshadow;
- _geometry_instance_mark_dirty(ginstance);
+void RenderForwardClustered::GeometryInstanceForwardClustered::set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) {
+ using_projectors = p_projector;
+ using_softshadows = p_softshadow;
+ _mark_dirty();
}
void RenderForwardClustered::_update_shader_quality_settings() {
diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h
index 2bdf48c72f..7e71406af8 100644
--- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h
+++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.h
@@ -427,7 +427,7 @@ class RenderForwardClustered : public RendererSceneRenderRD {
HashMap<Size2i, RID> sdfgi_framebuffer_size_cache;
struct GeometryInstanceData;
- struct GeometryInstanceForwardClustered;
+ class GeometryInstanceForwardClustered;
struct GeometryInstanceLightmapSH {
Color sh[9];
@@ -487,73 +487,48 @@ class RenderForwardClustered : public RendererSceneRenderRD {
GeometryInstanceForwardClustered *owner = nullptr;
};
- struct GeometryInstanceForwardClustered : public GeometryInstance {
+ class GeometryInstanceForwardClustered : public RenderGeometryInstanceBase {
+ public:
+ // lightmap
+ RID lightmap_instance;
+ Rect2 lightmap_uv_scale;
+ uint32_t lightmap_slice_index;
+ GeometryInstanceLightmapSH *lightmap_sh = nullptr;
+
//used during rendering
- bool mirror = false;
- bool non_uniform_scale = false;
- float lod_bias = 0.0;
- float lod_model_scale = 1.0;
- AABB transformed_aabb; //needed for LOD
- float depth = 0;
+
uint32_t gi_offset_cache = 0;
- uint32_t flags_cache = 0;
bool store_transform_cache = true;
- int32_t shader_parameters_offset = -1;
- uint32_t lightmap_slice_index;
- Rect2 lightmap_uv_scale;
- uint32_t layer_mask = 1;
RID transforms_uniform_set;
uint32_t instance_count = 0;
uint32_t trail_steps = 1;
- RID mesh_instance;
bool can_sdfgi = false;
bool using_projectors = false;
bool using_softshadows = false;
- bool fade_near = false;
- float fade_near_begin = 0;
- float fade_near_end = 0;
- bool fade_far = false;
- float fade_far_begin = 0;
- float fade_far_end = 0;
- float force_alpha = 1.0;
- float parent_fade_alpha = 1.0;
//used during setup
- uint32_t base_flags = 0;
uint64_t prev_transform_change_frame = 0xFFFFFFFF;
bool prev_transform_dirty = true;
- Transform3D transform;
Transform3D prev_transform;
RID voxel_gi_instances[MAX_VOXEL_GI_INSTANCESS_PER_INSTANCE];
- RID lightmap_instance;
- GeometryInstanceLightmapSH *lightmap_sh = nullptr;
GeometryInstanceSurfaceDataCache *surface_caches = nullptr;
SelfList<GeometryInstanceForwardClustered> dirty_list_element;
- struct Data {
- //data used less often goes into regular heap
- RID base;
- RS::InstanceType base_type;
-
- RID skeleton;
- Vector<RID> surface_materials;
- RID material_override;
- RID material_overlay;
- AABB aabb;
+ GeometryInstanceForwardClustered() :
+ dirty_list_element(this) {}
- bool use_dynamic_gi = false;
- bool use_baked_light = true;
- bool cast_double_sided_shadows = false;
- bool mirror = false;
- bool dirty_dependencies = false;
+ virtual void _mark_dirty() override;
- DependencyTracker dependency_tracker;
- };
+ virtual void set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) override;
+ virtual void set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
+ virtual void set_lightmap_capture(const Color *p_sh9) override;
- Data *data = nullptr;
+ virtual void pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) override {}
+ virtual void pair_reflection_probe_instances(const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override {}
+ virtual void pair_decal_instances(const RID *p_decal_instances, uint32_t p_decal_instance_count) override {}
+ virtual void pair_voxel_gi_instances(const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override;
- GeometryInstanceForwardClustered() :
- dirty_list_element(this) {}
+ virtual void set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) override;
};
static void _geometry_instance_dependency_changed(Dependency::DependencyChangedNotification p_notification, DependencyTracker *p_tracker);
@@ -568,8 +543,7 @@ class RenderForwardClustered : public RendererSceneRenderRD {
void _geometry_instance_add_surface_with_material(GeometryInstanceForwardClustered *ginstance, uint32_t p_surface, SceneShaderForwardClustered::MaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh);
void _geometry_instance_add_surface_with_material_chain(GeometryInstanceForwardClustered *ginstance, uint32_t p_surface, SceneShaderForwardClustered::MaterialData *p_material, RID p_mat_src, RID p_mesh);
void _geometry_instance_add_surface(GeometryInstanceForwardClustered *ginstance, uint32_t p_surface, RID p_material, RID p_mesh);
- void _geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance);
- void _geometry_instance_update(GeometryInstance *p_geometry_instance);
+ void _geometry_instance_update(RenderGeometryInstance *p_geometry_instance);
void _update_dirty_geometry_instances();
/* Render List */
@@ -640,52 +614,27 @@ protected:
virtual void _render_scene(RenderDataRD *p_render_data, const Color &p_default_bg_color) override;
virtual void _render_shadow_begin() override;
- virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) override;
+ virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) override;
virtual void _render_shadow_process() override;
virtual void _render_shadow_end(uint32_t p_barrier = RD::BARRIER_MASK_ALL) override;
- virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- virtual void _render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) override;
- virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) override;
+ virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ virtual void _render_uv2(const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<RenderGeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) override;
+ virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<RenderGeometryInstance *> &p_instances) override;
public:
+ static RenderForwardClustered *get_singleton() { return singleton; }
+
_FORCE_INLINE_ virtual void update_uniform_sets() override {
base_uniform_set_updated = true;
_update_render_base_uniform_set();
}
- virtual GeometryInstance *geometry_instance_create(RID p_base) override;
- virtual void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) override;
- virtual void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) override;
- virtual void geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_override) override;
- virtual void geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) override;
- virtual void geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) override;
- virtual void geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) override;
- virtual void geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) override;
- virtual void geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) override;
- virtual void geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override;
- virtual void geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) override;
- virtual void geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) override;
- virtual void geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) override;
- virtual void geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) override;
- virtual void geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
- virtual void geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) override;
- virtual void geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) override;
- virtual void geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) override;
-
- virtual Transform3D geometry_instance_get_transform(GeometryInstance *p_instance) override;
- virtual AABB geometry_instance_get_aabb(GeometryInstance *p_instance) override;
-
- virtual void geometry_instance_free(GeometryInstance *p_geometry_instance) override;
+ virtual RenderGeometryInstance *geometry_instance_create(RID p_base) override;
+ virtual void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;
virtual uint32_t geometry_instance_get_pair_mask() override;
- virtual void geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) override;
- virtual void geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override;
- virtual void geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) override;
- virtual void geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override;
-
- virtual void geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) override;
virtual bool free(RID p_rid) override;
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
index a2995a8902..c84a4469ae 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
@@ -682,7 +682,7 @@ void SceneShaderForwardClustered::init(const String p_defines) {
actions.renames["NORMAL_ROUGHNESS_TEXTURE"] = "normal_roughness_buffer";
actions.renames["DEPTH"] = "gl_FragDepth";
actions.renames["OUTPUT_IS_SRGB"] = "true";
- actions.renames["FOG"] = "custom_fog";
+ actions.renames["FOG"] = "fog";
actions.renames["RADIANCE"] = "custom_radiance";
actions.renames["IRRADIANCE"] = "custom_irradiance";
actions.renames["BONE_INDICES"] = "bone_attrib";
@@ -788,7 +788,7 @@ void SceneShaderForwardClustered::init(const String p_defines) {
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
actions.instance_uniform_index_variable = "instances.data[instance_index_interp].instance_uniforms_ofs";
compiler.initialize(actions);
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
index 0ca71080fc..a179688487 100644
--- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
@@ -497,7 +497,6 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
if (p_render_data->render_buffers.is_valid()) {
render_buffer = static_cast<RenderBufferDataForwardMobile *>(render_buffers_get_data(p_render_data->render_buffers));
}
- RendererSceneEnvironmentRD *env = get_environment(p_render_data->environment);
RENDER_TIMESTAMP("Setup 3D Scene");
@@ -540,7 +539,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
if (render_buffer->color_fbs[FB_CONFIG_FOUR_SUBPASSES].is_null()) {
// can't do blit subpass
using_subpass_post_process = false;
- } else if (env && (env->glow_enabled || env->auto_exposure || camera_effects_uses_dof(p_render_data->camera_effects))) {
+ } else if (p_render_data->environment.is_valid() && (environment_get_glow_enabled(p_render_data->environment) || environment_get_auto_exposure(p_render_data->environment) || camera_effects_uses_dof(p_render_data->camera_effects))) {
// can't do blit subpass
using_subpass_post_process = false;
}
@@ -570,7 +569,6 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
if (RendererRD::LightStorage::get_singleton()->reflection_probe_is_interior(reflection_probe_instance_get_probe(p_render_data->reflection_probe))) {
p_render_data->environment = RID(); //no environment on interiors
- env = nullptr;
}
reverse_cull = true;
@@ -612,7 +610,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
/*
- if (render_buffers_has_volumetric_fog(p_render_data->render_buffers) || environment_is_fog_enabled(p_render_data->environment)) {
+ if (render_buffers_has_volumetric_fog(p_render_data->render_buffers) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true;
RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
}
@@ -624,7 +622,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
clear_color.g *= bg_energy;
clear_color.b *= bg_energy;
/*
- if (render_buffers_has_volumetric_fog(p_render_data->render_buffers) || environment_is_fog_enabled(p_render_data->environment)) {
+ if (render_buffers_has_volumetric_fog(p_render_data->render_buffers) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true;
RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
}
@@ -655,11 +653,11 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
projection = correction * p_render_data->cam_projection;
}
- sky.setup(env, p_render_data->render_buffers, *p_render_data->lights, projection, p_render_data->cam_transform, screen_size, this);
+ sky.setup(p_render_data->environment, p_render_data->render_buffers, *p_render_data->lights, projection, p_render_data->cam_transform, screen_size, this);
- RID sky_rid = env->sky;
+ RID sky_rid = environment_get_sky(p_render_data->environment);
if (sky_rid.is_valid()) {
- sky.update(env, projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
+ sky.update(p_render_data->environment, projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
radiance_texture = sky.sky_get_radiance_texture_rd(sky_rid);
} else {
// do not try to draw sky if invalid
@@ -683,9 +681,9 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
Projection correction;
correction.set_depth_correction(true);
Projection projection = correction * p_render_data->cam_projection;
- sky.update_res_buffers(env, 1, &projection, p_render_data->cam_transform, time);
+ sky.update_res_buffers(p_render_data->environment, 1, &projection, p_render_data->cam_transform, time);
} else {
- sky.update_res_buffers(env, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time);
+ sky.update_res_buffers(p_render_data->environment, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time);
}
RD::get_singleton()->draw_command_end_label(); // Setup Sky resolution buffers
@@ -707,7 +705,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_DIRECTIONAL_LIGHTS;
}
- if (!is_environment(p_render_data->environment) || environment_is_fog_enabled(p_render_data->environment)) {
+ if (!is_environment(p_render_data->environment) || environment_get_fog_enabled(p_render_data->environment)) {
spec_constant_base_flags |= 1 << SPEC_CONSTANT_DISABLE_FOG;
}
}
@@ -782,9 +780,9 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
Projection correction;
correction.set_depth_correction(true);
Projection projection = correction * p_render_data->cam_projection;
- sky.draw(draw_list, env, framebuffer, 1, &projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
+ sky.draw(draw_list, p_render_data->environment, framebuffer, 1, &projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
} else {
- sky.draw(draw_list, env, framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
+ sky.draw(draw_list, p_render_data->environment, framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
}
RD::get_singleton()->draw_command_end_label(); // Draw Sky Subpass
@@ -907,7 +905,7 @@ void RenderForwardMobile::_render_shadow_begin() {
render_list[RENDER_LIST_SECONDARY].clear();
}
-void RenderForwardMobile::_render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end, RendererScene::RenderInfo *p_render_info) {
+void RenderForwardMobile::_render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end, RendererScene::RenderInfo *p_render_info) {
uint32_t shadow_pass_index = scene_state.shadow_passes.size();
SceneState::ShadowPass shadow_pass;
@@ -1001,7 +999,7 @@ void RenderForwardMobile::_render_shadow_end(uint32_t p_barrier) {
/* */
-void RenderForwardMobile::_render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RenderForwardMobile::_render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering 3D Material");
RD::get_singleton()->draw_command_begin_label("Render 3D Material");
@@ -1047,7 +1045,7 @@ void RenderForwardMobile::_render_material(const Transform3D &p_cam_transform, c
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardMobile::_render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RenderForwardMobile::_render_uv2(const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering UV2");
RD::get_singleton()->draw_command_begin_label("Render UV2");
@@ -1114,11 +1112,11 @@ void RenderForwardMobile::_render_uv2(const PagedArray<GeometryInstance *> &p_in
RD::get_singleton()->draw_command_end_label();
}
-void RenderForwardMobile::_render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) {
+void RenderForwardMobile::_render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<RenderGeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) {
// we don't do GI in low end..
}
-void RenderForwardMobile::_render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) {
+void RenderForwardMobile::_render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<RenderGeometryInstance *> &p_instances) {
RENDER_TIMESTAMP("Setup GPUParticlesCollisionHeightField3D");
RD::get_singleton()->draw_command_begin_label("Render Collider Heightfield");
@@ -1332,7 +1330,7 @@ void RenderForwardMobile::_update_render_base_uniform_set() {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 14;
- u.append_id(RendererRD::MaterialStorage::get_singleton()->global_variables_get_storage_buffer());
+ u.append_id(RendererRD::MaterialStorage::get_singleton()->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
@@ -1663,7 +1661,7 @@ void RenderForwardMobile::_setup_environment(const RenderDataRD *p_render_data,
scene_state.ubo.use_ambient_cubemap = false;
} else {
float energy = environment_get_ambient_light_energy(p_render_data->environment);
- Color color = environment_get_ambient_light_color(p_render_data->environment);
+ Color color = environment_get_ambient_light(p_render_data->environment);
color = color.srgb_to_linear();
scene_state.ubo.ambient_light_color_energy[0] = color.r * energy;
scene_state.ubo.ambient_light_color_energy[1] = color.g * energy;
@@ -1685,11 +1683,11 @@ void RenderForwardMobile::_setup_environment(const RenderDataRD *p_render_data,
scene_state.ubo.use_reflection_cubemap = false;
}
- scene_state.ubo.ssao_enabled = p_opaque_render_buffers && environment_is_ssao_enabled(p_render_data->environment);
- scene_state.ubo.ssao_ao_affect = environment_get_ssao_ao_affect(p_render_data->environment);
- scene_state.ubo.ssao_light_affect = environment_get_ssao_light_affect(p_render_data->environment);
+ scene_state.ubo.ssao_enabled = p_opaque_render_buffers && environment_get_ssao_enabled(p_render_data->environment);
+ scene_state.ubo.ssao_ao_affect = environment_get_ssao_ao_channel_affect(p_render_data->environment);
+ scene_state.ubo.ssao_light_affect = environment_get_ssao_direct_light_affect(p_render_data->environment);
- scene_state.ubo.fog_enabled = environment_is_fog_enabled(p_render_data->environment);
+ scene_state.ubo.fog_enabled = environment_get_fog_enabled(p_render_data->environment);
scene_state.ubo.fog_density = environment_get_fog_density(p_render_data->environment);
scene_state.ubo.fog_height = environment_get_fog_height(p_render_data->environment);
scene_state.ubo.fog_height_density = environment_get_fog_height_density(p_render_data->environment);
@@ -2056,7 +2054,7 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
/* Geometry instance */
-RendererSceneRender::GeometryInstance *RenderForwardMobile::geometry_instance_create(RID p_base) {
+RenderGeometryInstance *RenderForwardMobile::geometry_instance_create(RID p_base) {
RS::InstanceType type = RSG::utilities->get_base_type(p_base);
ERR_FAIL_COND_V(!((1 << type) & RS::INSTANCE_GEOMETRY_MASK), nullptr);
@@ -2066,165 +2064,36 @@ RendererSceneRender::GeometryInstance *RenderForwardMobile::geometry_instance_cr
ginstance->data->base = p_base;
ginstance->data->base_type = type;
- _geometry_instance_mark_dirty(ginstance);
+ ginstance->_mark_dirty();
return ginstance;
}
-void RenderForwardMobile::geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->skeleton = p_skeleton;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RenderForwardMobile::geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_override = p_override;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RenderForwardMobile::geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->material_overlay = p_overlay;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RenderForwardMobile::geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->surface_materials = p_materials;
-
- _geometry_instance_mark_dirty(ginstance);
- ginstance->data->dirty_dependencies = true;
-}
-
-void RenderForwardMobile::geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->mesh_instance = p_mesh_instance;
-
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardMobile::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->transform = p_transform;
- ginstance->mirror = p_transform.basis.determinant() < 0;
- ginstance->data->aabb = p_aabb;
- ginstance->transformed_aabb = p_transformed_aabb;
-
- Vector3 model_scale_vec = p_transform.basis.get_scale_abs();
- // handle non uniform scale here
-
- float max_scale = MAX(model_scale_vec.x, MAX(model_scale_vec.y, model_scale_vec.z));
- float min_scale = MIN(model_scale_vec.x, MIN(model_scale_vec.y, model_scale_vec.z));
- ginstance->non_uniform_scale = max_scale >= 0.0 && (min_scale / max_scale) < 0.9;
-
- ginstance->lod_model_scale = max_scale;
-}
-
-void RenderForwardMobile::geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->layer_mask = p_layer_mask;
-}
-
-void RenderForwardMobile::geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->lod_bias = p_lod_bias;
-}
-
-void RenderForwardMobile::geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) {
-}
-
-void RenderForwardMobile::geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) {
-}
+void RenderForwardMobile::GeometryInstanceForwardMobile::set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
+ lightmap_instance = p_lightmap_instance;
+ lightmap_uv_scale = p_lightmap_uv_scale;
+ lightmap_slice_index = p_lightmap_slice_index;
-void RenderForwardMobile::geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) {
+ _mark_dirty();
}
-void RenderForwardMobile::geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->data->use_baked_light = p_enable;
-
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardMobile::geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) {
- // !BAS! do we support this in mobile?
- // GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- // ERR_FAIL_COND(!ginstance);
- // ginstance->data->use_dynamic_gi = p_enable;
- // _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardMobile::geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->lightmap_instance = p_lightmap_instance;
- ginstance->lightmap_uv_scale = p_lightmap_uv_scale;
- ginstance->lightmap_slice_index = p_lightmap_slice_index;
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardMobile::geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
+void RenderForwardMobile::GeometryInstanceForwardMobile::set_lightmap_capture(const Color *p_sh9) {
if (p_sh9) {
- if (ginstance->lightmap_sh == nullptr) {
- ginstance->lightmap_sh = geometry_instance_lightmap_sh.alloc();
+ if (lightmap_sh == nullptr) {
+ lightmap_sh = RenderForwardMobile::get_singleton()->geometry_instance_lightmap_sh.alloc();
}
- memcpy(ginstance->lightmap_sh->sh, p_sh9, sizeof(Color) * 9);
+ memcpy(lightmap_sh->sh, p_sh9, sizeof(Color) * 9);
} else {
- if (ginstance->lightmap_sh != nullptr) {
- geometry_instance_lightmap_sh.free(ginstance->lightmap_sh);
- ginstance->lightmap_sh = nullptr;
+ if (lightmap_sh != nullptr) {
+ RenderForwardMobile::get_singleton()->geometry_instance_lightmap_sh.free(lightmap_sh);
+ lightmap_sh = nullptr;
}
}
- _geometry_instance_mark_dirty(ginstance);
-}
-
-void RenderForwardMobile::geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
- ginstance->shader_parameters_offset = p_offset;
- _geometry_instance_mark_dirty(ginstance);
+ _mark_dirty();
}
-void RenderForwardMobile::geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
- ginstance->data->cast_double_sided_shadows = p_enable;
- _geometry_instance_mark_dirty(ginstance);
-}
-
-Transform3D RenderForwardMobile::geometry_instance_get_transform(GeometryInstance *p_instance) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_instance);
- ERR_FAIL_COND_V(!ginstance, Transform3D());
- return ginstance->transform;
-}
-
-AABB RenderForwardMobile::geometry_instance_get_aabb(GeometryInstance *p_instance) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_instance);
- ERR_FAIL_COND_V(!ginstance, AABB());
- return ginstance->data->aabb;
-}
-
-void RenderForwardMobile::geometry_instance_free(GeometryInstance *p_geometry_instance) {
+void RenderForwardMobile::geometry_instance_free(RenderGeometryInstance *p_geometry_instance) {
GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
if (ginstance->lightmap_sh != nullptr) {
@@ -2244,26 +2113,23 @@ uint32_t RenderForwardMobile::geometry_instance_get_pair_mask() {
return ((1 << RS::INSTANCE_LIGHT) + (1 << RS::INSTANCE_REFLECTION_PROBE) + (1 << RS::INSTANCE_DECAL));
}
-void RenderForwardMobile::geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
- ginstance->omni_light_count = 0;
- ginstance->spot_light_count = 0;
+void RenderForwardMobile::GeometryInstanceForwardMobile::pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) {
+ omni_light_count = 0;
+ spot_light_count = 0;
for (uint32_t i = 0; i < p_light_instance_count; i++) {
- RS::LightType type = light_instance_get_type(p_light_instances[i]);
+ RS::LightType type = RenderForwardMobile::get_singleton()->light_instance_get_type(p_light_instances[i]);
switch (type) {
case RS::LIGHT_OMNI: {
- if (ginstance->omni_light_count < (uint32_t)MAX_RDL_CULL) {
- ginstance->omni_lights[ginstance->omni_light_count] = light_instance_get_forward_id(p_light_instances[i]);
- ginstance->omni_light_count++;
+ if (omni_light_count < (uint32_t)MAX_RDL_CULL) {
+ omni_lights[omni_light_count] = RenderForwardMobile::get_singleton()->light_instance_get_forward_id(p_light_instances[i]);
+ omni_light_count++;
}
} break;
case RS::LIGHT_SPOT: {
- if (ginstance->spot_light_count < (uint32_t)MAX_RDL_CULL) {
- ginstance->spot_lights[ginstance->spot_light_count] = light_instance_get_forward_id(p_light_instances[i]);
- ginstance->spot_light_count++;
+ if (spot_light_count < (uint32_t)MAX_RDL_CULL) {
+ spot_lights[spot_light_count] = RenderForwardMobile::get_singleton()->light_instance_get_forward_id(p_light_instances[i]);
+ spot_light_count++;
}
} break;
default:
@@ -2272,56 +2138,42 @@ void RenderForwardMobile::geometry_instance_pair_light_instances(GeometryInstanc
}
}
-void RenderForwardMobile::geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
- ginstance->reflection_probe_count = p_reflection_probe_instance_count < (uint32_t)MAX_RDL_CULL ? p_reflection_probe_instance_count : (uint32_t)MAX_RDL_CULL;
- for (uint32_t i = 0; i < ginstance->reflection_probe_count; i++) {
- ginstance->reflection_probes[i] = reflection_probe_instance_get_forward_id(p_reflection_probe_instances[i]);
+void RenderForwardMobile::GeometryInstanceForwardMobile::pair_reflection_probe_instances(const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) {
+ reflection_probe_count = p_reflection_probe_instance_count < (uint32_t)MAX_RDL_CULL ? p_reflection_probe_instance_count : (uint32_t)MAX_RDL_CULL;
+ for (uint32_t i = 0; i < reflection_probe_count; i++) {
+ reflection_probes[i] = RenderForwardMobile::get_singleton()->reflection_probe_instance_get_forward_id(p_reflection_probe_instances[i]);
}
}
-void RenderForwardMobile::geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
- ginstance->decals_count = p_decal_instance_count < (uint32_t)MAX_RDL_CULL ? p_decal_instance_count : (uint32_t)MAX_RDL_CULL;
- for (uint32_t i = 0; i < ginstance->decals_count; i++) {
- ginstance->decals[i] = decal_instance_get_forward_id(p_decal_instances[i]);
+void RenderForwardMobile::GeometryInstanceForwardMobile::pair_decal_instances(const RID *p_decal_instances, uint32_t p_decal_instance_count) {
+ decals_count = p_decal_instance_count < (uint32_t)MAX_RDL_CULL ? p_decal_instance_count : (uint32_t)MAX_RDL_CULL;
+ for (uint32_t i = 0; i < decals_count; i++) {
+ decals[i] = RenderForwardMobile::get_singleton()->decal_instance_get_forward_id(p_decal_instances[i]);
}
}
-void RenderForwardMobile::geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) {
- // We do not have this here!
-}
-
-void RenderForwardMobile::geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- ERR_FAIL_COND(!ginstance);
-
- ginstance->use_projector = p_projector;
- ginstance->use_soft_shadow = p_softshadow;
+void RenderForwardMobile::GeometryInstanceForwardMobile::set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) {
+ use_projector = p_projector;
+ use_soft_shadow = p_softshadow;
}
-void RenderForwardMobile::_geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance) {
- GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
- if (ginstance->dirty_list_element.in_list()) {
+void RenderForwardMobile::GeometryInstanceForwardMobile::_mark_dirty() {
+ if (dirty_list_element.in_list()) {
return;
}
//clear surface caches
- GeometryInstanceSurfaceDataCache *surf = ginstance->surface_caches;
+ GeometryInstanceSurfaceDataCache *surf = surface_caches;
while (surf) {
GeometryInstanceSurfaceDataCache *next = surf->next;
- geometry_instance_surface_alloc.free(surf);
+ RenderForwardMobile::get_singleton()->geometry_instance_surface_alloc.free(surf);
surf = next;
}
- ginstance->surface_caches = nullptr;
+ surface_caches = nullptr;
- geometry_instance_dirty_list.add(&ginstance->dirty_list_element);
+ RenderForwardMobile::get_singleton()->geometry_instance_dirty_list.add(&dirty_list_element);
}
void RenderForwardMobile::_geometry_instance_add_surface_with_material(GeometryInstanceForwardMobile *ginstance, uint32_t p_surface, SceneShaderForwardMobile::MaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh) {
@@ -2487,7 +2339,7 @@ void RenderForwardMobile::_geometry_instance_add_surface(GeometryInstanceForward
}
}
-void RenderForwardMobile::_geometry_instance_update(GeometryInstance *p_geometry_instance) {
+void RenderForwardMobile::_geometry_instance_update(RenderGeometryInstance *p_geometry_instance) {
RendererRD::MeshStorage *mesh_storage = RendererRD::MeshStorage::get_singleton();
RendererRD::ParticlesStorage *particles_storage = RendererRD::ParticlesStorage::get_singleton();
GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_geometry_instance);
@@ -2641,7 +2493,7 @@ void RenderForwardMobile::_geometry_instance_dependency_changed(Dependency::Depe
case Dependency::DEPENDENCY_CHANGED_PARTICLES:
case Dependency::DEPENDENCY_CHANGED_MULTIMESH:
case Dependency::DEPENDENCY_CHANGED_SKELETON_DATA: {
- static_cast<RenderForwardMobile *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
} break;
case Dependency::DEPENDENCY_CHANGED_MULTIMESH_VISIBLE_INSTANCES: {
GeometryInstanceForwardMobile *ginstance = static_cast<GeometryInstanceForwardMobile *>(p_tracker->userdata);
@@ -2655,7 +2507,7 @@ void RenderForwardMobile::_geometry_instance_dependency_changed(Dependency::Depe
}
}
void RenderForwardMobile::_geometry_instance_dependency_deleted(const RID &p_dependency, DependencyTracker *p_tracker) {
- static_cast<RenderForwardMobile *>(singleton)->_geometry_instance_mark_dirty(static_cast<GeometryInstance *>(p_tracker->userdata));
+ static_cast<RenderGeometryInstance *>(p_tracker->userdata)->_mark_dirty();
}
/* misc */
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
index 5b1109512a..4a7112eb81 100644
--- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
+++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
@@ -160,7 +160,7 @@ protected:
// PASS_MODE_SDF,
};
- struct GeometryInstanceForwardMobile;
+ class GeometryInstanceForwardMobile;
struct GeometryInstanceSurfaceDataCache;
struct RenderElementInfo;
@@ -212,14 +212,14 @@ protected:
virtual void _render_scene(RenderDataRD *p_render_data, const Color &p_default_bg_color) override;
virtual void _render_shadow_begin() override;
- virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) override;
+ virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) override;
virtual void _render_shadow_process() override;
virtual void _render_shadow_end(uint32_t p_barrier = RD::BARRIER_MASK_ALL) override;
- virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- virtual void _render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) override;
- virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) override;
+ virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ virtual void _render_uv2(const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<RenderGeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) override;
+ virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<RenderGeometryInstance *> &p_instances) override;
uint64_t lightmap_texture_array_version = 0xFFFFFFFF;
@@ -518,14 +518,8 @@ protected:
GeometryInstanceForwardMobile *owner = nullptr;
};
- // !BAS! GeometryInstanceForwardClustered and GeometryInstanceForwardMobile will likely have a lot of overlap
- // may need to think about making this its own class like GeometryInstanceRD?
-
- struct GeometryInstanceForwardMobile : public GeometryInstance {
- // setup
- uint32_t base_flags = 0;
- uint32_t flags_cache = 0;
-
+ class GeometryInstanceForwardMobile : public RenderGeometryInstanceBase {
+ public:
// this structure maps to our push constant in our shader and is populated right before our draw call
struct PushConstant {
float transform[16];
@@ -543,28 +537,18 @@ protected:
// PushConstant push_constant; // we populate this from our instance data
//used during rendering
- uint32_t layer_mask = 1;
RID transforms_uniform_set;
- float depth = 0;
- bool mirror = false;
bool use_projector = false;
bool use_soft_shadow = false;
- Transform3D transform;
bool store_transform_cache = true; // if true we copy our transform into our PushConstant, if false we use our transforms UBO and clear our PushConstants transform
- bool non_uniform_scale = false;
- AABB transformed_aabb; //needed for LOD
- float lod_bias = 0.0;
- float lod_model_scale = 1.0;
- int32_t shader_parameters_offset = -1;
uint32_t instance_count = 0;
uint32_t trail_steps = 1;
- RID mesh_instance;
// lightmap
uint32_t gi_offset_cache = 0; // !BAS! Should rename this to lightmap_offset_cache, in forward clustered this was shared between gi and lightmap
- uint32_t lightmap_slice_index;
- Rect2 lightmap_uv_scale;
RID lightmap_instance;
+ Rect2 lightmap_uv_scale;
+ uint32_t lightmap_slice_index;
GeometryInstanceLightmapSH *lightmap_sh = nullptr;
// culled light info
@@ -582,30 +566,20 @@ protected:
// do we use this?
SelfList<GeometryInstanceForwardMobile> dirty_list_element;
- struct Data {
- //data used less often goes into regular heap
- RID base;
- RS::InstanceType base_type;
-
- RID skeleton;
- Vector<RID> surface_materials;
- RID material_override;
- RID material_overlay;
- AABB aabb;
-
- bool use_baked_light = true;
- bool cast_double_sided_shadows = false;
- // bool mirror = false; // !BAS! Does not seem used, we already have this in the main struct
+ GeometryInstanceForwardMobile() :
+ dirty_list_element(this) {}
- bool dirty_dependencies = false;
+ virtual void _mark_dirty() override;
- DependencyTracker dependency_tracker;
- };
+ virtual void set_use_lightmap(RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
+ virtual void set_lightmap_capture(const Color *p_sh9) override;
- Data *data = nullptr;
+ virtual void pair_light_instances(const RID *p_light_instances, uint32_t p_light_instance_count) override;
+ virtual void pair_reflection_probe_instances(const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override;
+ virtual void pair_decal_instances(const RID *p_decal_instances, uint32_t p_decal_instance_count) override;
+ virtual void pair_voxel_gi_instances(const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override {}
- GeometryInstanceForwardMobile() :
- dirty_list_element(this) {}
+ virtual void set_softshadow_projector_pairing(bool p_softshadow, bool p_projector) override;
};
_FORCE_INLINE_ void _fill_push_constant_instance_indices(GeometryInstanceForwardMobile::PushConstant *p_push_constant, uint32_t &spec_constants, const GeometryInstanceForwardMobile *p_instance);
@@ -613,6 +587,8 @@ protected:
void _update_shader_quality_settings() override;
public:
+ static RenderForwardMobile *get_singleton() { return singleton; }
+
virtual RID reflection_probe_create_framebuffer(RID p_color, RID p_depth) override;
static void _geometry_instance_dependency_changed(Dependency::DependencyChangedNotification p_notification, DependencyTracker *p_tracker);
@@ -627,41 +603,13 @@ public:
void _geometry_instance_add_surface_with_material(GeometryInstanceForwardMobile *ginstance, uint32_t p_surface, SceneShaderForwardMobile::MaterialData *p_material, uint32_t p_material_id, uint32_t p_shader_id, RID p_mesh);
void _geometry_instance_add_surface_with_material_chain(GeometryInstanceForwardMobile *ginstance, uint32_t p_surface, SceneShaderForwardMobile::MaterialData *p_material, RID p_mat_src, RID p_mesh);
void _geometry_instance_add_surface(GeometryInstanceForwardMobile *ginstance, uint32_t p_surface, RID p_material, RID p_mesh);
- void _geometry_instance_mark_dirty(GeometryInstance *p_geometry_instance);
- void _geometry_instance_update(GeometryInstance *p_geometry_instance);
+ void _geometry_instance_update(RenderGeometryInstance *p_geometry_instance);
void _update_dirty_geometry_instances();
- virtual GeometryInstance *geometry_instance_create(RID p_base) override;
- virtual void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) override;
- virtual void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) override;
- virtual void geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_overlay) override;
- virtual void geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_materials) override;
- virtual void geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) override;
- virtual void geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) override;
- virtual void geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) override;
- virtual void geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) override;
- virtual void geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override;
- virtual void geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) override;
- virtual void geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) override;
- virtual void geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) override;
- virtual void geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) override;
- virtual void geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) override;
- virtual void geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) override;
- virtual void geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) override;
- virtual void geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) override;
-
- virtual Transform3D geometry_instance_get_transform(GeometryInstance *p_instance) override;
- virtual AABB geometry_instance_get_aabb(GeometryInstance *p_instance) override;
-
- virtual void geometry_instance_free(GeometryInstance *p_geometry_instance) override;
+ virtual RenderGeometryInstance *geometry_instance_create(RID p_base) override;
+ virtual void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;
virtual uint32_t geometry_instance_get_pair_mask() override;
- virtual void geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) override;
- virtual void geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) override;
- virtual void geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) override;
- virtual void geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) override;
-
- virtual void geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) override;
virtual bool free(RID p_rid) override;
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
index ee902e5c52..c6eac298e7 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
@@ -584,7 +584,7 @@ void SceneShaderForwardMobile::init(const String p_defines) {
actions.renames["NORMAL_ROUGHNESS_TEXTURE"] = "normal_roughness_buffer";
actions.renames["DEPTH"] = "gl_FragDepth";
actions.renames["OUTPUT_IS_SRGB"] = "true";
- actions.renames["FOG"] = "custom_fog";
+ actions.renames["FOG"] = "fog";
actions.renames["RADIANCE"] = "custom_radiance";
actions.renames["IRRADIANCE"] = "custom_irradiance";
actions.renames["BONE_INDICES"] = "bone_attrib";
@@ -685,7 +685,7 @@ void SceneShaderForwardMobile::init(const String p_defines) {
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
actions.instance_uniform_index_variable = "draw_call.instance_uniforms_ofs";
actions.apply_luminance_multiplier = true; // apply luminance multiplier to screen texture
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index a58cdd5066..0b59ca6931 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -1031,7 +1031,7 @@ RID RendererCanvasRenderRD::_create_base_uniform_set(RID p_to_render_target, boo
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 9;
- u.append_id(RendererRD::MaterialStorage::get_singleton()->global_variables_get_storage_buffer());
+ u.append_id(RendererRD::MaterialStorage::get_singleton()->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
@@ -1304,7 +1304,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
Size2i ssize = texture_storage->render_target_get_size(p_to_render_target);
Transform3D screen_transform;
- screen_transform.translate(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
+ screen_transform.translate_local(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
screen_transform.scale(Vector3(2.0f / ssize.width, 2.0f / ssize.height, 1.0f));
_update_transform_to_mat4(screen_transform, state_buffer.screen_transform);
_update_transform_2d_to_mat4(p_canvas_transform, state_buffer.canvas_transform);
@@ -2469,7 +2469,7 @@ RendererCanvasRenderRD::RendererCanvasRenderRD() {
actions.default_repeat = ShaderLanguage::REPEAT_DISABLE;
actions.base_varying_index = 4;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
shader.compiler.initialize(actions);
}
diff --git a/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp
deleted file mode 100644
index 0d9477d850..0000000000
--- a/servers/rendering/renderer_rd/renderer_scene_environment_rd.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*************************************************************************/
-/* renderer_scene_environment_rd.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 "servers/rendering/renderer_rd/renderer_scene_environment_rd.h"
-
-uint64_t RendererSceneEnvironmentRD::auto_exposure_counter = 2;
-
-void RendererSceneEnvironmentRD::set_ambient_light(const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source) {
- ambient_light = p_color;
- ambient_source = p_ambient;
- ambient_light_energy = p_energy;
- ambient_sky_contribution = p_sky_contribution;
- reflection_source = p_reflection_source;
-}
-
-void RendererSceneEnvironmentRD::set_tonemap(RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
- exposure = p_exposure;
- tone_mapper = p_tone_mapper;
- if (!auto_exposure && p_auto_exposure) {
- auto_exposure_version = ++auto_exposure_counter;
- }
- auto_exposure = p_auto_exposure;
- white = p_white;
- min_luminance = p_min_luminance;
- max_luminance = p_max_luminance;
- auto_exp_speed = p_auto_exp_speed;
- auto_exp_scale = p_auto_exp_scale;
-}
-
-void RendererSceneEnvironmentRD::set_glow(bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
- ERR_FAIL_COND_MSG(p_levels.size() != 7, "Size of array of glow levels must be 7");
- glow_enabled = p_enable;
- glow_levels = p_levels;
- glow_intensity = p_intensity;
- glow_strength = p_strength;
- glow_mix = p_mix;
- glow_bloom = p_bloom_threshold;
- glow_blend_mode = p_blend_mode;
- glow_hdr_bleed_threshold = p_hdr_bleed_threshold;
- glow_hdr_bleed_scale = p_hdr_bleed_scale;
- glow_hdr_luminance_cap = p_hdr_luminance_cap;
- glow_map_strength = p_glow_map_strength;
- glow_map = p_glow_map;
-}
-
-void RendererSceneEnvironmentRD::set_sdfgi(bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
- sdfgi_enabled = p_enable;
- sdfgi_cascades = p_cascades;
- sdfgi_min_cell_size = p_min_cell_size;
- sdfgi_use_occlusion = p_use_occlusion;
- sdfgi_bounce_feedback = p_bounce_feedback;
- sdfgi_read_sky_light = p_read_sky;
- sdfgi_energy = p_energy;
- sdfgi_normal_bias = p_normal_bias;
- sdfgi_probe_bias = p_probe_bias;
- sdfgi_y_scale = p_y_scale;
-}
-
-void RendererSceneEnvironmentRD::set_fog(bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective) {
- fog_enabled = p_enable;
- fog_light_color = p_light_color;
- fog_light_energy = p_light_energy;
- fog_sun_scatter = p_sun_scatter;
- fog_density = p_density;
- fog_height = p_height;
- fog_height_density = p_height_density;
- fog_aerial_perspective = p_fog_aerial_perspective;
-}
-
-void RendererSceneEnvironmentRD::set_volumetric_fog(bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) {
- volumetric_fog_enabled = p_enable;
- volumetric_fog_density = p_density;
- volumetric_fog_scattering = p_albedo;
- volumetric_fog_emission = p_emission;
- volumetric_fog_emission_energy = p_emission_energy;
- volumetric_fog_anisotropy = p_anisotropy,
- volumetric_fog_length = p_length;
- volumetric_fog_detail_spread = p_detail_spread;
- volumetric_fog_gi_inject = p_gi_inject;
- volumetric_fog_temporal_reprojection = p_temporal_reprojection;
- volumetric_fog_temporal_reprojection_amount = p_temporal_reprojection_amount;
- volumetric_fog_ambient_inject = p_ambient_inject;
-}
-
-void RendererSceneEnvironmentRD::set_ssr(bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
- ssr_enabled = p_enable;
- ssr_max_steps = p_max_steps;
- ssr_fade_in = p_fade_int;
- ssr_fade_out = p_fade_out;
- ssr_depth_tolerance = p_depth_tolerance;
-}
-
-void RendererSceneEnvironmentRD::set_ssao(bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
- ssao_enabled = p_enable;
- ssao_radius = p_radius;
- ssao_intensity = p_intensity;
- ssao_power = p_power;
- ssao_detail = p_detail;
- ssao_horizon = p_horizon;
- ssao_sharpness = p_sharpness;
- ssao_direct_light_affect = p_light_affect;
- ssao_ao_channel_affect = p_ao_channel_affect;
-}
diff --git a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h b/servers/rendering/renderer_rd/renderer_scene_environment_rd.h
deleted file mode 100644
index d9f78b3bc3..0000000000
--- a/servers/rendering/renderer_rd/renderer_scene_environment_rd.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*************************************************************************/
-/* renderer_scene_environment_rd.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 RENDERER_SCENE_ENVIRONMENT_RD_H
-#define RENDERER_SCENE_ENVIRONMENT_RD_H
-
-#include "servers/rendering/renderer_scene_render.h"
-#include "servers/rendering/rendering_device.h"
-
-class RendererSceneEnvironmentRD {
-private:
- static uint64_t auto_exposure_counter;
-
-public:
- // BG
- RS::EnvironmentBG background = RS::ENV_BG_CLEAR_COLOR;
- RID sky;
- float sky_custom_fov = 0.0;
- Basis sky_orientation;
- Color bg_color;
- float bg_energy = 1.0;
- int canvas_max_layer = 0;
- RS::EnvironmentAmbientSource ambient_source = RS::ENV_AMBIENT_SOURCE_BG;
- Color ambient_light;
- float ambient_light_energy = 1.0;
- float ambient_sky_contribution = 1.0;
- RS::EnvironmentReflectionSource reflection_source = RS::ENV_REFLECTION_SOURCE_BG;
-
- /// Tonemap
-
- RS::EnvironmentToneMapper tone_mapper;
- float exposure = 1.0;
- float white = 1.0;
- bool auto_exposure = false;
- float min_luminance = 0.2;
- float max_luminance = 8.0;
- float auto_exp_speed = 0.2;
- float auto_exp_scale = 0.5;
- uint64_t auto_exposure_version = 0;
-
- // Fog
- bool fog_enabled = false;
- Color fog_light_color = Color(0.5, 0.6, 0.7);
- float fog_light_energy = 1.0;
- float fog_sun_scatter = 0.0;
- float fog_density = 0.001;
- float fog_height = 0.0;
- float fog_height_density = 0.0; //can be negative to invert effect
- float fog_aerial_perspective = 0.0;
-
- /// Volumetric Fog
- ///
- bool volumetric_fog_enabled = false;
- float volumetric_fog_density = 0.01;
- Color volumetric_fog_scattering = Color(1, 1, 1);
- Color volumetric_fog_emission = Color(0, 0, 0);
- float volumetric_fog_emission_energy = 0.0;
- float volumetric_fog_anisotropy = 0.2;
- float volumetric_fog_length = 64.0;
- float volumetric_fog_detail_spread = 2.0;
- float volumetric_fog_gi_inject = 0.0;
- bool volumetric_fog_temporal_reprojection = true;
- float volumetric_fog_temporal_reprojection_amount = 0.9;
- float volumetric_fog_ambient_inject = 0.0;
-
- /// Glow
-
- bool glow_enabled = false;
- Vector<float> glow_levels;
- float glow_intensity = 0.8;
- float glow_strength = 1.0;
- float glow_bloom = 0.0;
- float glow_mix = 0.01;
- RS::EnvironmentGlowBlendMode glow_blend_mode = RS::ENV_GLOW_BLEND_MODE_SOFTLIGHT;
- float glow_hdr_bleed_threshold = 1.0;
- float glow_hdr_luminance_cap = 12.0;
- float glow_hdr_bleed_scale = 2.0;
- float glow_map_strength = 0.0f;
- RID glow_map = RID();
-
- /// SSAO
-
- bool ssao_enabled = false;
- float ssao_radius = 1.0;
- float ssao_intensity = 2.0;
- float ssao_power = 1.5;
- float ssao_detail = 0.5;
- float ssao_horizon = 0.06;
- float ssao_sharpness = 0.98;
- float ssao_direct_light_affect = 0.0;
- float ssao_ao_channel_affect = 0.0;
-
- /// SSR
- ///
- bool ssr_enabled = false;
- int ssr_max_steps = 64;
- float ssr_fade_in = 0.15;
- float ssr_fade_out = 2.0;
- float ssr_depth_tolerance = 0.2;
-
- /// SSIL
- ///
- bool ssil_enabled = false;
- float ssil_radius = 5.0;
- float ssil_intensity = 1.0;
- float ssil_sharpness = 0.98;
- float ssil_normal_rejection = 1.0;
-
- /// SDFGI
- bool sdfgi_enabled = false;
- int sdfgi_cascades = 4;
- float sdfgi_min_cell_size = 0.2;
- bool sdfgi_use_occlusion = false;
- float sdfgi_bounce_feedback = 0.5;
- bool sdfgi_read_sky_light = true;
- float sdfgi_energy = 1.0;
- float sdfgi_normal_bias = 1.1;
- float sdfgi_probe_bias = 1.1;
- RS::EnvironmentSDFGIYScale sdfgi_y_scale = RS::ENV_SDFGI_Y_SCALE_75_PERCENT;
-
- /// Adjustments
-
- bool adjustments_enabled = false;
- float adjustments_brightness = 1.0f;
- float adjustments_contrast = 1.0f;
- float adjustments_saturation = 1.0f;
- bool use_1d_color_correction = false;
- RID color_correction = RID();
-
- void set_ambient_light(const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source);
- void set_tonemap(RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale);
- void set_glow(bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map);
- void set_sdfgi(bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
- void set_fog(bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective);
- void set_volumetric_fog(bool p_enable, float p_density, const Color &p_scatterin, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject);
- void set_ssr(bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance);
- void set_ssao(bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect);
-};
-
-#endif // RENDERER_SCENE_ENVIRONMENT_RD_H
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index 3161f03192..cf231fa4ef 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -51,9 +51,8 @@ void get_vogel_disk(float *r_kernel, int p_sample_count) {
}
void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment, const Vector3 &p_world_position) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
- bool needs_sdfgi = env && env->sdfgi_enabled;
+ bool needs_sdfgi = p_environment.is_valid() && environment_get_sdfgi_enabled(p_environment);
if (!needs_sdfgi) {
if (rb->sdfgi != nullptr) {
@@ -68,7 +67,7 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
static const uint32_t history_frames_to_converge[RS::ENV_SDFGI_CONVERGE_MAX] = { 5, 10, 15, 20, 25, 30 };
uint32_t requested_history_size = history_frames_to_converge[gi.sdfgi_frames_to_converge];
- if (rb->sdfgi && (rb->sdfgi->num_cascades != env->sdfgi_cascades || rb->sdfgi->min_cell_size != env->sdfgi_min_cell_size || requested_history_size != rb->sdfgi->history_size || rb->sdfgi->uses_occlusion != env->sdfgi_use_occlusion || rb->sdfgi->y_scale_mode != env->sdfgi_y_scale)) {
+ if (rb->sdfgi && (rb->sdfgi->num_cascades != environment_get_sdfgi_cascades(p_environment) || rb->sdfgi->min_cell_size != environment_get_sdfgi_min_cell_size(p_environment) || requested_history_size != rb->sdfgi->history_size || rb->sdfgi->uses_occlusion != environment_get_sdfgi_use_occlusion(p_environment) || rb->sdfgi->y_scale_mode != environment_get_sdfgi_y_scale(p_environment))) {
//configuration changed, erase
rb->sdfgi->erase();
memdelete(rb->sdfgi);
@@ -78,10 +77,10 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
RendererRD::GI::SDFGI *sdfgi = rb->sdfgi;
if (sdfgi == nullptr) {
// re-create
- rb->sdfgi = gi.create_sdfgi(env, p_world_position, requested_history_size);
+ rb->sdfgi = gi.create_sdfgi(p_environment, p_world_position, requested_history_size);
} else {
//check for updates
- rb->sdfgi->update(env, p_world_position);
+ rb->sdfgi->update(p_environment, p_world_position);
}
}
@@ -159,145 +158,6 @@ Ref<Image> RendererSceneRenderRD::sky_bake_panorama(RID p_sky, float p_energy, b
return sky.sky_bake_panorama(p_sky, p_energy, p_bake_irradiance, p_size);
}
-RID RendererSceneRenderRD::environment_allocate() {
- return environment_owner.allocate_rid();
-}
-void RendererSceneRenderRD::environment_initialize(RID p_rid) {
- environment_owner.initialize_rid(p_rid, RendererSceneEnvironmentRD());
-}
-
-void RendererSceneRenderRD::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->background = p_bg;
-}
-
-void RendererSceneRenderRD::environment_set_sky(RID p_env, RID p_sky) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky = p_sky;
-}
-
-void RendererSceneRenderRD::environment_set_sky_custom_fov(RID p_env, float p_scale) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky_custom_fov = p_scale;
-}
-
-void RendererSceneRenderRD::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->sky_orientation = p_orientation;
-}
-
-void RendererSceneRenderRD::environment_set_bg_color(RID p_env, const Color &p_color) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->bg_color = p_color;
-}
-
-void RendererSceneRenderRD::environment_set_bg_energy(RID p_env, float p_energy) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->bg_energy = p_energy;
-}
-
-void RendererSceneRenderRD::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->canvas_max_layer = p_max_layer;
-}
-
-void RendererSceneRenderRD::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->set_ambient_light(p_color, p_ambient, p_energy, p_sky_contribution, p_reflection_source);
-}
-
-RS::EnvironmentBG RendererSceneRenderRD::environment_get_background(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, RS::ENV_BG_MAX);
- return env->background;
-}
-
-RID RendererSceneRenderRD::environment_get_sky(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, RID());
- return env->sky;
-}
-
-float RendererSceneRenderRD::environment_get_sky_custom_fov(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->sky_custom_fov;
-}
-
-Basis RendererSceneRenderRD::environment_get_sky_orientation(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Basis());
- return env->sky_orientation;
-}
-
-Color RendererSceneRenderRD::environment_get_bg_color(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Color());
- return env->bg_color;
-}
-
-float RendererSceneRenderRD::environment_get_bg_energy(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->bg_energy;
-}
-
-int RendererSceneRenderRD::environment_get_canvas_max_layer(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->canvas_max_layer;
-}
-
-Color RendererSceneRenderRD::environment_get_ambient_light_color(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Color());
- return env->ambient_light;
-}
-
-RS::EnvironmentAmbientSource RendererSceneRenderRD::environment_get_ambient_source(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, RS::ENV_AMBIENT_SOURCE_BG);
- return env->ambient_source;
-}
-
-float RendererSceneRenderRD::environment_get_ambient_light_energy(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->ambient_light_energy;
-}
-
-float RendererSceneRenderRD::environment_get_ambient_sky_contribution(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->ambient_sky_contribution;
-}
-
-RS::EnvironmentReflectionSource RendererSceneRenderRD::environment_get_reflection_source(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, RS::ENV_REFLECTION_SOURCE_DISABLED);
- return env->reflection_source;
-}
-
-void RendererSceneRenderRD::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->set_tonemap(p_tone_mapper, p_exposure, p_white, p_auto_exposure, p_min_luminance, p_max_luminance, p_auto_exp_speed, p_auto_exp_scale);
-}
-
-void RendererSceneRenderRD::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
- env->set_glow(p_enable, p_levels, p_intensity, p_strength, p_mix, p_bloom_threshold, p_blend_mode, p_hdr_bleed_threshold, p_hdr_bleed_scale, p_hdr_luminance_cap, p_glow_map_strength, p_glow_map);
-}
-
void RendererSceneRenderRD::environment_glow_set_use_bicubic_upscale(bool p_enable) {
glow_bicubic_upscale = p_enable;
}
@@ -306,79 +166,6 @@ void RendererSceneRenderRD::environment_glow_set_use_high_quality(bool p_enable)
glow_high_quality = p_enable;
}
-void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- if (!is_dynamic_gi_supported()) {
- return;
- }
-
- env->set_sdfgi(p_enable, p_cascades, p_min_cell_size, p_y_scale, p_use_occlusion, p_bounce_feedback, p_read_sky, p_energy, p_normal_bias, p_probe_bias);
-}
-
-void RendererSceneRenderRD::environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- env->set_fog(p_enable, p_light_color, p_light_energy, p_sun_scatter, p_density, p_height, p_height_density, p_fog_aerial_perspective);
-}
-
-bool RendererSceneRenderRD::environment_is_fog_enabled(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, false);
-
- return env->fog_enabled;
-}
-Color RendererSceneRenderRD::environment_get_fog_light_color(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Color());
- return env->fog_light_color;
-}
-float RendererSceneRenderRD::environment_get_fog_light_energy(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->fog_light_energy;
-}
-float RendererSceneRenderRD::environment_get_fog_sun_scatter(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->fog_sun_scatter;
-}
-float RendererSceneRenderRD::environment_get_fog_density(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->fog_density;
-}
-float RendererSceneRenderRD::environment_get_fog_height(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
-
- return env->fog_height;
-}
-float RendererSceneRenderRD::environment_get_fog_height_density(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->fog_height_density;
-}
-
-float RendererSceneRenderRD::environment_get_fog_aerial_perspective(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0);
- return env->fog_aerial_perspective;
-}
-
-void RendererSceneRenderRD::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- if (!is_volumetric_supported()) {
- return;
- }
-
- env->set_volumetric_fog(p_enable, p_density, p_albedo, p_emission, p_emission_energy, p_anisotropy, p_length, p_detail_spread, p_gi_inject, p_temporal_reprojection, p_temporal_reprojection_amount, p_ambient_inject);
-}
-
void RendererSceneRenderRD::environment_set_volumetric_fog_volume_size(int p_size, int p_depth) {
volumetric_fog_size = p_size;
volumetric_fog_depth = p_depth;
@@ -399,13 +186,6 @@ void RendererSceneRenderRD::environment_set_sdfgi_frames_to_update_light(RS::Env
gi.sdfgi_frames_to_update_light = p_update;
}
-void RendererSceneRenderRD::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- env->set_ssr(p_enable, p_max_steps, p_fade_int, p_fade_out, p_depth_tolerance);
-}
-
void RendererSceneRenderRD::environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) {
ssr_roughness_quality = p_quality;
}
@@ -414,13 +194,6 @@ RS::EnvironmentSSRRoughnessQuality RendererSceneRenderRD::environment_get_ssr_ro
return ssr_roughness_quality;
}
-void RendererSceneRenderRD::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- env->set_ssao(p_enable, p_radius, p_intensity, p_power, p_detail, p_horizon, p_sharpness, p_light_affect, p_ao_channel_affect);
-}
-
void RendererSceneRenderRD::environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) {
ssao_quality = p_quality;
ssao_half_size = p_half_size;
@@ -430,17 +203,6 @@ void RendererSceneRenderRD::environment_set_ssao_quality(RS::EnvironmentSSAOQual
ssao_fadeout_to = p_fadeout_to;
}
-void RendererSceneRenderRD::environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- env->ssil_enabled = p_enable;
- env->ssil_radius = p_radius;
- env->ssil_intensity = p_intensity;
- env->ssil_sharpness = p_sharpness;
- env->ssil_normal_rejection = p_normal_rejection;
-}
-
void RendererSceneRenderRD::environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) {
ssil_quality = p_quality;
ssil_half_size = p_half_size;
@@ -450,56 +212,16 @@ void RendererSceneRenderRD::environment_set_ssil_quality(RS::EnvironmentSSILQual
ssil_fadeout_to = p_fadeout_to;
}
-bool RendererSceneRenderRD::environment_is_ssao_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, false);
- return env->ssao_enabled;
-}
-
-float RendererSceneRenderRD::environment_get_ssao_ao_affect(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0.0);
- return env->ssao_ao_channel_affect;
-}
-
-float RendererSceneRenderRD::environment_get_ssao_light_affect(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, 0.0);
- return env->ssao_direct_light_affect;
-}
-
-bool RendererSceneRenderRD::environment_is_ssil_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, false);
- return env->ssil_enabled;
-}
-
-bool RendererSceneRenderRD::environment_is_ssr_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, false);
- return env->ssr_enabled;
-}
-bool RendererSceneRenderRD::environment_is_sdfgi_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, false);
- return env->sdfgi_enabled;
-}
-
-bool RendererSceneRenderRD::is_environment(RID p_env) const {
- return environment_owner.owns(p_env);
-}
-
Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND_V(!env, Ref<Image>());
+ ERR_FAIL_COND_V(p_env.is_null(), Ref<Image>());
- RS::EnvironmentBG environment_background = env->background;
+ RS::EnvironmentBG environment_background = environment_get_background(p_env);
if (environment_background == RS::ENV_BG_CAMERA_FEED || environment_background == RS::ENV_BG_CANVAS || environment_background == RS::ENV_BG_KEEP) {
return Ref<Image>(); //nothing to bake
}
- RS::EnvironmentAmbientSource ambient_source = env->ambient_source;
+ RS::EnvironmentAmbientSource ambient_source = environment_get_ambient_source(p_env);
bool use_ambient_light = false;
bool use_cube_map = false;
@@ -509,14 +231,14 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
use_cube_map = (ambient_source == RS::ENV_AMBIENT_SOURCE_BG && environment_background == RS::ENV_BG_SKY) || ambient_source == RS::ENV_AMBIENT_SOURCE_SKY;
use_ambient_light = use_cube_map || ambient_source == RS::ENV_AMBIENT_SOURCE_COLOR;
}
- use_cube_map = use_cube_map || (environment_background == RS::ENV_BG_SKY && env->sky.is_valid());
+ use_cube_map = use_cube_map || (environment_background == RS::ENV_BG_SKY && environment_get_sky(p_env).is_valid());
Color ambient_color;
- float ambient_color_sky_mix;
+ float ambient_color_sky_mix = 0.0;
if (use_ambient_light) {
- ambient_color_sky_mix = env->ambient_sky_contribution;
- const float ambient_energy = env->ambient_light_energy;
- ambient_color = env->ambient_light;
+ ambient_color_sky_mix = environment_get_ambient_sky_contribution(p_env);
+ const float ambient_energy = environment_get_ambient_light_energy(p_env);
+ ambient_color = environment_get_ambient_light(p_env);
ambient_color = ambient_color.srgb_to_linear();
ambient_color.r *= ambient_energy;
ambient_color.g *= ambient_energy;
@@ -524,7 +246,7 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
}
if (use_cube_map) {
- Ref<Image> panorama = sky_bake_panorama(env->sky, env->bg_energy, p_bake_irradiance, p_size);
+ Ref<Image> panorama = sky_bake_panorama(environment_get_sky(p_env), environment_get_bg_energy(p_env), p_bake_irradiance, p_size);
if (use_ambient_light) {
for (int x = 0; x < p_size.width; x++) {
for (int y = 0; y < p_size.height; y++) {
@@ -534,8 +256,8 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
}
return panorama;
} else {
- const float bg_energy = env->bg_energy;
- Color panorama_color = ((environment_background == RS::ENV_BG_CLEAR_COLOR) ? RSG::texture_storage->get_default_clear_color() : env->bg_color);
+ const float bg_energy = environment_get_bg_energy(p_env);
+ Color panorama_color = ((environment_background == RS::ENV_BG_CLEAR_COLOR) ? RSG::texture_storage->get_default_clear_color() : environment_get_bg_color(p_env));
panorama_color = panorama_color.srgb_to_linear();
panorama_color.r *= bg_energy;
panorama_color.g *= bg_energy;
@@ -1525,7 +1247,7 @@ bool RendererSceneRenderRD::voxel_gi_needs_update(RID p_probe) const {
return gi.voxel_gi_needs_update(p_probe);
}
-void RendererSceneRenderRD::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<GeometryInstance *> &p_dynamic_objects) {
+void RendererSceneRenderRD::voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) {
if (!is_dynamic_gi_supported()) {
return;
}
@@ -1944,10 +1666,9 @@ void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_frameb
return;
}
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
- ERR_FAIL_COND(!env);
+ ERR_FAIL_COND(p_environment.is_null());
- ERR_FAIL_COND(!env->ssr_enabled);
+ ERR_FAIL_COND(!environment_get_ssr_enabled(p_environment));
Size2i half_size = Size2i(rb->internal_width / 2, rb->internal_height / 2);
if (rb->ssr.output.is_null()) {
@@ -1959,7 +1680,7 @@ void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_frameb
texture_slices[v] = rb->views[v].view_texture;
depth_slices[v] = rb->views[v].view_depth;
}
- ss_effects->screen_space_reflection(rb->ssr, texture_slices, p_normal_slices, ssr_roughness_quality, p_metallic_slices, p_metallic_mask, depth_slices, half_size, env->ssr_max_steps, env->ssr_fade_in, env->ssr_fade_out, env->ssr_depth_tolerance, rb->view_count, p_projections, p_eye_offsets);
+ ss_effects->screen_space_reflection(rb->ssr, texture_slices, p_normal_slices, ssr_roughness_quality, p_metallic_slices, p_metallic_mask, depth_slices, half_size, environment_get_ssr_max_steps(p_environment), environment_get_ssr_fade_in(p_environment), environment_get_ssr_fade_out(p_environment), environment_get_ssr_depth_tolerance(p_environment), rb->view_count, p_projections, p_eye_offsets);
copy_effects->merge_specular(p_dest_framebuffer, p_specular_buffer, p_use_additive ? RID() : rb->internal_texture, rb->ssr.output, rb->view_count);
}
@@ -1969,18 +1690,17 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
- ERR_FAIL_COND(!env);
+ ERR_FAIL_COND(p_environment.is_null());
RENDER_TIMESTAMP("Process SSAO");
RendererRD::SSEffects::SSAOSettings settings;
- settings.radius = env->ssao_radius;
- settings.intensity = env->ssao_intensity;
- settings.power = env->ssao_power;
- settings.detail = env->ssao_detail;
- settings.horizon = env->ssao_horizon;
- settings.sharpness = env->ssao_sharpness;
+ settings.radius = environment_get_ssao_radius(p_environment);
+ settings.intensity = environment_get_ssao_intensity(p_environment);
+ settings.power = environment_get_ssao_power(p_environment);
+ settings.detail = environment_get_ssao_detail(p_environment);
+ settings.horizon = environment_get_ssao_horizon(p_environment);
+ settings.sharpness = environment_get_ssao_sharpness(p_environment);
settings.quality = ssao_quality;
settings.half_size = ssao_half_size;
@@ -2000,16 +1720,15 @@ void RendererSceneRenderRD::_process_ssil(RID p_render_buffers, RID p_environmen
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
- ERR_FAIL_COND(!env);
+ ERR_FAIL_COND(p_environment.is_null());
RENDER_TIMESTAMP("Process SSIL");
RendererRD::SSEffects::SSILSettings settings;
- settings.radius = env->ssil_radius;
- settings.intensity = env->ssil_intensity;
- settings.sharpness = env->ssil_sharpness;
- settings.normal_rejection = env->ssil_normal_rejection;
+ settings.radius = environment_get_ssil_radius(p_environment);
+ settings.intensity = environment_get_ssil_intensity(p_environment);
+ settings.sharpness = environment_get_ssil_sharpness(p_environment);
+ settings.normal_rejection = environment_get_ssil_normal_rejection(p_environment);
settings.quality = ssil_quality;
settings.half_size = ssil_half_size;
@@ -2141,7 +1860,6 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
// Glow and override exposure (if enabled).
CameraEffects *camfx = camera_effects_owner.get_or_null(p_render_data->camera_effects);
@@ -2201,21 +1919,21 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
RD::get_singleton()->draw_command_end_label();
}
- if (can_use_effects && env && env->auto_exposure) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_auto_exposure(p_render_data->environment)) {
RENDER_TIMESTAMP("Auto exposure");
RD::get_singleton()->draw_command_begin_label("Auto exposure");
if (rb->luminance.current.is_null()) {
_allocate_luminance_textures(rb);
}
- bool set_immediate = env->auto_exposure_version != rb->auto_exposure_version;
- rb->auto_exposure_version = env->auto_exposure_version;
+ bool set_immediate = environment_get_auto_exposure_version(p_render_data->environment) != rb->auto_exposure_version;
+ rb->auto_exposure_version = environment_get_auto_exposure_version(p_render_data->environment);
- double step = env->auto_exp_speed * time_step;
+ double step = environment_get_auto_exp_speed(p_render_data->environment) * time_step;
if (can_use_storage) {
- RendererCompositorRD::singleton->get_effects()->luminance_reduction(rb->internal_texture, Size2i(rb->internal_width, rb->internal_height), rb->luminance.reduce, rb->luminance.current, env->min_luminance, env->max_luminance, step, set_immediate);
+ RendererCompositorRD::singleton->get_effects()->luminance_reduction(rb->internal_texture, Size2i(rb->internal_width, rb->internal_height), rb->luminance.reduce, rb->luminance.current, environment_get_min_luminance(p_render_data->environment), environment_get_max_luminance(p_render_data->environment), step, set_immediate);
} else {
- RendererCompositorRD::singleton->get_effects()->luminance_reduction_raster(rb->internal_texture, Size2i(rb->internal_width, rb->internal_height), rb->luminance.reduce, rb->luminance.fb, rb->luminance.current, env->min_luminance, env->max_luminance, step, set_immediate);
+ RendererCompositorRD::singleton->get_effects()->luminance_reduction_raster(rb->internal_texture, Size2i(rb->internal_width, rb->internal_height), rb->luminance.reduce, rb->luminance.fb, rb->luminance.current, environment_get_min_luminance(p_render_data->environment), environment_get_max_luminance(p_render_data->environment), step, set_immediate);
}
// Swap final reduce with prev luminance.
SWAP(rb->luminance.current, rb->luminance.reduce.write[rb->luminance.reduce.size() - 1]);
@@ -2229,7 +1947,7 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
int max_glow_level = -1;
- if (can_use_effects && env && env->glow_enabled) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_glow_enabled(p_render_data->environment)) {
RENDER_TIMESTAMP("Glow");
RD::get_singleton()->draw_command_begin_label("Gaussian Glow");
@@ -2240,7 +1958,7 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
}
for (int i = 0; i < RS::MAX_GLOW_LEVELS; i++) {
- if (env->glow_levels[i] > 0.0) {
+ if (environment_get_glow_levels(p_render_data->environment)[i] > 0.0) {
if (i >= rb->blur[1].layers[0].mipmaps.size()) {
max_glow_level = rb->blur[1].layers[0].mipmaps.size() - 1;
} else {
@@ -2257,19 +1975,19 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
if (i == 0) {
RID luminance_texture;
- if (env->auto_exposure && rb->luminance.current.is_valid()) {
+ if (environment_get_auto_exposure(p_render_data->environment) && rb->luminance.current.is_valid()) {
luminance_texture = rb->luminance.current;
}
if (can_use_storage) {
- copy_effects->gaussian_glow(rb->views[l].view_texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale);
+ copy_effects->gaussian_glow(rb->views[l].view_texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), environment_get_glow_strength(p_render_data->environment), glow_high_quality, true, environment_get_glow_hdr_luminance_cap(p_render_data->environment), environment_get_exposure(p_render_data->environment), environment_get_glow_bloom(p_render_data->environment), environment_get_glow_hdr_bleed_threshold(p_render_data->environment), environment_get_glow_hdr_bleed_scale(p_render_data->environment), luminance_texture, environment_get_auto_exp_scale(p_render_data->environment));
} else {
- copy_effects->gaussian_glow_raster(rb->views[l].view_texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality, true, env->glow_hdr_luminance_cap, env->exposure, env->glow_bloom, env->glow_hdr_bleed_threshold, env->glow_hdr_bleed_scale, luminance_texture, env->auto_exp_scale);
+ copy_effects->gaussian_glow_raster(rb->views[l].view_texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), environment_get_glow_strength(p_render_data->environment), glow_high_quality, true, environment_get_glow_hdr_luminance_cap(p_render_data->environment), environment_get_exposure(p_render_data->environment), environment_get_glow_bloom(p_render_data->environment), environment_get_glow_hdr_bleed_threshold(p_render_data->environment), environment_get_glow_hdr_bleed_scale(p_render_data->environment), luminance_texture, environment_get_auto_exp_scale(p_render_data->environment));
}
} else {
if (can_use_storage) {
- copy_effects->gaussian_glow(rb->blur[1].layers[l].mipmaps[i - 1].texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality);
+ copy_effects->gaussian_glow(rb->blur[1].layers[l].mipmaps[i - 1].texture, rb->blur[1].layers[l].mipmaps[i].texture, Size2i(vp_w, vp_h), environment_get_glow_strength(p_render_data->environment), glow_high_quality);
} else {
- copy_effects->gaussian_glow_raster(rb->blur[1].layers[l].mipmaps[i - 1].texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), env->glow_strength, glow_high_quality);
+ copy_effects->gaussian_glow_raster(rb->blur[1].layers[l].mipmaps[i - 1].texture, luminance_multiplier, rb->blur[1].layers[l].mipmaps[i].half_fb, rb->blur[1].layers[l].mipmaps[i].half_texture, rb->blur[1].layers[l].mipmaps[i].fb, Size2i(vp_w, vp_h), environment_get_glow_strength(p_render_data->environment), glow_high_quality);
}
}
}
@@ -2284,28 +2002,28 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
RendererRD::ToneMapper::TonemapSettings tonemap;
- if (can_use_effects && env && env->auto_exposure && rb->luminance.current.is_valid()) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_auto_exposure(p_render_data->environment) && rb->luminance.current.is_valid()) {
tonemap.use_auto_exposure = true;
tonemap.exposure_texture = rb->luminance.current;
- tonemap.auto_exposure_grey = env->auto_exp_scale;
+ tonemap.auto_exposure_grey = environment_get_auto_exp_scale(p_render_data->environment);
} else {
tonemap.exposure_texture = texture_storage->texture_rd_get_default(RendererRD::DEFAULT_RD_TEXTURE_WHITE);
}
- if (can_use_effects && env && env->glow_enabled) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_glow_enabled(p_render_data->environment)) {
tonemap.use_glow = true;
- tonemap.glow_mode = RendererRD::ToneMapper::TonemapSettings::GlowMode(env->glow_blend_mode);
- tonemap.glow_intensity = env->glow_blend_mode == RS::ENV_GLOW_BLEND_MODE_MIX ? env->glow_mix : env->glow_intensity;
+ tonemap.glow_mode = RendererRD::ToneMapper::TonemapSettings::GlowMode(environment_get_glow_blend_mode(p_render_data->environment));
+ tonemap.glow_intensity = environment_get_glow_blend_mode(p_render_data->environment) == RS::ENV_GLOW_BLEND_MODE_MIX ? environment_get_glow_mix(p_render_data->environment) : environment_get_glow_intensity(p_render_data->environment);
for (int i = 0; i < RS::MAX_GLOW_LEVELS; i++) {
- tonemap.glow_levels[i] = env->glow_levels[i];
+ tonemap.glow_levels[i] = environment_get_glow_levels(p_render_data->environment)[i];
}
tonemap.glow_texture_size.x = rb->blur[1].layers[0].mipmaps[0].width;
tonemap.glow_texture_size.y = rb->blur[1].layers[0].mipmaps[0].height;
tonemap.glow_use_bicubic_upscale = glow_bicubic_upscale;
tonemap.glow_texture = rb->blur[1].texture;
- if (env->glow_map.is_valid()) {
- tonemap.glow_map_strength = env->glow_map_strength;
- tonemap.glow_map = texture_storage->texture_get_rd_texture(env->glow_map);
+ if (environment_get_glow_map(p_render_data->environment).is_valid()) {
+ tonemap.glow_map_strength = environment_get_glow_map_strength(p_render_data->environment);
+ tonemap.glow_map = texture_storage->texture_get_rd_texture(environment_get_glow_map(p_render_data->environment));
} else {
tonemap.glow_map_strength = 0.0f;
tonemap.glow_map = texture_storage->texture_rd_get_default(RendererRD::DEFAULT_RD_TEXTURE_WHITE);
@@ -2323,10 +2041,10 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
tonemap.use_debanding = rb->use_debanding;
tonemap.texture_size = Vector2i(rb->internal_width, rb->internal_height);
- if (env) {
- tonemap.tonemap_mode = env->tone_mapper;
- tonemap.white = env->white;
- tonemap.exposure = env->exposure;
+ if (p_render_data->environment.is_valid()) {
+ tonemap.tonemap_mode = environment_get_tone_mapper(p_render_data->environment);
+ tonemap.white = environment_get_white(p_render_data->environment);
+ tonemap.exposure = environment_get_exposure(p_render_data->environment);
}
if (camfx && camfx->override_exposure_enabled) {
@@ -2337,15 +2055,15 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
tonemap.use_1d_color_correction = false;
tonemap.color_correction_texture = texture_storage->texture_rd_get_default(RendererRD::DEFAULT_RD_TEXTURE_3D_WHITE);
- if (can_use_effects && env) {
- tonemap.use_bcs = env->adjustments_enabled;
- tonemap.brightness = env->adjustments_brightness;
- tonemap.contrast = env->adjustments_contrast;
- tonemap.saturation = env->adjustments_saturation;
- if (env->adjustments_enabled && env->color_correction.is_valid()) {
+ if (can_use_effects && p_render_data->environment.is_valid()) {
+ tonemap.use_bcs = environment_get_adjustments_enabled(p_render_data->environment);
+ tonemap.brightness = environment_get_adjustments_brightness(p_render_data->environment);
+ tonemap.contrast = environment_get_adjustments_contrast(p_render_data->environment);
+ tonemap.saturation = environment_get_adjustments_saturation(p_render_data->environment);
+ if (environment_get_adjustments_enabled(p_render_data->environment) && environment_get_color_correction(p_render_data->environment).is_valid()) {
tonemap.use_color_correction = true;
- tonemap.use_1d_color_correction = env->use_1d_color_correction;
- tonemap.color_correction_texture = texture_storage->texture_get_rd_texture(env->color_correction);
+ tonemap.use_1d_color_correction = environment_get_use_1d_color_correction(p_render_data->environment);
+ tonemap.color_correction_texture = texture_storage->texture_get_rd_texture(environment_get_color_correction(p_render_data->environment));
}
}
@@ -2375,7 +2093,6 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
// Override exposure (if enabled).
CameraEffects *camfx = camera_effects_owner.get_or_null(p_render_data->camera_effects);
@@ -2385,10 +2102,10 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
RendererRD::ToneMapper::TonemapSettings tonemap;
- if (env) {
- tonemap.tonemap_mode = env->tone_mapper;
- tonemap.exposure = env->exposure;
- tonemap.white = env->white;
+ if (p_render_data->environment.is_valid()) {
+ tonemap.tonemap_mode = environment_get_tone_mapper(p_render_data->environment);
+ tonemap.exposure = environment_get_exposure(p_render_data->environment);
+ tonemap.white = environment_get_white(p_render_data->environment);
}
if (camfx && camfx->override_exposure_enabled) {
@@ -2398,10 +2115,10 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
// We don't support glow or auto exposure here, if they are needed, don't use subpasses!
// The problem is that we need to use the result so far and process them before we can
// apply this to our results.
- if (can_use_effects && env && env->glow_enabled) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_glow_enabled(p_render_data->environment)) {
ERR_FAIL_MSG("Glow is not supported when using subpasses.");
}
- if (can_use_effects && env && env->auto_exposure) {
+ if (can_use_effects && p_render_data->environment.is_valid() && environment_get_auto_exposure(p_render_data->environment)) {
ERR_FAIL_MSG("Glow is not supported when using subpasses.");
}
@@ -2415,15 +2132,15 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
tonemap.use_1d_color_correction = false;
tonemap.color_correction_texture = texture_storage->texture_rd_get_default(RendererRD::DEFAULT_RD_TEXTURE_3D_WHITE);
- if (can_use_effects && env) {
- tonemap.use_bcs = env->adjustments_enabled;
- tonemap.brightness = env->adjustments_brightness;
- tonemap.contrast = env->adjustments_contrast;
- tonemap.saturation = env->adjustments_saturation;
- if (env->adjustments_enabled && env->color_correction.is_valid()) {
+ if (can_use_effects && p_render_data->environment.is_valid()) {
+ tonemap.use_bcs = environment_get_adjustments_enabled(p_render_data->environment);
+ tonemap.brightness = environment_get_adjustments_brightness(p_render_data->environment);
+ tonemap.contrast = environment_get_adjustments_contrast(p_render_data->environment);
+ tonemap.saturation = environment_get_adjustments_saturation(p_render_data->environment);
+ if (environment_get_adjustments_enabled(p_render_data->environment) && environment_get_color_correction(p_render_data->environment).is_valid()) {
tonemap.use_color_correction = true;
- tonemap.use_1d_color_correction = env->use_1d_color_correction;
- tonemap.color_correction_texture = texture_storage->texture_get_rd_texture(env->color_correction);
+ tonemap.use_1d_color_correction = environment_get_use_1d_color_correction(p_render_data->environment);
+ tonemap.color_correction_texture = texture_storage->texture_get_rd_texture(environment_get_color_correction(p_render_data->environment));
}
}
@@ -2527,18 +2244,6 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID
}
}
-void RendererSceneRenderRD::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
- ERR_FAIL_COND(!env);
-
- env->adjustments_enabled = p_enable;
- env->adjustments_brightness = p_brightness;
- env->adjustments_contrast = p_contrast;
- env->adjustments_saturation = p_saturation;
- env->use_1d_color_correction = p_use_1d_color_correction;
- env->color_correction = p_color_correction;
-}
-
RID RendererSceneRenderRD::render_buffers_get_back_buffer_texture(RID p_render_buffers) {
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
@@ -2743,7 +2448,7 @@ bool RendererSceneRenderRD::_render_buffers_can_be_storage() {
return true;
}
-void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RenderingServer::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) {
+void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RenderingServer::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) {
RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton();
RendererRD::MaterialStorage *material_storage = RendererRD::MaterialStorage::get_singleton();
@@ -2754,11 +2459,9 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
p_internal_width = p_width;
}
- if (p_width != p_internal_width) {
- float fsr_mipmap_bias = -log2f(p_width / p_internal_width) + p_fsr_mipmap_bias;
- material_storage->sampler_rd_configure_custom(fsr_mipmap_bias);
- update_uniform_sets();
- }
+ const float texture_mipmap_bias = -log2f(p_width / p_internal_width) + p_texture_mipmap_bias;
+ material_storage->sampler_rd_configure_custom(texture_mipmap_bias);
+ update_uniform_sets();
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
@@ -3692,7 +3395,6 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
ERR_FAIL_COND(!is_clustered_enabled()); // can't use volumetric fog without clustered
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
float ratio = float(rb->width) / float((rb->width + rb->height) / 2);
uint32_t target_width = uint32_t(float(volumetric_fog_size) * ratio);
@@ -3700,18 +3402,18 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
if (rb->volumetric_fog) {
//validate
- if (!env || !env->volumetric_fog_enabled || rb->volumetric_fog->width != target_width || rb->volumetric_fog->height != target_height || rb->volumetric_fog->depth != volumetric_fog_depth) {
+ if (p_environment.is_null() || !environment_get_volumetric_fog_enabled(p_environment) || rb->volumetric_fog->width != target_width || rb->volumetric_fog->height != target_height || rb->volumetric_fog->depth != volumetric_fog_depth) {
memdelete(rb->volumetric_fog);
rb->volumetric_fog = nullptr;
}
}
- if (!env || !env->volumetric_fog_enabled) {
+ if (p_environment.is_null() || !environment_get_volumetric_fog_enabled(p_environment)) {
//no reason to enable or update, bye
return;
}
- if (env && env->volumetric_fog_enabled && !rb->volumetric_fog) {
+ if (p_environment.is_valid() && environment_get_volumetric_fog_enabled(p_environment) && !rb->volumetric_fog) {
//required volumetric fog but not existing, create
rb->volumetric_fog = memnew(RendererRD::Fog::VolumetricFog(Vector3i(target_width, target_height, volumetric_fog_depth), sky.sky_shader.default_shader_rd));
}
@@ -3737,7 +3439,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
settings.cluster_builder = rb->cluster_builder;
settings.rbgi = &rb->rbgi;
settings.sdfgi = rb->sdfgi;
- settings.env = env;
+ settings.env = p_environment;
settings.sky = &sky;
settings.gi = &gi;
@@ -3764,8 +3466,7 @@ void RendererSceneRenderRD::_post_prepass_render(RenderDataRD *p_render_data, bo
return;
}
- RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
- rb->sdfgi->update_probes(env, sky.sky_owner.get_or_null(env->sky));
+ rb->sdfgi->update_probes(p_render_data->environment, sky.sky_owner.get_or_null(environment_get_sky(p_render_data->environment)));
}
}
}
@@ -3947,7 +3648,7 @@ void RendererSceneRenderRD::_pre_opaque_render(RenderDataRD *p_render_data, bool
}
}
-void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) {
+void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data, RendererScene::RenderInfo *r_render_info) {
RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton();
// getting this here now so we can direct call a bunch of things more easily
@@ -4142,7 +3843,7 @@ void RendererSceneRenderRD::_debug_draw_cluster(RID p_render_buffers) {
}
}
-void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, bool p_open_pass, bool p_close_pass, bool p_clear_region, RendererScene::RenderInfo *p_render_info) {
+void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<RenderGeometryInstance *> &p_instances, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_mesh_lod_threshold, bool p_open_pass, bool p_close_pass, bool p_clear_region, RendererScene::RenderInfo *p_render_info) {
LightInstance *light_instance = light_instance_owner.get_or_null(p_light);
ERR_FAIL_COND(!light_instance);
@@ -4314,11 +4015,11 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
}
}
-void RendererSceneRenderRD::render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
+void RendererSceneRenderRD::render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
_render_material(p_cam_transform, p_cam_projection, p_cam_orthogonal, p_instances, p_framebuffer, p_region);
}
-void RendererSceneRenderRD::render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) {
+void RendererSceneRenderRD::render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) {
RendererRD::ParticlesStorage *particles_storage = RendererRD::ParticlesStorage::get_singleton();
ERR_FAIL_COND(!particles_storage->particles_collision_is_heightfield(p_collider));
@@ -4355,9 +4056,8 @@ bool RendererSceneRenderRD::free(RID p_rid) {
memdelete(rb->cluster_builder);
}
render_buffers_owner.free(p_rid);
- } else if (environment_owner.owns(p_rid)) {
- //not much to delete, just free it
- environment_owner.free(p_rid);
+ } else if (is_environment(p_rid)) {
+ environment_free(p_rid);
} else if (camera_effects_owner.owns(p_rid)) {
//not much to delete, just free it
camera_effects_owner.free(p_rid);
@@ -4497,7 +4197,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto
//RID sampled_light;
- GeometryInstance *gi = geometry_instance_create(p_base);
+ RenderGeometryInstance *gi = geometry_instance_create(p_base);
uint32_t sc = RSG::mesh_storage->mesh_get_surface_count(p_base);
Vector<RID> materials;
@@ -4509,7 +4209,7 @@ TypedArray<Image> RendererSceneRenderRD::bake_render_uv2(RID p_base, const Vecto
}
}
- geometry_instance_set_surface_materials(gi, materials);
+ gi->set_surface_materials(materials);
if (cull_argument.size() == 0) {
cull_argument.push_back(nullptr);
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
index cd56b8efb3..09ec2a9efd 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
@@ -43,7 +43,6 @@
#include "servers/rendering/renderer_rd/environment/fog.h"
#include "servers/rendering/renderer_rd/environment/gi.h"
#include "servers/rendering/renderer_rd/environment/sky.h"
-#include "servers/rendering/renderer_rd/renderer_scene_environment_rd.h"
#include "servers/rendering/renderer_scene.h"
#include "servers/rendering/renderer_scene_render.h"
#include "servers/rendering/rendering_device.h"
@@ -69,7 +68,7 @@ struct RenderDataRD {
float z_near = 0.0;
float z_far = 0.0;
- const PagedArray<RendererSceneRender::GeometryInstance *> *instances = nullptr;
+ const PagedArray<RenderGeometryInstance *> *instances = nullptr;
const PagedArray<RID> *lights = nullptr;
const PagedArray<RID> *reflection_probes = nullptr;
const PagedArray<RID> *voxel_gi_instances = nullptr;
@@ -122,14 +121,14 @@ protected:
virtual void _render_scene(RenderDataRD *p_render_data, const Color &p_default_color) = 0;
virtual void _render_shadow_begin() = 0;
- virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) = 0;
+ virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<RenderGeometryInstance *> &p_instances, const Projection &p_projection, const Transform3D &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_mesh_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true, RendererScene::RenderInfo *p_render_info = nullptr) = 0;
virtual void _render_shadow_process() = 0;
virtual void _render_shadow_end(uint32_t p_barrier = RD::BARRIER_MASK_ALL) = 0;
- virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
- virtual void _render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
- virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) = 0;
- virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) = 0;
+ virtual void _render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
+ virtual void _render_uv2(const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
+ virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<RenderGeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) = 0;
+ virtual void _render_particle_collider_heightfield(RID p_fb, const Transform3D &p_cam_transform, const Projection &p_cam_projection, const PagedArray<RenderGeometryInstance *> &p_instances) = 0;
void _debug_sdfgi_probes(RID p_render_buffers, RID p_framebuffer, uint32_t p_view_count, const Projection *p_camera_with_transforms, bool p_will_continue_color, bool p_will_continue_depth);
void _debug_draw_cluster(RID p_render_buffers);
@@ -161,21 +160,13 @@ protected:
void _disable_clear_request(const RenderDataRD *p_render_data);
// needed for a single argument calls (material and uv2)
- PagedArrayPool<GeometryInstance *> cull_argument_pool;
- PagedArray<GeometryInstance *> cull_argument; //need this to exist
+ PagedArrayPool<RenderGeometryInstance *> cull_argument_pool;
+ PagedArray<RenderGeometryInstance *> cull_argument; //need this to exist
RendererRD::SSEffects *ss_effects = nullptr;
RendererRD::GI gi;
RendererRD::SkyRD sky;
- RendererSceneEnvironmentRD *get_environment(RID p_environment) {
- if (p_environment.is_valid()) {
- return environment_owner.get_or_null(p_environment);
- } else {
- return nullptr;
- }
- };
-
//used for mobile renderer mostly
typedef int32_t ForwardID;
@@ -427,8 +418,6 @@ private:
bool glow_high_quality = false;
RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::ENV_SSR_ROUGHNESS_QUALITY_LOW;
- mutable RID_Owner<RendererSceneEnvironmentRD, true> environment_owner;
-
/* CAMERA EFFECTS */
struct CameraEffects {
@@ -750,7 +739,7 @@ private:
uint32_t max_cluster_elements = 512;
- void _render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_mesh_lod_threshold = 0.0, bool p_open_pass = true, bool p_close_pass = true, bool p_clear_region = true, RendererScene::RenderInfo *p_render_info = nullptr);
+ void _render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<RenderGeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_mesh_lod_threshold = 0.0, bool p_open_pass = true, bool p_close_pass = true, bool p_clear_region = true, RendererScene::RenderInfo *p_render_info = nullptr);
/* Volumetric Fog */
@@ -761,8 +750,7 @@ private:
void _update_volumetric_fog(RID p_render_buffers, RID p_environment, const Projection &p_cam_projection, const Transform3D &p_cam_transform, const Transform3D &p_prev_cam_inv_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_voxel_gi_count, const PagedArray<RID> &p_fog_volumes);
public:
- virtual Transform3D geometry_instance_get_transform(GeometryInstance *p_instance) = 0;
- virtual AABB geometry_instance_get_aabb(GeometryInstance *p_instance) = 0;
+ static RendererSceneRenderRD *get_singleton() { return singleton; }
/* GI */
@@ -824,65 +812,16 @@ public:
/* ENVIRONMENT API */
- virtual RID environment_allocate() override;
- virtual void environment_initialize(RID p_rid) override;
-
- virtual void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) override;
- virtual void environment_set_sky(RID p_env, RID p_sky) override;
- virtual void environment_set_sky_custom_fov(RID p_env, float p_scale) override;
- virtual void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) override;
- virtual void environment_set_bg_color(RID p_env, const Color &p_color) override;
- virtual void environment_set_bg_energy(RID p_env, float p_energy) override;
- virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) override;
- virtual void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG) override;
-
- virtual RS::EnvironmentBG environment_get_background(RID p_env) const override;
- RID environment_get_sky(RID p_env) const;
- float environment_get_sky_custom_fov(RID p_env) const;
- Basis environment_get_sky_orientation(RID p_env) const;
- Color environment_get_bg_color(RID p_env) const;
- float environment_get_bg_energy(RID p_env) const;
- virtual int environment_get_canvas_max_layer(RID p_env) const override;
- Color environment_get_ambient_light_color(RID p_env) const;
- RS::EnvironmentAmbientSource environment_get_ambient_source(RID p_env) const;
- float environment_get_ambient_light_energy(RID p_env) const;
- float environment_get_ambient_sky_contribution(RID p_env) const;
- RS::EnvironmentReflectionSource environment_get_reflection_source(RID p_env) const;
-
- virtual bool is_environment(RID p_env) const override;
-
- virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) override;
virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) override;
virtual void environment_glow_set_use_high_quality(bool p_enable) override;
- virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) override;
- bool environment_is_fog_enabled(RID p_env) const;
- Color environment_get_fog_light_color(RID p_env) const;
- float environment_get_fog_light_energy(RID p_env) const;
- float environment_get_fog_sun_scatter(RID p_env) const;
- float environment_get_fog_density(RID p_env) const;
- float environment_get_fog_height(RID p_env) const;
- float environment_get_fog_height_density(RID p_env) const;
- float environment_get_fog_aerial_perspective(RID p_env) const;
-
- virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) override;
-
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) override;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) override;
- virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) override;
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) override;
virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
- virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) override;
+
virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override;
- bool environment_is_ssao_enabled(RID p_env) const;
- float environment_get_ssao_ao_affect(RID p_env) const;
- float environment_get_ssao_light_affect(RID p_env) const;
- bool environment_is_ssil_enabled(RID p_env) const;
- bool environment_is_ssr_enabled(RID p_env) const;
- bool environment_is_sdfgi_enabled(RID p_env) const;
-
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override;
+
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override;
virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) override;
@@ -890,9 +829,6 @@ public:
virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override;
RS::EnvironmentSSRRoughnessQuality environment_get_ssr_roughness_quality() const;
- virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) override;
- virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) override;
-
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) override;
/* CAMERA EFFECTS */
@@ -1160,7 +1096,7 @@ public:
virtual RID voxel_gi_instance_create(RID p_base) override;
virtual void voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform) override;
virtual bool voxel_gi_needs_update(RID p_probe) const override;
- virtual void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RendererSceneRender::GeometryInstance *> &p_dynamic_objects) override;
+ virtual void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) override;
virtual void voxel_gi_set_quality(RS::VoxelGIQuality p_quality) override { gi.voxel_gi_quality = p_quality; }
/* render buffers */
@@ -1169,7 +1105,7 @@ public:
virtual RD::DataFormat _render_buffers_get_color_format();
virtual bool _render_buffers_can_be_storage();
virtual RID render_buffers_create() override;
- virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override;
+ virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) override;
virtual void gi_set_use_half_resolution(bool p_enable) override;
RID render_buffers_get_depth_texture(RID p_render_buffers);
@@ -1203,11 +1139,11 @@ public:
virtual void update_uniform_sets(){};
- virtual void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) override;
+ virtual void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) override;
- virtual void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
+ virtual void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override;
- virtual void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) override;
+ virtual void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) override;
virtual void set_scene_pass(uint64_t p_pass) override {
scene_pass = p_pass;
diff --git a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
index 12f57b0178..2ea6965c09 100644
--- a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
@@ -138,10 +138,10 @@ layout(set = 0, binding = 7) uniform texture2D sdf_texture;
layout(set = 0, binding = 8) uniform sampler material_samplers[12];
-layout(set = 0, binding = 9, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 9, std430) restrict readonly buffer GlobalShaderUniformData {
vec4 data[];
}
-global_variables;
+global_shader_uniforms;
/* SET1: Is reserved for the material */
diff --git a/servers/rendering/renderer_rd/shaders/environment/sky.glsl b/servers/rendering/renderer_rd/shaders/environment/sky.glsl
index 5b4594da99..e825020a4e 100644
--- a/servers/rendering/renderer_rd/shaders/environment/sky.glsl
+++ b/servers/rendering/renderer_rd/shaders/environment/sky.glsl
@@ -77,10 +77,10 @@ params;
layout(set = 0, binding = 0) uniform sampler material_samplers[12];
-layout(set = 0, binding = 1, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 1, std430) restrict readonly buffer GlobalShaderUniformData {
vec4 data[];
}
-global_variables;
+global_shader_uniforms;
layout(set = 0, binding = 2, std140) uniform SceneData {
bool volumetric_fog_enabled;
diff --git a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl
index fb3c725b1f..4658afd02d 100644
--- a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl
+++ b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl
@@ -28,10 +28,10 @@ layout(local_size_x = 4, local_size_y = 4, local_size_z = 4) in;
layout(set = 0, binding = 1) uniform sampler material_samplers[12];
-layout(set = 0, binding = 2, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 2, std430) restrict readonly buffer GlobalShaderUniformData {
vec4 data[];
}
-global_variables;
+global_shader_uniforms;
layout(push_constant, std430) uniform Params {
vec3 position;
diff --git a/servers/rendering/renderer_rd/shaders/particles.glsl b/servers/rendering/renderer_rd/shaders/particles.glsl
index acb62b812e..4369bddc83 100644
--- a/servers/rendering/renderer_rd/shaders/particles.glsl
+++ b/servers/rendering/renderer_rd/shaders/particles.glsl
@@ -25,10 +25,10 @@ layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
layout(set = 0, binding = 1) uniform sampler material_samplers[12];
-layout(set = 0, binding = 2, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 2, std430) restrict readonly buffer GlobalShaderUniformData {
vec4 data[];
}
-global_variables;
+global_shader_uniforms;
/* Set 1: FRAME AND PARTICLE DATA */
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
index b64d33996a..22058b3a06 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
@@ -947,9 +947,9 @@ void fragment_shader(in SceneData scene_data) {
if (decals.data[decal_index].emission_rect != vec4(0.0)) {
//emission is additive, so its independent from albedo
if (sc_decal_use_mipmaps) {
- emission += textureGrad(sampler2D(decal_atlas_srgb, decal_sampler), uv_local.xz * decals.data[decal_index].emission_rect.zw + decals.data[decal_index].emission_rect.xy, ddx * decals.data[decal_index].emission_rect.zw, ddy * decals.data[decal_index].emission_rect.zw).xyz * decals.data[decal_index].emission_energy * fade;
+ emission += textureGrad(sampler2D(decal_atlas_srgb, decal_sampler), uv_local.xz * decals.data[decal_index].emission_rect.zw + decals.data[decal_index].emission_rect.xy, ddx * decals.data[decal_index].emission_rect.zw, ddy * decals.data[decal_index].emission_rect.zw).xyz * decals.data[decal_index].modulate.rgb * decals.data[decal_index].emission_energy * fade;
} else {
- emission += textureLod(sampler2D(decal_atlas_srgb, decal_sampler), uv_local.xz * decals.data[decal_index].emission_rect.zw + decals.data[decal_index].emission_rect.xy, 0.0).xyz * decals.data[decal_index].emission_energy * fade;
+ emission += textureLod(sampler2D(decal_atlas_srgb, decal_sampler), uv_local.xz * decals.data[decal_index].emission_rect.zw + decals.data[decal_index].emission_rect.xy, 0.0).xyz * decals.data[decal_index].modulate.rgb * decals.data[decal_index].emission_energy * fade;
}
}
}
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered_inc.glsl
index 0c23de96c3..f0717294ef 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered_inc.glsl
@@ -129,10 +129,10 @@ layout(set = 0, binding = 13, std430) restrict readonly buffer Decals {
}
decals;
-layout(set = 0, binding = 14, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 14, std430) restrict readonly buffer GlobalShaderUniformData {
vec4 data[];
}
-global_variables;
+global_shader_uniforms;
struct SDFVoxelGICascadeData {
vec3 position;
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
index 7413d8730a..98ad674ce0 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
@@ -118,10 +118,10 @@ layout(set = 0, binding = 13, std430) restrict readonly buffer Decals {
}
decals;
-layout(set = 0, binding = 14, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 14, std430) restrict readonly buffer GlobalShaderUniformData {
highp vec4 data[];
}
-global_variables;
+global_shader_uniforms;
/* Set 1: Render Pass (changes per render pass) */
diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp
index 23d05de942..815b7a1fda 100644
--- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp
@@ -176,10 +176,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 2 * p_array_size;
const int *r = iv.ptr();
@@ -205,10 +201,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 3 * p_array_size;
const int *r = iv.ptr();
@@ -236,10 +228,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 4 * p_array_size;
const int *r = iv.ptr();
@@ -292,10 +280,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 2 * p_array_size;
const int *r = iv.ptr();
@@ -321,10 +305,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 3 * p_array_size;
const int *r = iv.ptr();
@@ -352,10 +332,6 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
if (p_array_size > 0) {
Vector<int> iv = value;
int s = iv.size();
-
- if (p_array_size <= 0) {
- p_array_size = 1;
- }
int count = 4 * p_array_size;
const int *r = iv.ptr();
@@ -967,7 +943,7 @@ void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguag
if (E.value.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL) {
//this is a global variable, get the index to it
- GlobalVariables::Variable *gv = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *gv = material_storage->global_shader_uniforms.variables.getptr(E.key);
uint32_t index = 0;
if (gv) {
index = gv->buffer_index;
@@ -1023,9 +999,9 @@ void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguag
if (uses_global_buffer != (global_buffer_E != nullptr)) {
if (uses_global_buffer) {
- global_buffer_E = material_storage->global_variables.materials_using_buffer.push_back(self);
+ global_buffer_E = material_storage->global_shader_uniforms.materials_using_buffer.push_back(self);
} else {
- material_storage->global_variables.materials_using_buffer.erase(global_buffer_E);
+ material_storage->global_shader_uniforms.materials_using_buffer.erase(global_buffer_E);
global_buffer_E = nullptr;
}
}
@@ -1036,20 +1012,20 @@ MaterialData::~MaterialData() {
if (global_buffer_E) {
//unregister global buffers
- material_storage->global_variables.materials_using_buffer.erase(global_buffer_E);
+ material_storage->global_shader_uniforms.materials_using_buffer.erase(global_buffer_E);
}
if (global_texture_E) {
//unregister global textures
for (const KeyValue<StringName, uint64_t> &E : used_global_textures) {
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(E.key);
if (v) {
v->texture_materials.erase(self);
}
}
//unregister material from those using global textures
- material_storage->global_variables.materials_using_texture.erase(global_texture_E);
+ material_storage->global_shader_uniforms.materials_using_texture.erase(global_texture_E);
}
if (uniform_buffer.is_valid()) {
@@ -1079,7 +1055,7 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
if (p_texture_uniforms[i].global) {
uses_global_textures = true;
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(uniform_name);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(uniform_name);
if (v) {
if (v->buffer_index >= 0) {
WARN_PRINT("Shader uses global uniform texture '" + String(uniform_name) + "', but it changed type and is no longer a texture!.");
@@ -1249,7 +1225,7 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
if (E.value != global_textures_pass) {
to_delete.push_back(E.key);
- GlobalVariables::Variable *v = material_storage->global_variables.variables.getptr(E.key);
+ GlobalShaderUniforms::Variable *v = material_storage->global_shader_uniforms.variables.getptr(E.key);
if (v) {
v->texture_materials.erase(self);
}
@@ -1263,9 +1239,9 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
//handle registering/unregistering global textures
if (uses_global_textures != (global_texture_E != nullptr)) {
if (uses_global_textures) {
- global_texture_E = material_storage->global_variables.materials_using_texture.push_back(self);
+ global_texture_E = material_storage->global_shader_uniforms.materials_using_texture.push_back(self);
} else {
- material_storage->global_variables.materials_using_texture.erase(global_texture_E);
+ material_storage->global_shader_uniforms.materials_using_texture.erase(global_texture_E);
global_texture_E = nullptr;
}
}
@@ -1497,22 +1473,22 @@ MaterialStorage::MaterialStorage() {
shader_data_request_func[i] = nullptr;
}
- static_assert(sizeof(GlobalVariables::Value) == 16);
+ static_assert(sizeof(GlobalShaderUniforms::Value) == 16);
- global_variables.buffer_size = MAX(4096, (int)GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size"));
- global_variables.buffer_values = memnew_arr(GlobalVariables::Value, global_variables.buffer_size);
- memset(global_variables.buffer_values, 0, sizeof(GlobalVariables::Value) * global_variables.buffer_size);
- global_variables.buffer_usage = memnew_arr(GlobalVariables::ValueUsage, global_variables.buffer_size);
- global_variables.buffer_dirty_regions = memnew_arr(bool, global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE);
- memset(global_variables.buffer_dirty_regions, 0, sizeof(bool) * global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE);
- global_variables.buffer = RD::get_singleton()->storage_buffer_create(sizeof(GlobalVariables::Value) * global_variables.buffer_size);
+ global_shader_uniforms.buffer_size = MAX(4096, (int)GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size"));
+ global_shader_uniforms.buffer_values = memnew_arr(GlobalShaderUniforms::Value, global_shader_uniforms.buffer_size);
+ memset(global_shader_uniforms.buffer_values, 0, sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size);
+ global_shader_uniforms.buffer_usage = memnew_arr(GlobalShaderUniforms::ValueUsage, global_shader_uniforms.buffer_size);
+ global_shader_uniforms.buffer_dirty_regions = memnew_arr(bool, global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE);
+ memset(global_shader_uniforms.buffer_dirty_regions, 0, sizeof(bool) * global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE);
+ global_shader_uniforms.buffer = RD::get_singleton()->storage_buffer_create(sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size);
}
MaterialStorage::~MaterialStorage() {
- memdelete_arr(global_variables.buffer_values);
- memdelete_arr(global_variables.buffer_usage);
- memdelete_arr(global_variables.buffer_dirty_regions);
- RD::get_singleton()->free(global_variables.buffer);
+ memdelete_arr(global_shader_uniforms.buffer_values);
+ memdelete_arr(global_shader_uniforms.buffer_usage);
+ memdelete_arr(global_shader_uniforms.buffer_dirty_regions);
+ RD::get_singleton()->free(global_shader_uniforms.buffer);
// buffers
@@ -1633,17 +1609,17 @@ void MaterialStorage::sampler_rd_configure_custom(float p_mipmap_bias) {
}
}
-/* GLOBAL VARIABLE API */
+/* GLOBAL SHADER UNIFORM API */
-int32_t MaterialStorage::_global_variable_allocate(uint32_t p_elements) {
+int32_t MaterialStorage::_global_shader_uniform_allocate(uint32_t p_elements) {
int32_t idx = 0;
- while (idx + p_elements <= global_variables.buffer_size) {
- if (global_variables.buffer_usage[idx].elements == 0) {
+ while (idx + p_elements <= global_shader_uniforms.buffer_size) {
+ if (global_shader_uniforms.buffer_usage[idx].elements == 0) {
bool valid = true;
for (uint32_t i = 1; i < p_elements; i++) {
- if (global_variables.buffer_usage[idx + i].elements > 0) {
+ if (global_shader_uniforms.buffer_usage[idx + i].elements > 0) {
valid = false;
- idx += i + global_variables.buffer_usage[idx + i].elements;
+ idx += i + global_shader_uniforms.buffer_usage[idx + i].elements;
break;
}
}
@@ -1654,17 +1630,17 @@ int32_t MaterialStorage::_global_variable_allocate(uint32_t p_elements) {
return idx;
} else {
- idx += global_variables.buffer_usage[idx].elements;
+ idx += global_shader_uniforms.buffer_usage[idx].elements;
}
}
return -1;
}
-void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::GlobalVariableType p_type, const Variant &p_value) {
+void MaterialStorage::_global_shader_uniform_store_in_buffer(int32_t p_index, RS::GlobalShaderUniformType p_type, const Variant &p_value) {
switch (p_type) {
case RS::GLOBAL_VAR_TYPE_BOOL: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
bool b = p_value;
bv.x = b ? 1.0 : 0.0;
bv.y = 0.0;
@@ -1673,7 +1649,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_BVEC2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1681,7 +1657,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_BVEC3: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1689,7 +1665,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_BVEC4: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
uint32_t bvec = p_value;
bv.x = (bvec & 1) ? 1.0 : 0.0;
bv.y = (bvec & 2) ? 1.0 : 0.0;
@@ -1697,7 +1673,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = (bvec & 8) ? 1.0 : 0.0;
} break;
case RS::GLOBAL_VAR_TYPE_INT: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
int32_t v = p_value;
bv.x = v;
bv.y = 0;
@@ -1705,7 +1681,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC2: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector2i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1713,7 +1689,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC3: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector3i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1721,7 +1697,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_IVEC4: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Vector<int32_t> v = p_value;
bv.x = v.size() >= 1 ? v[0] : 0;
bv.y = v.size() >= 2 ? v[1] : 0;
@@ -1729,7 +1705,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size() >= 4 ? v[3] : 0;
} break;
case RS::GLOBAL_VAR_TYPE_RECT2I: {
- GlobalVariables::ValueInt &bv = *(GlobalVariables::ValueInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueInt &bv = *(GlobalShaderUniforms::ValueInt *)&global_shader_uniforms.buffer_values[p_index];
Rect2i v = p_value;
bv.x = v.position.x;
bv.y = v.position.y;
@@ -1737,7 +1713,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size.y;
} break;
case RS::GLOBAL_VAR_TYPE_UINT: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
uint32_t v = p_value;
bv.x = v;
bv.y = 0;
@@ -1745,7 +1721,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC2: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector2i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1753,7 +1729,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC3: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector3i v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1761,7 +1737,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_UVEC4: {
- GlobalVariables::ValueUInt &bv = *(GlobalVariables::ValueUInt *)&global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::ValueUInt &bv = *(GlobalShaderUniforms::ValueUInt *)&global_shader_uniforms.buffer_values[p_index];
Vector<int32_t> v = p_value;
bv.x = v.size() >= 1 ? v[0] : 0;
bv.y = v.size() >= 2 ? v[1] : 0;
@@ -1769,7 +1745,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size() >= 4 ? v[3] : 0;
} break;
case RS::GLOBAL_VAR_TYPE_FLOAT: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
float v = p_value;
bv.x = v;
bv.y = 0;
@@ -1777,7 +1753,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Vector2 v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1785,7 +1761,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC3: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Vector3 v = p_value;
bv.x = v.x;
bv.y = v.y;
@@ -1793,7 +1769,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = 0;
} break;
case RS::GLOBAL_VAR_TYPE_VEC4: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Plane v = p_value;
bv.x = v.normal.x;
bv.y = v.normal.y;
@@ -1801,14 +1777,14 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.d;
} break;
case RS::GLOBAL_VAR_TYPE_COLOR: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Color v = p_value;
bv.x = v.r;
bv.y = v.g;
bv.z = v.b;
bv.w = v.a;
- GlobalVariables::Value &bv_linear = global_variables.buffer_values[p_index + 1];
+ GlobalShaderUniforms::Value &bv_linear = global_shader_uniforms.buffer_values[p_index + 1];
v = v.srgb_to_linear();
bv_linear.x = v.r;
bv_linear.y = v.g;
@@ -1817,7 +1793,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_RECT2: {
- GlobalVariables::Value &bv = global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value &bv = global_shader_uniforms.buffer_values[p_index];
Rect2 v = p_value;
bv.x = v.position.x;
bv.y = v.position.y;
@@ -1825,7 +1801,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
bv.w = v.size.y;
} break;
case RS::GLOBAL_VAR_TYPE_MAT2: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Vector<float> m2 = p_value;
if (m2.size() < 4) {
m2.resize(4);
@@ -1842,7 +1818,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_MAT3: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Basis v = p_value;
bv[0].x = v.rows[0][0];
bv[0].y = v.rows[1][0];
@@ -1861,7 +1837,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_MAT4: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Vector<float> m2 = p_value;
if (m2.size() < 16) {
@@ -1890,7 +1866,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_TRANSFORM_2D: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Transform2D v = p_value;
bv[0].x = v.columns[0][0];
bv[0].y = v.columns[0][1];
@@ -1909,7 +1885,7 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
} break;
case RS::GLOBAL_VAR_TYPE_TRANSFORM: {
- GlobalVariables::Value *bv = &global_variables.buffer_values[p_index];
+ GlobalShaderUniforms::Value *bv = &global_shader_uniforms.buffer_values[p_index];
Transform3D v = p_value;
bv[0].x = v.basis.rows[0][0];
bv[0].y = v.basis.rows[1][0];
@@ -1938,15 +1914,15 @@ void MaterialStorage::_global_variable_store_in_buffer(int32_t p_index, RS::Glob
}
}
-void MaterialStorage::_global_variable_mark_buffer_dirty(int32_t p_index, int32_t p_elements) {
+void MaterialStorage::_global_shader_uniform_mark_buffer_dirty(int32_t p_index, int32_t p_elements) {
int32_t prev_chunk = -1;
for (int32_t i = 0; i < p_elements; i++) {
- int32_t chunk = (p_index + i) / GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
+ int32_t chunk = (p_index + i) / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
if (chunk != prev_chunk) {
- if (!global_variables.buffer_dirty_regions[chunk]) {
- global_variables.buffer_dirty_regions[chunk] = true;
- global_variables.buffer_dirty_region_count++;
+ if (!global_shader_uniforms.buffer_dirty_regions[chunk]) {
+ global_shader_uniforms.buffer_dirty_regions[chunk] = true;
+ global_shader_uniforms.buffer_dirty_region_count++;
}
}
@@ -1954,16 +1930,16 @@ void MaterialStorage::_global_variable_mark_buffer_dirty(int32_t p_index, int32_
}
}
-void MaterialStorage::global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) {
- ERR_FAIL_COND(global_variables.variables.has(p_name));
- GlobalVariables::Variable gv;
+void MaterialStorage::global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) {
+ ERR_FAIL_COND(global_shader_uniforms.variables.has(p_name));
+ GlobalShaderUniforms::Variable gv;
gv.type = p_type;
gv.value = p_value;
gv.buffer_index = -1;
if (p_type >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
//is texture
- global_variables.must_update_texture_materials = true; //normally there are none
+ global_shader_uniforms.must_update_texture_materials = true; //normally there are none
} else {
gv.buffer_elements = 1;
if (p_type == RS::GLOBAL_VAR_TYPE_COLOR || p_type == RS::GLOBAL_VAR_TYPE_MAT2) {
@@ -1980,56 +1956,56 @@ void MaterialStorage::global_variable_add(const StringName &p_name, RS::GlobalVa
}
//is vector, allocate in buffer and update index
- gv.buffer_index = _global_variable_allocate(gv.buffer_elements);
+ gv.buffer_index = _global_shader_uniform_allocate(gv.buffer_elements);
ERR_FAIL_COND_MSG(gv.buffer_index < 0, vformat("Failed allocating global variable '%s' out of buffer memory. Consider increasing it in the Project Settings.", String(p_name)));
- global_variables.buffer_usage[gv.buffer_index].elements = gv.buffer_elements;
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ global_shader_uniforms.buffer_usage[gv.buffer_index].elements = gv.buffer_elements;
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
- global_variables.must_update_buffer_materials = true; //normally there are none
+ global_shader_uniforms.must_update_buffer_materials = true; //normally there are none
}
- global_variables.variables[p_name] = gv;
+ global_shader_uniforms.variables[p_name] = gv;
}
-void MaterialStorage::global_variable_remove(const StringName &p_name) {
- if (!global_variables.variables.has(p_name)) {
+void MaterialStorage::global_shader_uniform_remove(const StringName &p_name) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return;
}
- const GlobalVariables::Variable &gv = global_variables.variables[p_name];
+ const GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
if (gv.buffer_index >= 0) {
- global_variables.buffer_usage[gv.buffer_index].elements = 0;
- global_variables.must_update_buffer_materials = true;
+ global_shader_uniforms.buffer_usage[gv.buffer_index].elements = 0;
+ global_shader_uniforms.must_update_buffer_materials = true;
} else {
- global_variables.must_update_texture_materials = true;
+ global_shader_uniforms.must_update_texture_materials = true;
}
- global_variables.variables.erase(p_name);
+ global_shader_uniforms.variables.erase(p_name);
}
-Vector<StringName> MaterialStorage::global_variable_get_list() const {
+Vector<StringName> MaterialStorage::global_shader_uniform_get_list() const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(Vector<StringName>(), "This function should never be used outside the editor, it can severely damage performance.");
}
Vector<StringName> names;
- for (const KeyValue<StringName, GlobalVariables::Variable> &E : global_variables.variables) {
+ for (const KeyValue<StringName, GlobalShaderUniforms::Variable> &E : global_shader_uniforms.variables) {
names.push_back(E.key);
}
names.sort_custom<StringName::AlphCompare>();
return names;
}
-void MaterialStorage::global_variable_set(const StringName &p_name, const Variant &p_value) {
- ERR_FAIL_COND(!global_variables.variables.has(p_name));
- GlobalVariables::Variable &gv = global_variables.variables[p_name];
+void MaterialStorage::global_shader_uniform_set(const StringName &p_name, const Variant &p_value) {
+ ERR_FAIL_COND(!global_shader_uniforms.variables.has(p_name));
+ GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
gv.value = p_value;
if (gv.override.get_type() == Variant::NIL) {
if (gv.buffer_index >= 0) {
//buffer
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
} else {
//texture
MaterialStorage *material_storage = MaterialStorage::get_singleton();
@@ -2042,26 +2018,26 @@ void MaterialStorage::global_variable_set(const StringName &p_name, const Varian
}
}
-void MaterialStorage::global_variable_set_override(const StringName &p_name, const Variant &p_value) {
- if (!global_variables.variables.has(p_name)) {
+void MaterialStorage::global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return; //variable may not exist
}
ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT);
- GlobalVariables::Variable &gv = global_variables.variables[p_name];
+ GlobalShaderUniforms::Variable &gv = global_shader_uniforms.variables[p_name];
gv.override = p_value;
if (gv.buffer_index >= 0) {
//buffer
if (gv.override.get_type() == Variant::NIL) {
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.value);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.value);
} else {
- _global_variable_store_in_buffer(gv.buffer_index, gv.type, gv.override);
+ _global_shader_uniform_store_in_buffer(gv.buffer_index, gv.type, gv.override);
}
- _global_variable_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
+ _global_shader_uniform_mark_buffer_dirty(gv.buffer_index, gv.buffer_elements);
} else {
//texture
MaterialStorage *material_storage = MaterialStorage::get_singleton();
@@ -2073,35 +2049,35 @@ void MaterialStorage::global_variable_set_override(const StringName &p_name, con
}
}
-Variant MaterialStorage::global_variable_get(const StringName &p_name) const {
+Variant MaterialStorage::global_shader_uniform_get(const StringName &p_name) const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(Variant(), "This function should never be used outside the editor, it can severely damage performance.");
}
- if (!global_variables.variables.has(p_name)) {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return Variant();
}
- return global_variables.variables[p_name].value;
+ return global_shader_uniforms.variables[p_name].value;
}
-RS::GlobalVariableType MaterialStorage::global_variable_get_type_internal(const StringName &p_name) const {
- if (!global_variables.variables.has(p_name)) {
+RS::GlobalShaderUniformType MaterialStorage::global_shader_uniform_get_type_internal(const StringName &p_name) const {
+ if (!global_shader_uniforms.variables.has(p_name)) {
return RS::GLOBAL_VAR_TYPE_MAX;
}
- return global_variables.variables[p_name].type;
+ return global_shader_uniforms.variables[p_name].type;
}
-RS::GlobalVariableType MaterialStorage::global_variable_get_type(const StringName &p_name) const {
+RS::GlobalShaderUniformType MaterialStorage::global_shader_uniform_get_type(const StringName &p_name) const {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_FAIL_V_MSG(RS::GLOBAL_VAR_TYPE_MAX, "This function should never be used outside the editor, it can severely damage performance.");
}
- return global_variable_get_type_internal(p_name);
+ return global_shader_uniform_get_type_internal(p_name);
}
-void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
+void MaterialStorage::global_shader_uniforms_load_settings(bool p_load_textures) {
List<PropertyInfo> settings;
ProjectSettings::get_singleton()->get_property_list(&settings);
@@ -2146,11 +2122,11 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
"samplerCube",
};
- RS::GlobalVariableType gvtype = RS::GLOBAL_VAR_TYPE_MAX;
+ RS::GlobalShaderUniformType gvtype = RS::GLOBAL_VAR_TYPE_MAX;
for (int i = 0; i < RS::GLOBAL_VAR_TYPE_MAX; i++) {
if (global_var_type_names[i] == type) {
- gvtype = RS::GlobalVariableType(i);
+ gvtype = RS::GlobalShaderUniformType(i);
break;
}
}
@@ -2172,47 +2148,47 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) {
value = resource;
}
- if (global_variables.variables.has(name)) {
+ if (global_shader_uniforms.variables.has(name)) {
//has it, update it
- global_variable_set(name, value);
+ global_shader_uniform_set(name, value);
} else {
- global_variable_add(name, gvtype, value);
+ global_shader_uniform_add(name, gvtype, value);
}
}
}
}
-void MaterialStorage::global_variables_clear() {
- global_variables.variables.clear(); //not right but for now enough
+void MaterialStorage::global_shader_uniforms_clear() {
+ global_shader_uniforms.variables.clear(); //not right but for now enough
}
-RID MaterialStorage::global_variables_get_storage_buffer() const {
- return global_variables.buffer;
+RID MaterialStorage::global_shader_uniforms_get_storage_buffer() const {
+ return global_shader_uniforms.buffer;
}
-int32_t MaterialStorage::global_variables_instance_allocate(RID p_instance) {
- ERR_FAIL_COND_V(global_variables.instance_buffer_pos.has(p_instance), -1);
- int32_t pos = _global_variable_allocate(ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES);
- global_variables.instance_buffer_pos[p_instance] = pos; //save anyway
+int32_t MaterialStorage::global_shader_uniforms_instance_allocate(RID p_instance) {
+ ERR_FAIL_COND_V(global_shader_uniforms.instance_buffer_pos.has(p_instance), -1);
+ int32_t pos = _global_shader_uniform_allocate(ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES);
+ global_shader_uniforms.instance_buffer_pos[p_instance] = pos; //save anyway
ERR_FAIL_COND_V_MSG(pos < 0, -1, "Too many instances using shader instance variables. Increase buffer size in Project Settings.");
- global_variables.buffer_usage[pos].elements = ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES;
+ global_shader_uniforms.buffer_usage[pos].elements = ShaderLanguage::MAX_INSTANCE_UNIFORM_INDICES;
return pos;
}
-void MaterialStorage::global_variables_instance_free(RID p_instance) {
- ERR_FAIL_COND(!global_variables.instance_buffer_pos.has(p_instance));
- int32_t pos = global_variables.instance_buffer_pos[p_instance];
+void MaterialStorage::global_shader_uniforms_instance_free(RID p_instance) {
+ ERR_FAIL_COND(!global_shader_uniforms.instance_buffer_pos.has(p_instance));
+ int32_t pos = global_shader_uniforms.instance_buffer_pos[p_instance];
if (pos >= 0) {
- global_variables.buffer_usage[pos].elements = 0;
+ global_shader_uniforms.buffer_usage[pos].elements = 0;
}
- global_variables.instance_buffer_pos.erase(p_instance);
+ global_shader_uniforms.instance_buffer_pos.erase(p_instance);
}
-void MaterialStorage::global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) {
- if (!global_variables.instance_buffer_pos.has(p_instance)) {
+void MaterialStorage::global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) {
+ if (!global_shader_uniforms.instance_buffer_pos.has(p_instance)) {
return; //just not allocated, ignore
}
- int32_t pos = global_variables.instance_buffer_pos[p_instance];
+ int32_t pos = global_shader_uniforms.instance_buffer_pos[p_instance];
if (pos < 0) {
return; //again, not allocated, ignore
@@ -2247,57 +2223,57 @@ void MaterialStorage::global_variables_instance_update(RID p_instance, int p_ind
pos += p_index;
- _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_variables.buffer_values[pos], true); //instances always use linear color in this renderer
- _global_variable_mark_buffer_dirty(pos, 1);
+ _fill_std140_variant_ubo_value(datatype, 0, p_value, (uint8_t *)&global_shader_uniforms.buffer_values[pos], true); //instances always use linear color in this renderer
+ _global_shader_uniform_mark_buffer_dirty(pos, 1);
}
-void MaterialStorage::_update_global_variables() {
+void MaterialStorage::_update_global_shader_uniforms() {
MaterialStorage *material_storage = MaterialStorage::get_singleton();
- if (global_variables.buffer_dirty_region_count > 0) {
- uint32_t total_regions = global_variables.buffer_size / GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
- if (total_regions / global_variables.buffer_dirty_region_count <= 4) {
+ if (global_shader_uniforms.buffer_dirty_region_count > 0) {
+ uint32_t total_regions = global_shader_uniforms.buffer_size / GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
+ if (total_regions / global_shader_uniforms.buffer_dirty_region_count <= 4) {
// 25% of regions dirty, just update all buffer
- RD::get_singleton()->buffer_update(global_variables.buffer, 0, sizeof(GlobalVariables::Value) * global_variables.buffer_size, global_variables.buffer_values);
- memset(global_variables.buffer_dirty_regions, 0, sizeof(bool) * total_regions);
+ RD::get_singleton()->buffer_update(global_shader_uniforms.buffer, 0, sizeof(GlobalShaderUniforms::Value) * global_shader_uniforms.buffer_size, global_shader_uniforms.buffer_values);
+ memset(global_shader_uniforms.buffer_dirty_regions, 0, sizeof(bool) * total_regions);
} else {
- uint32_t region_byte_size = sizeof(GlobalVariables::Value) * GlobalVariables::BUFFER_DIRTY_REGION_SIZE;
+ uint32_t region_byte_size = sizeof(GlobalShaderUniforms::Value) * GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE;
for (uint32_t i = 0; i < total_regions; i++) {
- if (global_variables.buffer_dirty_regions[i]) {
- RD::get_singleton()->buffer_update(global_variables.buffer, i * region_byte_size, region_byte_size, &global_variables.buffer_values[i * GlobalVariables::BUFFER_DIRTY_REGION_SIZE]);
+ if (global_shader_uniforms.buffer_dirty_regions[i]) {
+ RD::get_singleton()->buffer_update(global_shader_uniforms.buffer, i * region_byte_size, region_byte_size, &global_shader_uniforms.buffer_values[i * GlobalShaderUniforms::BUFFER_DIRTY_REGION_SIZE]);
- global_variables.buffer_dirty_regions[i] = false;
+ global_shader_uniforms.buffer_dirty_regions[i] = false;
}
}
}
- global_variables.buffer_dirty_region_count = 0;
+ global_shader_uniforms.buffer_dirty_region_count = 0;
}
- if (global_variables.must_update_buffer_materials) {
+ if (global_shader_uniforms.must_update_buffer_materials) {
// only happens in the case of a buffer variable added or removed,
// so not often.
- for (const RID &E : global_variables.materials_using_buffer) {
+ for (const RID &E : global_shader_uniforms.materials_using_buffer) {
Material *material = material_storage->get_material(E);
ERR_CONTINUE(!material); //wtf
material_storage->_material_queue_update(material, true, false);
}
- global_variables.must_update_buffer_materials = false;
+ global_shader_uniforms.must_update_buffer_materials = false;
}
- if (global_variables.must_update_texture_materials) {
+ if (global_shader_uniforms.must_update_texture_materials) {
// only happens in the case of a buffer variable added or removed,
// so not often.
- for (const RID &E : global_variables.materials_using_texture) {
+ for (const RID &E : global_shader_uniforms.materials_using_texture) {
Material *material = material_storage->get_material(E);
ERR_CONTINUE(!material); //wtf
material_storage->_material_queue_update(material, false, true);
}
- global_variables.must_update_texture_materials = false;
+ global_shader_uniforms.must_update_texture_materials = false;
}
}
diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.h b/servers/rendering/renderer_rd/storage_rd/material_storage.h
index d5c9980150..ad40a86dd0 100644
--- a/servers/rendering/renderer_rd/storage_rd/material_storage.h
+++ b/servers/rendering/renderer_rd/storage_rd/material_storage.h
@@ -135,15 +135,15 @@ struct Material {
update_element(this) {}
};
-/* Global variable structs */
-struct GlobalVariables {
+/* Global shader uniform structs */
+struct GlobalShaderUniforms {
enum {
BUFFER_DIRTY_REGION_SIZE = 1024
};
struct Variable {
HashSet<RID> texture_materials; // materials using this
- RS::GlobalVariableType type;
+ RS::GlobalShaderUniformType type;
Variant value;
Variant override;
int32_t buffer_index; //for vectors
@@ -209,13 +209,13 @@ private:
RID quad_index_buffer;
RID quad_index_array;
- /* GLOBAL VARIABLE API */
+ /* GLOBAL SHADER UNIFORM API */
- GlobalVariables global_variables;
+ GlobalShaderUniforms global_shader_uniforms;
- int32_t _global_variable_allocate(uint32_t p_elements);
- void _global_variable_store_in_buffer(int32_t p_index, RS::GlobalVariableType p_type, const Variant &p_value);
- void _global_variable_mark_buffer_dirty(int32_t p_index, int32_t p_elements);
+ int32_t _global_shader_uniform_allocate(uint32_t p_elements);
+ void _global_shader_uniform_store_in_buffer(int32_t p_index, RS::GlobalShaderUniformType p_type, const Variant &p_value);
+ void _global_shader_uniform_mark_buffer_dirty(int32_t p_index, int32_t p_elements);
/* SHADER API */
@@ -333,28 +333,28 @@ public:
RID get_quad_index_array() { return quad_index_array; }
- /* GLOBAL VARIABLE API */
+ /* GLOBAL SHADER UNIFORM API */
- void _update_global_variables();
+ void _update_global_shader_uniforms();
- virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) override;
- virtual void global_variable_remove(const StringName &p_name) override;
- virtual Vector<StringName> global_variable_get_list() const override;
+ virtual void global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) override;
+ virtual void global_shader_uniform_remove(const StringName &p_name) override;
+ virtual Vector<StringName> global_shader_uniform_get_list() const override;
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) override;
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) override;
- virtual Variant global_variable_get(const StringName &p_name) const override;
- virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const override;
- RS::GlobalVariableType global_variable_get_type_internal(const StringName &p_name) const;
+ virtual void global_shader_uniform_set(const StringName &p_name, const Variant &p_value) override;
+ virtual void global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) override;
+ virtual Variant global_shader_uniform_get(const StringName &p_name) const override;
+ virtual RS::GlobalShaderUniformType global_shader_uniform_get_type(const StringName &p_name) const override;
+ RS::GlobalShaderUniformType global_shader_uniform_get_type_internal(const StringName &p_name) const;
- virtual void global_variables_load_settings(bool p_load_textures = true) override;
- virtual void global_variables_clear() override;
+ virtual void global_shader_uniforms_load_settings(bool p_load_textures = true) override;
+ virtual void global_shader_uniforms_clear() override;
- virtual int32_t global_variables_instance_allocate(RID p_instance) override;
- virtual void global_variables_instance_free(RID p_instance) override;
- virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) override;
+ virtual int32_t global_shader_uniforms_instance_allocate(RID p_instance) override;
+ virtual void global_shader_uniforms_instance_free(RID p_instance) override;
+ virtual void global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) override;
- RID global_variables_get_storage_buffer() const;
+ RID global_shader_uniforms_get_storage_buffer() const;
/* SHADER API */
diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
index 75977c5bc9..1e5511eeda 100644
--- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp
@@ -112,7 +112,7 @@ ParticlesStorage::ParticlesStorage() {
actions.default_filter = ShaderLanguage::FILTER_LINEAR_MIPMAP;
actions.default_repeat = ShaderLanguage::REPEAT_ENABLE;
- actions.global_buffer_array_variable = "global_variables.data";
+ actions.global_buffer_array_variable = "global_shader_uniforms.data";
particles_shader.compiler.initialize(actions);
}
@@ -164,7 +164,7 @@ void process() {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 2;
- u.append_id(material_storage->global_variables_get_storage_buffer());
+ u.append_id(material_storage->global_shader_uniforms_get_storage_buffer());
uniforms.push_back(u);
}
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
index abf364b8b4..6d7ea5184a 100644
--- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
@@ -398,9 +398,8 @@ TextureStorage::TextureStorage() {
tformat.format = RD::DATA_FORMAT_R8_UINT;
tformat.width = 4;
tformat.height = 4;
- tformat.array_layers = 1;
tformat.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_VRS_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
- tformat.texture_type = RD::TEXTURE_TYPE_2D_ARRAY;
+ tformat.texture_type = RD::TEXTURE_TYPE_2D;
Vector<uint8_t> pv;
pv.resize(4 * 4);
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.h b/servers/rendering/renderer_rd/storage_rd/texture_storage.h
index 1a5a3dd023..1eb4a283ca 100644
--- a/servers/rendering/renderer_rd/storage_rd/texture_storage.h
+++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.h
@@ -191,8 +191,8 @@ struct Decal {
float upper_fade = 0.3;
float lower_fade = 0.3;
bool distance_fade = false;
- float distance_fade_begin = 10;
- float distance_fade_length = 1;
+ float distance_fade_begin = 40.0;
+ float distance_fade_length = 10.0;
float normal_fade = 0.0;
Dependency dependency;
diff --git a/servers/rendering/renderer_rd/storage_rd/utilities.cpp b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
index a1f62c16c7..ce64d3c69e 100644
--- a/servers/rendering/renderer_rd/storage_rd/utilities.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
@@ -219,21 +219,21 @@ void Utilities::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_de
if (p_enter) {
if (!vn->enter_callback.is_null()) {
if (p_deferred) {
- vn->enter_callback.call_deferred(nullptr, 0);
+ vn->enter_callback.call_deferredp(nullptr, 0);
} else {
Variant r;
Callable::CallError ce;
- vn->enter_callback.call(nullptr, 0, r, ce);
+ vn->enter_callback.callp(nullptr, 0, r, ce);
}
}
} else {
if (!vn->exit_callback.is_null()) {
if (p_deferred) {
- vn->exit_callback.call_deferred(nullptr, 0);
+ vn->exit_callback.call_deferredp(nullptr, 0);
} else {
Variant r;
Callable::CallError ce;
- vn->exit_callback.call(nullptr, 0, r, ce);
+ vn->exit_callback.callp(nullptr, 0, r, ce);
}
}
}
@@ -272,7 +272,7 @@ String Utilities::get_captured_timestamp_name(uint32_t p_index) const {
/* MISC */
void Utilities::update_dirty_resources() {
- MaterialStorage::get_singleton()->_update_global_variables(); //must do before materials, so it can queue them for update
+ MaterialStorage::get_singleton()->_update_global_shader_uniforms(); //must do before materials, so it can queue them for update
MaterialStorage::get_singleton()->_update_queued_materials();
MeshStorage::get_singleton()->_update_dirty_multimeshes();
MeshStorage::get_singleton()->_update_dirty_skeletons();
diff --git a/servers/rendering/renderer_scene.h b/servers/rendering/renderer_scene.h
index be57701017..852fe89cd0 100644
--- a/servers/rendering/renderer_scene.h
+++ b/servers/rendering/renderer_scene.h
@@ -122,6 +122,7 @@ public:
virtual RID environment_allocate() = 0;
virtual void environment_initialize(RID p_rid) = 0;
+ // Background
virtual void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) = 0;
virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
virtual void environment_set_sky_custom_fov(RID p_env, float p_scale) = 0;
@@ -131,41 +132,152 @@ public:
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0;
virtual void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG) = 0;
- virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0;
- virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
- virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
+ virtual RS::EnvironmentBG environment_get_background(RID p_Env) const = 0;
+ virtual RID environment_get_sky(RID p_env) const = 0;
+ virtual float environment_get_sky_custom_fov(RID p_env) const = 0;
+ virtual Basis environment_get_sky_orientation(RID p_env) const = 0;
+ virtual Color environment_get_bg_color(RID p_env) const = 0;
+ virtual float environment_get_bg_energy(RID p_env) const = 0;
+ virtual int environment_get_canvas_max_layer(RID p_env) const = 0;
+ virtual RS::EnvironmentAmbientSource environment_get_ambient_source(RID p_env) const = 0;
+ virtual Color environment_get_ambient_light(RID p_env) const = 0;
+ virtual float environment_get_ambient_light_energy(RID p_env) const = 0;
+ virtual float environment_get_ambient_sky_contribution(RID p_env) const = 0;
+ virtual RS::EnvironmentReflectionSource environment_get_reflection_source(RID p_env) const = 0;
+
+ // Tonemap
+ virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
+
+ virtual RS::EnvironmentToneMapper environment_get_tone_mapper(RID p_env) const = 0;
+ virtual float environment_get_exposure(RID p_env) const = 0;
+ virtual float environment_get_white(RID p_env) const = 0;
+ virtual bool environment_get_auto_exposure(RID p_env) const = 0;
+ virtual float environment_get_min_luminance(RID p_env) const = 0;
+ virtual float environment_get_max_luminance(RID p_env) const = 0;
+ virtual float environment_get_auto_exp_speed(RID p_env) const = 0;
+ virtual float environment_get_auto_exp_scale(RID p_env) const = 0;
+ virtual uint64_t environment_get_auto_exposure_version(RID p_env) const = 0;
+
+ // Fog
+ virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0;
+ virtual bool environment_get_fog_enabled(RID p_env) const = 0;
+ virtual Color environment_get_fog_light_color(RID p_env) const = 0;
+ virtual float environment_get_fog_light_energy(RID p_env) const = 0;
+ virtual float environment_get_fog_sun_scatter(RID p_env) const = 0;
+ virtual float environment_get_fog_density(RID p_env) const = 0;
+ virtual float environment_get_fog_height(RID p_env) const = 0;
+ virtual float environment_get_fog_height_density(RID p_env) const = 0;
+ virtual float environment_get_fog_aerial_perspective(RID p_env) const = 0;
+
+ // Volumetric Fog
virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) = 0;
+ virtual bool environment_get_volumetric_fog_enabled(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_density(RID p_env) const = 0;
+ virtual Color environment_get_volumetric_fog_scattering(RID p_env) const = 0;
+ virtual Color environment_get_volumetric_fog_emission(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_emission_energy(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_anisotropy(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_length(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_detail_spread(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_gi_inject(RID p_env) const = 0;
+ virtual bool environment_get_volumetric_fog_temporal_reprojection(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_temporal_reprojection_amount(RID p_env) const = 0;
+ virtual float environment_get_volumetric_fog_ambient_inject(RID p_env) const = 0;
+
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;
+ // Glow
+
+ virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0;
+
+ virtual bool environment_get_glow_enabled(RID p_env) const = 0;
+ virtual Vector<float> environment_get_glow_levels(RID p_env) const = 0;
+ virtual float environment_get_glow_intensity(RID p_env) const = 0;
+ virtual float environment_get_glow_strength(RID p_env) const = 0;
+ virtual float environment_get_glow_bloom(RID p_env) const = 0;
+ virtual float environment_get_glow_mix(RID p_env) const = 0;
+ virtual RS::EnvironmentGlowBlendMode environment_get_glow_blend_mode(RID p_env) const = 0;
+ virtual float environment_get_glow_hdr_bleed_threshold(RID p_env) const = 0;
+ virtual float environment_get_glow_hdr_luminance_cap(RID p_env) const = 0;
+ virtual float environment_get_glow_hdr_bleed_scale(RID p_env) const = 0;
+ virtual float environment_get_glow_map_strength(RID p_env) const = 0;
+ virtual RID environment_get_glow_map(RID p_env) const = 0;
+
+ virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
+ virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
+
+ // SSR
+
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) = 0;
+
+ virtual bool environment_get_ssr_enabled(RID p_env) const = 0;
+ virtual int environment_get_ssr_max_steps(RID p_env) const = 0;
+ virtual float environment_get_ssr_fade_in(RID p_env) const = 0;
+ virtual float environment_get_ssr_fade_out(RID p_env) const = 0;
+ virtual float environment_get_ssr_depth_tolerance(RID p_env) const = 0;
+
virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) = 0;
+ // SSAO
virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) = 0;
+
+ virtual bool environment_get_ssao_enabled(RID p_env) const = 0;
+ virtual float environment_get_ssao_radius(RID p_env) const = 0;
+ virtual float environment_get_ssao_intensity(RID p_env) const = 0;
+ virtual float environment_get_ssao_power(RID p_env) const = 0;
+ virtual float environment_get_ssao_detail(RID p_env) const = 0;
+ virtual float environment_get_ssao_horizon(RID p_env) const = 0;
+ virtual float environment_get_ssao_sharpness(RID p_env) const = 0;
+ virtual float environment_get_ssao_direct_light_affect(RID p_env) const = 0;
+ virtual float environment_get_ssao_ao_channel_affect(RID p_env) const = 0;
+
virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
+ // SSIL
+
virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) = 0;
+
+ virtual bool environment_get_ssil_enabled(RID p_env) const = 0;
+ virtual float environment_get_ssil_radius(RID p_env) const = 0;
+ virtual float environment_get_ssil_intensity(RID p_env) const = 0;
+ virtual float environment_get_ssil_sharpness(RID p_env) const = 0;
+ virtual float environment_get_ssil_normal_rejection(RID p_env) const = 0;
+
virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
+ // SDFGI
virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual bool environment_get_sdfgi_enabled(RID p_env) const = 0;
+ virtual int environment_get_sdfgi_cascades(RID p_env) const = 0;
+ virtual float environment_get_sdfgi_min_cell_size(RID p_env) const = 0;
+ virtual bool environment_get_sdfgi_use_occlusion(RID p_env) const = 0;
+ virtual float environment_get_sdfgi_bounce_feedback(RID p_env) const = 0;
+ virtual bool environment_get_sdfgi_read_sky_light(RID p_env) const = 0;
+ virtual float environment_get_sdfgi_energy(RID p_env) const = 0;
+ virtual float environment_get_sdfgi_normal_bias(RID p_env) const = 0;
+ virtual float environment_get_sdfgi_probe_bias(RID p_env) const = 0;
+ virtual RS::EnvironmentSDFGIYScale environment_get_sdfgi_y_scale(RID p_env) const = 0;
+
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) = 0;
- virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
-
+ // Adjustment
virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) = 0;
- virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0;
+ virtual bool environment_get_adjustments_enabled(RID p_env) const = 0;
+ virtual float environment_get_adjustments_brightness(RID p_env) const = 0;
+ virtual float environment_get_adjustments_contrast(RID p_env) const = 0;
+ virtual float environment_get_adjustments_saturation(RID p_env) const = 0;
+ virtual bool environment_get_use_1d_color_correction(RID p_env) const = 0;
+ virtual RID environment_get_color_correction(RID p_env) const = 0;
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) = 0;
- virtual RS::EnvironmentBG environment_get_background(RID p_Env) const = 0;
- virtual int environment_get_canvas_max_layer(RID p_env) const = 0;
-
virtual bool is_environment(RID p_environment) const = 0;
virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_limit) = 0;
@@ -194,7 +306,7 @@ public:
virtual RID render_buffers_create() = 0;
- virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) = 0;
+ virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) = 0;
virtual void gi_set_use_half_resolution(bool p_enable) = 0;
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 7631be3669..368bbb63f5 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -475,7 +475,7 @@ void RendererSceneCull::_instance_update_mesh_instance(Instance *p_instance) {
}
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data);
- scene_render->geometry_instance_set_mesh_instance(geom->geometry_instance, p_instance->mesh_instance);
+ geom->geometry_instance->set_mesh_instance(p_instance->mesh_instance);
if (p_instance->scenario && p_instance->array_index >= 0) {
InstanceData &idata = p_instance->scenario->instance_data[p_instance->array_index];
@@ -637,20 +637,20 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) {
instance->base_data = geom;
geom->geometry_instance = scene_render->geometry_instance_create(p_base);
- scene_render->geometry_instance_set_skeleton(geom->geometry_instance, instance->skeleton);
- scene_render->geometry_instance_set_material_override(geom->geometry_instance, instance->material_override);
- scene_render->geometry_instance_set_material_overlay(geom->geometry_instance, instance->material_overlay);
- scene_render->geometry_instance_set_surface_materials(geom->geometry_instance, instance->materials);
- scene_render->geometry_instance_set_transform(geom->geometry_instance, instance->transform, instance->aabb, instance->transformed_aabb);
- scene_render->geometry_instance_set_layer_mask(geom->geometry_instance, instance->layer_mask);
- scene_render->geometry_instance_set_lod_bias(geom->geometry_instance, instance->lod_bias);
- scene_render->geometry_instance_set_use_baked_light(geom->geometry_instance, instance->baked_light);
- scene_render->geometry_instance_set_use_dynamic_gi(geom->geometry_instance, instance->dynamic_gi);
- scene_render->geometry_instance_set_cast_double_sided_shadows(geom->geometry_instance, instance->cast_shadows == RS::SHADOW_CASTING_SETTING_DOUBLE_SIDED);
- scene_render->geometry_instance_set_use_lightmap(geom->geometry_instance, RID(), instance->lightmap_uv_scale, instance->lightmap_slice_index);
- scene_render->geometry_instance_set_transparency(geom->geometry_instance, instance->transparency);
+ geom->geometry_instance->set_skeleton(instance->skeleton);
+ geom->geometry_instance->set_material_override(instance->material_override);
+ geom->geometry_instance->set_material_overlay(instance->material_overlay);
+ geom->geometry_instance->set_surface_materials(instance->materials);
+ geom->geometry_instance->set_transform(instance->transform, instance->aabb, instance->transformed_aabb);
+ geom->geometry_instance->set_layer_mask(instance->layer_mask);
+ geom->geometry_instance->set_lod_bias(instance->lod_bias);
+ geom->geometry_instance->set_transparency(instance->transparency);
+ geom->geometry_instance->set_use_baked_light(instance->baked_light);
+ geom->geometry_instance->set_use_dynamic_gi(instance->dynamic_gi);
+ geom->geometry_instance->set_use_lightmap(RID(), instance->lightmap_uv_scale, instance->lightmap_slice_index);
+ geom->geometry_instance->set_cast_double_sided_shadows(instance->cast_shadows == RS::SHADOW_CASTING_SETTING_DOUBLE_SIDED);
if (instance->lightmap_sh.size() == 9) {
- scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, instance->lightmap_sh.ptr());
+ geom->geometry_instance->set_lightmap_capture(instance->lightmap_sh.ptr());
}
for (Instance *E : instance->visibility_dependencies) {
@@ -836,7 +836,7 @@ void RendererSceneCull::instance_set_layer_mask(RID p_instance, uint32_t p_mask)
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_layer_mask(geom->geometry_instance, p_mask);
+ geom->geometry_instance->set_layer_mask(p_mask);
}
}
@@ -848,7 +848,7 @@ void RendererSceneCull::instance_geometry_set_transparency(RID p_instance, float
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_transparency(geom->geometry_instance, p_transparency);
+ geom->geometry_instance->set_transparency(p_transparency);
}
}
@@ -1009,7 +1009,7 @@ void RendererSceneCull::instance_attach_skeleton(RID p_instance, RID p_skeleton)
_instance_update_mesh_instance(instance);
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_skeleton(geom->geometry_instance, p_skeleton);
+ geom->geometry_instance->set_skeleton(p_skeleton);
}
}
@@ -1129,7 +1129,7 @@ void RendererSceneCull::instance_geometry_set_flag(RID p_instance, RS::InstanceF
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_use_baked_light(geom->geometry_instance, p_enabled);
+ geom->geometry_instance->set_use_baked_light(p_enabled);
}
} break;
@@ -1149,7 +1149,7 @@ void RendererSceneCull::instance_geometry_set_flag(RID p_instance, RS::InstanceF
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_use_dynamic_gi(geom->geometry_instance, p_enabled);
+ geom->geometry_instance->set_use_dynamic_gi(p_enabled);
}
} break;
@@ -1207,7 +1207,7 @@ void RendererSceneCull::instance_geometry_set_cast_shadows_setting(RID p_instanc
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_cast_double_sided_shadows(geom->geometry_instance, instance->cast_shadows == RS::SHADOW_CASTING_SETTING_DOUBLE_SIDED);
+ geom->geometry_instance->set_cast_double_sided_shadows(instance->cast_shadows == RS::SHADOW_CASTING_SETTING_DOUBLE_SIDED);
}
_instance_queue_update(instance, false, true);
@@ -1222,7 +1222,7 @@ void RendererSceneCull::instance_geometry_set_material_override(RID p_instance,
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_material_override(geom->geometry_instance, p_material);
+ geom->geometry_instance->set_material_override(p_material);
}
}
@@ -1235,7 +1235,7 @@ void RendererSceneCull::instance_geometry_set_material_overlay(RID p_instance, R
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_material_overlay(geom->geometry_instance, p_material);
+ geom->geometry_instance->set_material_overlay(p_material);
}
}
@@ -1358,9 +1358,9 @@ void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_ins
bool end_enabled = p_instance->visibility_range_end > 0.0f;
float end_min = p_instance->visibility_range_end - p_instance->visibility_range_end_margin;
float end_max = p_instance->visibility_range_end + p_instance->visibility_range_end_margin;
- scene_render->geometry_instance_set_fade_range(idata.instance_geometry, begin_enabled, begin_min, begin_max, end_enabled, end_min, end_max);
+ idata.instance_geometry->set_fade_range(begin_enabled, begin_min, begin_max, end_enabled, end_min, end_max);
} else {
- scene_render->geometry_instance_set_fade_range(idata.instance_geometry, false, 0.0f, 0.0f, false, 0.0f, 0.0f);
+ idata.instance_geometry->set_fade_range(false, 0.0f, 0.0f, false, 0.0f, 0.0f);
}
}
@@ -1375,7 +1375,7 @@ void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_ins
} else {
idata.parent_array_index = -1;
if (is_geometry_instance) {
- scene_render->geometry_instance_set_parent_fade_alpha(idata.instance_geometry, 1.0f);
+ idata.instance_geometry->set_parent_fade_alpha(1.0f);
}
}
}
@@ -1407,7 +1407,7 @@ void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lig
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_use_lightmap(geom->geometry_instance, lightmap_instance_rid, p_lightmap_uv_scale, p_slice_index);
+ geom->geometry_instance->set_use_lightmap(lightmap_instance_rid, p_lightmap_uv_scale, p_slice_index);
}
}
@@ -1419,7 +1419,7 @@ void RendererSceneCull::instance_geometry_set_lod_bias(RID p_instance, float p_l
if ((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK && instance->base_data) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
- scene_render->geometry_instance_set_lod_bias(geom->geometry_instance, p_lod_bias);
+ geom->geometry_instance->set_lod_bias(p_lod_bias);
}
}
@@ -1441,7 +1441,7 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c
E->value.value = p_value;
if (E->value.index >= 0 && instance->instance_allocated_shader_parameters) {
//update directly
- RSG::material_storage->global_variables_instance_update(p_instance, E->value.index, p_value);
+ RSG::material_storage->global_shader_uniforms_instance_update(p_instance, E->value.index, p_value);
}
}
}
@@ -1587,11 +1587,11 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
if (!p_instance->lightmap_sh.is_empty()) {
p_instance->lightmap_sh.clear(); //don't need SH
p_instance->lightmap_target_sh.clear(); //don't need SH
- scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, nullptr);
+ geom->geometry_instance->set_lightmap_capture(nullptr);
}
}
- scene_render->geometry_instance_set_transform(geom->geometry_instance, p_instance->transform, p_instance->aabb, p_instance->transformed_aabb);
+ geom->geometry_instance->set_transform(p_instance->transform, p_instance->aabb, p_instance->transformed_aabb);
}
// note: we had to remove is equal approx check here, it meant that det == 0.000004 won't work, which is the case for some of our scenes.
@@ -1818,10 +1818,10 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) {
// Clear these now because the InstanceData containing the dirty flags is gone
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data);
- scene_render->geometry_instance_pair_light_instances(geom->geometry_instance, nullptr, 0);
- scene_render->geometry_instance_pair_reflection_probe_instances(geom->geometry_instance, nullptr, 0);
- scene_render->geometry_instance_pair_decal_instances(geom->geometry_instance, nullptr, 0);
- scene_render->geometry_instance_pair_voxel_gi_instances(geom->geometry_instance, nullptr, 0);
+ geom->geometry_instance->pair_light_instances(nullptr, 0);
+ geom->geometry_instance->pair_reflection_probe_instances(nullptr, 0);
+ geom->geometry_instance->pair_decal_instances(nullptr, 0);
+ geom->geometry_instance->pair_voxel_gi_instances(nullptr, 0);
}
for (Instance *E : p_instance->visibility_dependencies) {
@@ -1829,7 +1829,7 @@ void RendererSceneCull::_unpair_instance(Instance *p_instance) {
if (dep_instance->array_index != -1) {
dep_instance->scenario->instance_data[dep_instance->array_index].parent_array_index = -1;
if ((1 << dep_instance->base_type) & RS::INSTANCE_GEOMETRY_MASK) {
- scene_render->geometry_instance_set_parent_fade_alpha(dep_instance->scenario->instance_data[dep_instance->array_index].instance_geometry, 1.0f);
+ dep_instance->scenario->instance_data[dep_instance->array_index].instance_geometry->set_parent_fade_alpha(1.0f);
}
}
}
@@ -1990,7 +1990,7 @@ void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance)
}
}
- scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, p_instance->lightmap_sh.ptr());
+ geom->geometry_instance->set_lightmap_capture(p_instance->lightmap_sh.ptr());
}
void RendererSceneCull::_light_instance_setup_directional_shadow(int p_shadow_index, Instance *p_instance, const Transform3D p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect) {
@@ -2742,7 +2742,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
const int32_t &parent_idx = cull_data.scenario->instance_data[idata.parent_array_index].visibility_index;
fade = cull_data.scenario->instance_visibility[parent_idx].children_fade_alpha;
}
- scene_render->geometry_instance_set_parent_fade_alpha(idata.instance_geometry, fade);
+ idata.instance_geometry->set_parent_fade_alpha(fade);
}
if (geometry_instance_pair_mask & (1 << RS::INSTANCE_LIGHT) && (idata.flags & InstanceData::FLAG_GEOM_LIGHTING_DIRTY)) {
@@ -2757,14 +2757,14 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
}
}
- scene_render->geometry_instance_pair_light_instances(geom->geometry_instance, instance_pair_buffer, idx);
+ geom->geometry_instance->pair_light_instances(instance_pair_buffer, idx);
idata.flags &= ~uint32_t(InstanceData::FLAG_GEOM_LIGHTING_DIRTY);
}
if (idata.flags & InstanceData::FLAG_GEOM_PROJECTOR_SOFTSHADOW_DIRTY) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(idata.instance->base_data);
- scene_render->geometry_instance_set_softshadow_projector_pairing(geom->geometry_instance, geom->softshadow_count > 0, geom->projector_count > 0);
+ geom->geometry_instance->set_softshadow_projector_pairing(geom->softshadow_count > 0, geom->projector_count > 0);
idata.flags &= ~uint32_t(InstanceData::FLAG_GEOM_PROJECTOR_SOFTSHADOW_DIRTY);
}
@@ -2781,7 +2781,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
}
}
- scene_render->geometry_instance_pair_reflection_probe_instances(geom->geometry_instance, instance_pair_buffer, idx);
+ geom->geometry_instance->pair_reflection_probe_instances(instance_pair_buffer, idx);
idata.flags &= ~uint32_t(InstanceData::FLAG_GEOM_REFLECTION_DIRTY);
}
@@ -2797,7 +2797,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
break;
}
}
- scene_render->geometry_instance_pair_decal_instances(geom->geometry_instance, instance_pair_buffer, idx);
+ geom->geometry_instance->pair_decal_instances(instance_pair_buffer, idx);
idata.flags &= ~uint32_t(InstanceData::FLAG_GEOM_DECAL_DIRTY);
}
@@ -2813,7 +2813,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
}
}
- scene_render->geometry_instance_pair_voxel_gi_instances(geom->geometry_instance, instance_pair_buffer, idx);
+ geom->geometry_instance->pair_voxel_gi_instances(instance_pair_buffer, idx);
idata.flags &= ~uint32_t(InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY);
}
@@ -2824,7 +2824,7 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
for (uint32_t j = 0; j < 9; j++) {
sh[j] = sh[j].lerp(target_sh[j], MIN(1.0, lightmap_probe_update_speed));
}
- scene_render->geometry_instance_set_lightmap_capture(geom->geometry_instance, sh);
+ geom->geometry_instance->set_lightmap_capture(sh);
idata.instance->last_frame_pass = frame_number;
}
@@ -3245,7 +3245,7 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c
render_sdfgi_data[i].instances.clear();
}
- // virtual void render_scene(RID p_render_buffers, const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold,const RenderShadowData *p_render_shadows,int p_render_shadow_count,const RenderSDFGIData *p_render_sdfgi_regions,int p_render_sdfgi_region_count,const RenderSDFGIStaticLightData *p_render_sdfgi_static_lights=nullptr) = 0;
+ // virtual void render_scene(RID p_render_buffers, const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold,const RenderShadowData *p_render_shadows,int p_render_shadow_count,const RenderSDFGIData *p_render_sdfgi_regions,int p_render_sdfgi_region_count,const RenderSDFGIStaticLightData *p_render_sdfgi_static_lights=nullptr) = 0;
}
RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) {
@@ -3284,7 +3284,7 @@ void RendererSceneCull::render_empty_scene(RID p_render_buffers, RID p_scenario,
RendererSceneRender::CameraData camera_data;
camera_data.set_camera(Transform3D(), Projection(), true, false);
- scene_render->render_scene(p_render_buffers, &camera_data, &camera_data, PagedArray<RendererSceneRender::GeometryInstance *>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), RID(), RID(), p_shadow_atlas, RID(), scenario->reflection_atlas, RID(), 0, 0, nullptr, 0, nullptr, 0, nullptr);
+ scene_render->render_scene(p_render_buffers, &camera_data, &camera_data, PagedArray<RenderGeometryInstance *>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), RID(), RID(), p_shadow_atlas, RID(), scenario->reflection_atlas, RID(), 0, 0, nullptr, 0, nullptr, 0, nullptr);
#endif
}
@@ -3588,7 +3588,7 @@ void RendererSceneCull::render_probes() {
}
}
- scene_render->geometry_instance_pair_voxel_gi_instances(geom->geometry_instance, instance_pair_buffer, idx);
+ geom->geometry_instance->pair_voxel_gi_instances(instance_pair_buffer, idx);
ins->scenario->instance_data[ins->array_index].flags &= ~uint32_t(InstanceData::FLAG_GEOM_VOXEL_GI_DIRTY);
}
@@ -3850,18 +3850,18 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) {
if (p_instance->instance_allocated_shader_parameters != (p_instance->instance_shader_parameters.size() > 0)) {
p_instance->instance_allocated_shader_parameters = (p_instance->instance_shader_parameters.size() > 0);
if (p_instance->instance_allocated_shader_parameters) {
- p_instance->instance_allocated_shader_parameters_offset = RSG::material_storage->global_variables_instance_allocate(p_instance->self);
- scene_render->geometry_instance_set_instance_shader_parameters_offset(geom->geometry_instance, p_instance->instance_allocated_shader_parameters_offset);
+ p_instance->instance_allocated_shader_parameters_offset = RSG::material_storage->global_shader_uniforms_instance_allocate(p_instance->self);
+ geom->geometry_instance->set_instance_shader_parameters_offset(p_instance->instance_allocated_shader_parameters_offset);
for (const KeyValue<StringName, Instance::InstanceShaderParameter> &E : p_instance->instance_shader_parameters) {
if (E.value.value.get_type() != Variant::NIL) {
- RSG::material_storage->global_variables_instance_update(p_instance->self, E.value.index, E.value.value);
+ RSG::material_storage->global_shader_uniforms_instance_update(p_instance->self, E.value.index, E.value.value);
}
}
} else {
- RSG::material_storage->global_variables_instance_free(p_instance->self);
+ RSG::material_storage->global_shader_uniforms_instance_free(p_instance->self);
p_instance->instance_allocated_shader_parameters_offset = -1;
- scene_render->geometry_instance_set_instance_shader_parameters_offset(geom->geometry_instance, -1);
+ geom->geometry_instance->set_instance_shader_parameters_offset(-1);
}
}
}
@@ -3874,7 +3874,7 @@ void RendererSceneCull::_update_dirty_instance(Instance *p_instance) {
if ((1 << p_instance->base_type) & RS::INSTANCE_GEOMETRY_MASK) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data);
- scene_render->geometry_instance_set_surface_materials(geom->geometry_instance, p_instance->materials);
+ geom->geometry_instance->set_surface_materials(p_instance->materials);
}
}
@@ -3955,7 +3955,7 @@ bool RendererSceneCull::free(RID p_rid) {
if (instance->instance_allocated_shader_parameters) {
//free the used shader parameters
- RSG::material_storage->global_variables_instance_free(instance->self);
+ RSG::material_storage->global_shader_uniforms_instance_free(instance->self);
}
update_dirty_instances(); //in case something changed this
diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h
index 9a46f6b873..3a2b0a0fdf 100644
--- a/servers/rendering/renderer_scene_cull.h
+++ b/servers/rendering/renderer_scene_cull.h
@@ -272,7 +272,7 @@ public:
RID base_rid;
union {
uint64_t instance_data_rid;
- RendererSceneRender::GeometryInstance *instance_geometry;
+ RenderGeometryInstance *instance_geometry;
InstanceVisibilityNotifierData *visibility_notifier = nullptr;
};
Instance *instance = nullptr;
@@ -578,7 +578,7 @@ public:
void _instance_queue_update(Instance *p_instance, bool p_update_aabb, bool p_update_dependencies = false);
struct InstanceGeometryData : public InstanceBaseData {
- RendererSceneRender::GeometryInstance *geometry_instance = nullptr;
+ RenderGeometryInstance *geometry_instance = nullptr;
HashSet<Instance *> lights;
bool can_cast_shadows;
bool material_is_animated;
@@ -782,14 +782,14 @@ public:
HashSet<Instance *> heightfield_particle_colliders_update_list;
PagedArrayPool<Instance *> instance_cull_page_pool;
- PagedArrayPool<RendererSceneRender::GeometryInstance *> geometry_instance_cull_page_pool;
+ PagedArrayPool<RenderGeometryInstance *> geometry_instance_cull_page_pool;
PagedArrayPool<RID> rid_cull_page_pool;
PagedArray<Instance *> instance_cull_result;
PagedArray<Instance *> instance_shadow_cull_result;
struct InstanceCullResult {
- PagedArray<RendererSceneRender::GeometryInstance *> geometry_instances;
+ PagedArray<RenderGeometryInstance *> geometry_instances;
PagedArray<Instance *> lights;
PagedArray<RID> light_instances;
PagedArray<RID> lightmaps;
@@ -800,10 +800,10 @@ public:
PagedArray<RID> fog_volumes;
struct DirectionalShadow {
- PagedArray<RendererSceneRender::GeometryInstance *> cascade_geometry_instances[RendererSceneRender::MAX_DIRECTIONAL_LIGHT_CASCADES];
+ PagedArray<RenderGeometryInstance *> cascade_geometry_instances[RendererSceneRender::MAX_DIRECTIONAL_LIGHT_CASCADES];
} directional_shadows[RendererSceneRender::MAX_DIRECTIONAL_LIGHTS];
- PagedArray<RendererSceneRender::GeometryInstance *> sdfgi_region_geometry_instances[SDFGI_MAX_CASCADES * SDFGI_MAX_REGIONS_PER_CASCADE];
+ PagedArray<RenderGeometryInstance *> sdfgi_region_geometry_instances[SDFGI_MAX_CASCADES * SDFGI_MAX_REGIONS_PER_CASCADE];
PagedArray<RID> sdfgi_cascade_lights[SDFGI_MAX_CASCADES];
void clear() {
@@ -882,7 +882,7 @@ public:
}
}
- void init(PagedArrayPool<RID> *p_rid_pool, PagedArrayPool<RendererSceneRender::GeometryInstance *> *p_geometry_instance_pool, PagedArrayPool<Instance *> *p_instance_pool) {
+ void init(PagedArrayPool<RID> *p_rid_pool, PagedArrayPool<RenderGeometryInstance *> *p_geometry_instance_pool, PagedArrayPool<Instance *> *p_instance_pool) {
geometry_instances.set_page_pool(p_geometry_instance_pool);
light_instances.set_page_pool(p_rid_pool);
lights.set_page_pool(p_instance_pool);
@@ -1093,6 +1093,7 @@ public:
PASS1RC(bool, is_environment, RID)
+ // Background
PASS2(environment_set_background, RID, RS::EnvironmentBG)
PASS2(environment_set_sky, RID, RID)
PASS2(environment_set_sky_custom_fov, RID, float)
@@ -1102,36 +1103,146 @@ public:
PASS2(environment_set_canvas_max_layer, RID, int)
PASS6(environment_set_ambient_light, RID, const Color &, RS::EnvironmentAmbientSource, float, float, RS::EnvironmentReflectionSource)
+ PASS1RC(RS::EnvironmentBG, environment_get_background, RID)
+ PASS1RC(RID, environment_get_sky, RID)
+ PASS1RC(float, environment_get_sky_custom_fov, RID)
+ PASS1RC(Basis, environment_get_sky_orientation, RID)
+ PASS1RC(Color, environment_get_bg_color, RID)
+ PASS1RC(float, environment_get_bg_energy, RID)
+ PASS1RC(int, environment_get_canvas_max_layer, RID)
+ PASS1RC(RS::EnvironmentAmbientSource, environment_get_ambient_source, RID)
+ PASS1RC(Color, environment_get_ambient_light, RID)
+ PASS1RC(float, environment_get_ambient_light_energy, RID)
+ PASS1RC(float, environment_get_ambient_sky_contribution, RID)
+ PASS1RC(RS::EnvironmentReflectionSource, environment_get_reflection_source, RID)
+
+ // Tonemap
+ PASS9(environment_set_tonemap, RID, RS::EnvironmentToneMapper, float, float, bool, float, float, float, float)
+ PASS1RC(RS::EnvironmentToneMapper, environment_get_tone_mapper, RID)
+ PASS1RC(float, environment_get_exposure, RID)
+ PASS1RC(float, environment_get_white, RID)
+ PASS1RC(bool, environment_get_auto_exposure, RID)
+ PASS1RC(float, environment_get_min_luminance, RID)
+ PASS1RC(float, environment_get_max_luminance, RID)
+ PASS1RC(float, environment_get_auto_exp_speed, RID)
+ PASS1RC(float, environment_get_auto_exp_scale, RID)
+ PASS1RC(uint64_t, environment_get_auto_exposure_version, RID)
+
+ // Fog
+ PASS9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
+
+ PASS1RC(bool, environment_get_fog_enabled, RID)
+ PASS1RC(Color, environment_get_fog_light_color, RID)
+ PASS1RC(float, environment_get_fog_light_energy, RID)
+ PASS1RC(float, environment_get_fog_sun_scatter, RID)
+ PASS1RC(float, environment_get_fog_density, RID)
+ PASS1RC(float, environment_get_fog_height, RID)
+ PASS1RC(float, environment_get_fog_height_density, RID)
+ PASS1RC(float, environment_get_fog_aerial_perspective, RID)
+
+ PASS2(environment_set_volumetric_fog_volume_size, int, int)
+ PASS1(environment_set_volumetric_fog_filter_active, bool)
+
+ // Volumentric Fog
+ PASS13(environment_set_volumetric_fog, RID, bool, float, const Color &, const Color &, float, float, float, float, float, bool, float, float)
+
+ PASS1RC(bool, environment_get_volumetric_fog_enabled, RID)
+ PASS1RC(float, environment_get_volumetric_fog_density, RID)
+ PASS1RC(Color, environment_get_volumetric_fog_scattering, RID)
+ PASS1RC(Color, environment_get_volumetric_fog_emission, RID)
+ PASS1RC(float, environment_get_volumetric_fog_emission_energy, RID)
+ PASS1RC(float, environment_get_volumetric_fog_anisotropy, RID)
+ PASS1RC(float, environment_get_volumetric_fog_length, RID)
+ PASS1RC(float, environment_get_volumetric_fog_detail_spread, RID)
+ PASS1RC(float, environment_get_volumetric_fog_gi_inject, RID)
+ PASS1RC(bool, environment_get_volumetric_fog_temporal_reprojection, RID)
+ PASS1RC(float, environment_get_volumetric_fog_temporal_reprojection_amount, RID)
+ PASS1RC(float, environment_get_volumetric_fog_ambient_inject, RID)
+
+ // Glow
+ PASS13(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, RS::EnvironmentGlowBlendMode, float, float, float, float, RID)
+
+ PASS1RC(bool, environment_get_glow_enabled, RID)
+ PASS1RC(Vector<float>, environment_get_glow_levels, RID)
+ PASS1RC(float, environment_get_glow_intensity, RID)
+ PASS1RC(float, environment_get_glow_strength, RID)
+ PASS1RC(float, environment_get_glow_bloom, RID)
+ PASS1RC(float, environment_get_glow_mix, RID)
+ PASS1RC(RS::EnvironmentGlowBlendMode, environment_get_glow_blend_mode, RID)
+ PASS1RC(float, environment_get_glow_hdr_bleed_threshold, RID)
+ PASS1RC(float, environment_get_glow_hdr_luminance_cap, RID)
+ PASS1RC(float, environment_get_glow_hdr_bleed_scale, RID)
+ PASS1RC(float, environment_get_glow_map_strength, RID)
+ PASS1RC(RID, environment_get_glow_map, RID)
+
+ PASS1(environment_glow_set_use_bicubic_upscale, bool)
+ PASS1(environment_glow_set_use_high_quality, bool)
+
+ // SSR
PASS6(environment_set_ssr, RID, bool, int, float, float, float)
+
+ PASS1RC(bool, environment_get_ssr_enabled, RID)
+ PASS1RC(int, environment_get_ssr_max_steps, RID)
+ PASS1RC(float, environment_get_ssr_fade_in, RID)
+ PASS1RC(float, environment_get_ssr_fade_out, RID)
+ PASS1RC(float, environment_get_ssr_depth_tolerance, RID)
+
PASS1(environment_set_ssr_roughness_quality, RS::EnvironmentSSRRoughnessQuality)
+ // SSAO
PASS10(environment_set_ssao, RID, bool, float, float, float, float, float, float, float, float)
+
+ PASS1RC(bool, environment_get_ssao_enabled, RID)
+ PASS1RC(float, environment_get_ssao_radius, RID)
+ PASS1RC(float, environment_get_ssao_intensity, RID)
+ PASS1RC(float, environment_get_ssao_power, RID)
+ PASS1RC(float, environment_get_ssao_detail, RID)
+ PASS1RC(float, environment_get_ssao_horizon, RID)
+ PASS1RC(float, environment_get_ssao_sharpness, RID)
+ PASS1RC(float, environment_get_ssao_direct_light_affect, RID)
+ PASS1RC(float, environment_get_ssao_ao_channel_affect, RID)
+
PASS6(environment_set_ssao_quality, RS::EnvironmentSSAOQuality, bool, float, int, float, float)
+ // SSIL
PASS6(environment_set_ssil, RID, bool, float, float, float, float)
- PASS6(environment_set_ssil_quality, RS::EnvironmentSSILQuality, bool, float, int, float, float)
- PASS13(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, RS::EnvironmentGlowBlendMode, float, float, float, float, RID)
- PASS1(environment_glow_set_use_bicubic_upscale, bool)
- PASS1(environment_glow_set_use_high_quality, bool)
+ PASS1RC(bool, environment_get_ssil_enabled, RID)
+ PASS1RC(float, environment_get_ssil_radius, RID)
+ PASS1RC(float, environment_get_ssil_intensity, RID)
+ PASS1RC(float, environment_get_ssil_sharpness, RID)
+ PASS1RC(float, environment_get_ssil_normal_rejection, RID)
- PASS9(environment_set_tonemap, RID, RS::EnvironmentToneMapper, float, float, bool, float, float, float, float)
+ PASS6(environment_set_ssil_quality, RS::EnvironmentSSILQuality, bool, float, int, float, float)
- PASS7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
+ // SDFGI
- PASS9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
- PASS13(environment_set_volumetric_fog, RID, bool, float, const Color &, const Color &, float, float, float, float, float, bool, float, float)
+ PASS11(environment_set_sdfgi, RID, bool, int, float, RS::EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
- PASS2(environment_set_volumetric_fog_volume_size, int, int)
- PASS1(environment_set_volumetric_fog_filter_active, bool)
+ PASS1RC(bool, environment_get_sdfgi_enabled, RID)
+ PASS1RC(int, environment_get_sdfgi_cascades, RID)
+ PASS1RC(float, environment_get_sdfgi_min_cell_size, RID)
+ PASS1RC(bool, environment_get_sdfgi_use_occlusion, RID)
+ PASS1RC(float, environment_get_sdfgi_bounce_feedback, RID)
+ PASS1RC(bool, environment_get_sdfgi_read_sky_light, RID)
+ PASS1RC(float, environment_get_sdfgi_energy, RID)
+ PASS1RC(float, environment_get_sdfgi_normal_bias, RID)
+ PASS1RC(float, environment_get_sdfgi_probe_bias, RID)
+ PASS1RC(RS::EnvironmentSDFGIYScale, environment_get_sdfgi_y_scale, RID)
- PASS11(environment_set_sdfgi, RID, bool, int, float, RS::EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
PASS1(environment_set_sdfgi_ray_count, RS::EnvironmentSDFGIRayCount)
PASS1(environment_set_sdfgi_frames_to_converge, RS::EnvironmentSDFGIFramesToConverge)
PASS1(environment_set_sdfgi_frames_to_update_light, RS::EnvironmentSDFGIFramesToUpdateLight)
- PASS1RC(RS::EnvironmentBG, environment_get_background, RID)
- PASS1RC(int, environment_get_canvas_max_layer, RID)
+ // Adjustment
+ PASS7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
+
+ PASS1RC(bool, environment_get_adjustments_enabled, RID)
+ PASS1RC(float, environment_get_adjustments_brightness, RID)
+ PASS1RC(float, environment_get_adjustments_contrast, RID)
+ PASS1RC(float, environment_get_adjustments_saturation, RID)
+ PASS1RC(bool, environment_get_use_1d_color_correction, RID)
+ PASS1RC(RID, environment_get_color_correction, RID)
PASS3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
diff --git a/servers/rendering/renderer_scene_render.cpp b/servers/rendering/renderer_scene_render.cpp
index c0ad0d1187..e024e59ec3 100644
--- a/servers/rendering/renderer_scene_render.cpp
+++ b/servers/rendering/renderer_scene_render.cpp
@@ -30,6 +30,9 @@
#include "renderer_scene_render.h"
+/////////////////////////////////////////////////////////////////////////////
+// CameraData
+
void RendererSceneRender::CameraData::set_camera(const Transform3D p_transform, const Projection p_projection, bool p_is_orthogonal, bool p_vaspect, const Vector2 &p_taa_jitter) {
view_count = 1;
is_orthogonal = p_is_orthogonal;
@@ -180,3 +183,461 @@ void RendererSceneRender::CameraData::set_multiview_camera(uint32_t p_view_count
view_projection[v] = p_projections[v] * Projection(view_offset[v].inverse());
}
}
+
+/* Environment API */
+
+RID RendererSceneRender::environment_allocate() {
+ return environment_storage.environment_allocate();
+}
+
+void RendererSceneRender::environment_initialize(RID p_rid) {
+ environment_storage.environment_initialize(p_rid);
+}
+
+void RendererSceneRender::environment_free(RID p_rid) {
+ environment_storage.environment_free(p_rid);
+}
+
+bool RendererSceneRender::is_environment(RID p_rid) const {
+ return environment_storage.is_environment(p_rid);
+}
+
+// background
+
+void RendererSceneRender::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
+ environment_storage.environment_set_background(p_env, p_bg);
+}
+
+void RendererSceneRender::environment_set_sky(RID p_env, RID p_sky) {
+ environment_storage.environment_set_sky(p_env, p_sky);
+}
+
+void RendererSceneRender::environment_set_sky_custom_fov(RID p_env, float p_scale) {
+ environment_storage.environment_set_sky_custom_fov(p_env, p_scale);
+}
+
+void RendererSceneRender::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
+ environment_storage.environment_set_sky_orientation(p_env, p_orientation);
+}
+
+void RendererSceneRender::environment_set_bg_color(RID p_env, const Color &p_color) {
+ environment_storage.environment_set_bg_color(p_env, p_color);
+}
+
+void RendererSceneRender::environment_set_bg_energy(RID p_env, float p_energy) {
+ environment_storage.environment_set_bg_energy(p_env, p_energy);
+}
+
+void RendererSceneRender::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
+ environment_storage.environment_set_canvas_max_layer(p_env, p_max_layer);
+}
+
+void RendererSceneRender::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source) {
+ environment_storage.environment_set_ambient_light(p_env, p_color, p_ambient, p_energy, p_sky_contribution, p_reflection_source);
+}
+
+RS::EnvironmentBG RendererSceneRender::environment_get_background(RID p_env) const {
+ return environment_storage.environment_get_background(p_env);
+}
+
+RID RendererSceneRender::environment_get_sky(RID p_env) const {
+ return environment_storage.environment_get_sky(p_env);
+}
+
+float RendererSceneRender::environment_get_sky_custom_fov(RID p_env) const {
+ return environment_storage.environment_get_sky_custom_fov(p_env);
+}
+
+Basis RendererSceneRender::environment_get_sky_orientation(RID p_env) const {
+ return environment_storage.environment_get_sky_orientation(p_env);
+}
+
+Color RendererSceneRender::environment_get_bg_color(RID p_env) const {
+ return environment_storage.environment_get_bg_color(p_env);
+}
+
+float RendererSceneRender::environment_get_bg_energy(RID p_env) const {
+ return environment_storage.environment_get_bg_energy(p_env);
+}
+
+int RendererSceneRender::environment_get_canvas_max_layer(RID p_env) const {
+ return environment_storage.environment_get_canvas_max_layer(p_env);
+}
+
+RS::EnvironmentAmbientSource RendererSceneRender::environment_get_ambient_source(RID p_env) const {
+ return environment_storage.environment_get_ambient_source(p_env);
+}
+
+Color RendererSceneRender::environment_get_ambient_light(RID p_env) const {
+ return environment_storage.environment_get_ambient_light(p_env);
+}
+
+float RendererSceneRender::environment_get_ambient_light_energy(RID p_env) const {
+ return environment_storage.environment_get_ambient_light_energy(p_env);
+}
+
+float RendererSceneRender::environment_get_ambient_sky_contribution(RID p_env) const {
+ return environment_storage.environment_get_ambient_sky_contribution(p_env);
+}
+
+RS::EnvironmentReflectionSource RendererSceneRender::environment_get_reflection_source(RID p_env) const {
+ return environment_storage.environment_get_reflection_source(p_env);
+}
+
+// Tonemap
+
+void RendererSceneRender::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
+ environment_storage.environment_set_tonemap(p_env, p_tone_mapper, p_exposure, p_white, p_auto_exposure, p_min_luminance, p_max_luminance, p_auto_exp_speed, p_auto_exp_scale);
+}
+
+RS::EnvironmentToneMapper RendererSceneRender::environment_get_tone_mapper(RID p_env) const {
+ return environment_storage.environment_get_tone_mapper(p_env);
+}
+
+float RendererSceneRender::environment_get_exposure(RID p_env) const {
+ return environment_storage.environment_get_exposure(p_env);
+}
+
+float RendererSceneRender::environment_get_white(RID p_env) const {
+ return environment_storage.environment_get_white(p_env);
+}
+
+bool RendererSceneRender::environment_get_auto_exposure(RID p_env) const {
+ return environment_storage.environment_get_auto_exposure(p_env);
+}
+
+float RendererSceneRender::environment_get_min_luminance(RID p_env) const {
+ return environment_storage.environment_get_min_luminance(p_env);
+}
+
+float RendererSceneRender::environment_get_max_luminance(RID p_env) const {
+ return environment_storage.environment_get_max_luminance(p_env);
+}
+
+float RendererSceneRender::environment_get_auto_exp_speed(RID p_env) const {
+ return environment_storage.environment_get_auto_exp_speed(p_env);
+}
+
+float RendererSceneRender::environment_get_auto_exp_scale(RID p_env) const {
+ return environment_storage.environment_get_auto_exp_scale(p_env);
+}
+
+uint64_t RendererSceneRender::environment_get_auto_exposure_version(RID p_env) const {
+ return environment_storage.environment_get_auto_exposure_version(p_env);
+}
+
+// Fog
+
+void RendererSceneRender::environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) {
+ environment_storage.environment_set_fog(p_env, p_enable, p_light_color, p_light_energy, p_sun_scatter, p_density, p_height, p_height_density, p_aerial_perspective);
+}
+
+bool RendererSceneRender::environment_get_fog_enabled(RID p_env) const {
+ return environment_storage.environment_get_fog_enabled(p_env);
+}
+
+Color RendererSceneRender::environment_get_fog_light_color(RID p_env) const {
+ return environment_storage.environment_get_fog_light_color(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_light_energy(RID p_env) const {
+ return environment_storage.environment_get_fog_light_energy(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_sun_scatter(RID p_env) const {
+ return environment_storage.environment_get_fog_sun_scatter(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_density(RID p_env) const {
+ return environment_storage.environment_get_fog_density(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_height(RID p_env) const {
+ return environment_storage.environment_get_fog_height(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_height_density(RID p_env) const {
+ return environment_storage.environment_get_fog_height_density(p_env);
+}
+
+float RendererSceneRender::environment_get_fog_aerial_perspective(RID p_env) const {
+ return environment_storage.environment_get_fog_aerial_perspective(p_env);
+}
+
+// Volumetric Fog
+
+void RendererSceneRender::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) {
+ environment_storage.environment_set_volumetric_fog(p_env, p_enable, p_density, p_albedo, p_emission, p_emission_energy, p_anisotropy, p_length, p_detail_spread, p_gi_inject, p_temporal_reprojection, p_temporal_reprojection_amount, p_ambient_inject);
+}
+
+bool RendererSceneRender::environment_get_volumetric_fog_enabled(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_enabled(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_density(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_density(p_env);
+}
+
+Color RendererSceneRender::environment_get_volumetric_fog_scattering(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_scattering(p_env);
+}
+
+Color RendererSceneRender::environment_get_volumetric_fog_emission(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_emission(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_emission_energy(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_emission_energy(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_anisotropy(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_anisotropy(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_length(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_length(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_detail_spread(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_detail_spread(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_gi_inject(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_gi_inject(p_env);
+}
+
+bool RendererSceneRender::environment_get_volumetric_fog_temporal_reprojection(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_temporal_reprojection(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_temporal_reprojection_amount(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_temporal_reprojection_amount(p_env);
+}
+
+float RendererSceneRender::environment_get_volumetric_fog_ambient_inject(RID p_env) const {
+ return environment_storage.environment_get_volumetric_fog_ambient_inject(p_env);
+}
+
+// GLOW
+
+void RendererSceneRender::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
+ environment_storage.environment_set_glow(p_env, p_enable, p_levels, p_intensity, p_strength, p_mix, p_bloom_threshold, p_blend_mode, p_hdr_bleed_threshold, p_hdr_bleed_scale, p_hdr_luminance_cap, p_glow_map_strength, p_glow_map);
+}
+
+bool RendererSceneRender::environment_get_glow_enabled(RID p_env) const {
+ return environment_storage.environment_get_glow_enabled(p_env);
+}
+
+Vector<float> RendererSceneRender::environment_get_glow_levels(RID p_env) const {
+ return environment_storage.environment_get_glow_levels(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_intensity(RID p_env) const {
+ return environment_storage.environment_get_glow_intensity(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_strength(RID p_env) const {
+ return environment_storage.environment_get_glow_strength(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_bloom(RID p_env) const {
+ return environment_storage.environment_get_glow_bloom(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_mix(RID p_env) const {
+ return environment_storage.environment_get_glow_mix(p_env);
+}
+
+RS::EnvironmentGlowBlendMode RendererSceneRender::environment_get_glow_blend_mode(RID p_env) const {
+ return environment_storage.environment_get_glow_blend_mode(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_hdr_bleed_threshold(RID p_env) const {
+ return environment_storage.environment_get_glow_hdr_bleed_threshold(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_hdr_luminance_cap(RID p_env) const {
+ return environment_storage.environment_get_glow_hdr_luminance_cap(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_hdr_bleed_scale(RID p_env) const {
+ return environment_storage.environment_get_glow_hdr_bleed_scale(p_env);
+}
+
+float RendererSceneRender::environment_get_glow_map_strength(RID p_env) const {
+ return environment_storage.environment_get_glow_map_strength(p_env);
+}
+
+RID RendererSceneRender::environment_get_glow_map(RID p_env) const {
+ return environment_storage.environment_get_glow_map(p_env);
+}
+
+// SSR
+
+void RendererSceneRender::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
+ environment_storage.environment_set_ssr(p_env, p_enable, p_max_steps, p_fade_int, p_fade_out, p_depth_tolerance);
+}
+
+bool RendererSceneRender::environment_get_ssr_enabled(RID p_env) const {
+ return environment_storage.environment_get_ssr_enabled(p_env);
+}
+
+int RendererSceneRender::environment_get_ssr_max_steps(RID p_env) const {
+ return environment_storage.environment_get_ssr_max_steps(p_env);
+}
+
+float RendererSceneRender::environment_get_ssr_fade_in(RID p_env) const {
+ return environment_storage.environment_get_ssr_fade_in(p_env);
+}
+
+float RendererSceneRender::environment_get_ssr_fade_out(RID p_env) const {
+ return environment_storage.environment_get_ssr_fade_out(p_env);
+}
+
+float RendererSceneRender::environment_get_ssr_depth_tolerance(RID p_env) const {
+ return environment_storage.environment_get_ssr_depth_tolerance(p_env);
+}
+
+// SSAO
+
+void RendererSceneRender::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
+ environment_storage.environment_set_ssao(p_env, p_enable, p_radius, p_intensity, p_power, p_detail, p_horizon, p_sharpness, p_light_affect, p_ao_channel_affect);
+}
+
+bool RendererSceneRender::environment_get_ssao_enabled(RID p_env) const {
+ return environment_storage.environment_get_ssao_enabled(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_radius(RID p_env) const {
+ return environment_storage.environment_get_ssao_radius(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_intensity(RID p_env) const {
+ return environment_storage.environment_get_ssao_intensity(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_power(RID p_env) const {
+ return environment_storage.environment_get_ssao_power(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_detail(RID p_env) const {
+ return environment_storage.environment_get_ssao_detail(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_horizon(RID p_env) const {
+ return environment_storage.environment_get_ssao_horizon(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_sharpness(RID p_env) const {
+ return environment_storage.environment_get_ssao_sharpness(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_direct_light_affect(RID p_env) const {
+ return environment_storage.environment_get_ssao_direct_light_affect(p_env);
+}
+
+float RendererSceneRender::environment_get_ssao_ao_channel_affect(RID p_env) const {
+ return environment_storage.environment_get_ssao_ao_channel_affect(p_env);
+}
+
+// SSIL
+
+void RendererSceneRender::environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) {
+ environment_storage.environment_set_ssil(p_env, p_enable, p_radius, p_intensity, p_sharpness, p_normal_rejection);
+}
+
+bool RendererSceneRender::environment_get_ssil_enabled(RID p_env) const {
+ return environment_storage.environment_get_ssil_enabled(p_env);
+}
+
+float RendererSceneRender::environment_get_ssil_radius(RID p_env) const {
+ return environment_storage.environment_get_ssil_radius(p_env);
+}
+
+float RendererSceneRender::environment_get_ssil_intensity(RID p_env) const {
+ return environment_storage.environment_get_ssil_intensity(p_env);
+}
+
+float RendererSceneRender::environment_get_ssil_sharpness(RID p_env) const {
+ return environment_storage.environment_get_ssil_sharpness(p_env);
+}
+
+float RendererSceneRender::environment_get_ssil_normal_rejection(RID p_env) const {
+ return environment_storage.environment_get_ssil_normal_rejection(p_env);
+}
+
+// SDFGI
+
+void RendererSceneRender::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+ environment_storage.environment_set_sdfgi(p_env, p_enable, p_cascades, p_min_cell_size, p_y_scale, p_use_occlusion, p_bounce_feedback, p_read_sky, p_energy, p_normal_bias, p_probe_bias);
+}
+
+bool RendererSceneRender::environment_get_sdfgi_enabled(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_enabled(p_env);
+}
+
+int RendererSceneRender::environment_get_sdfgi_cascades(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_cascades(p_env);
+}
+
+float RendererSceneRender::environment_get_sdfgi_min_cell_size(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_min_cell_size(p_env);
+}
+
+bool RendererSceneRender::environment_get_sdfgi_use_occlusion(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_use_occlusion(p_env);
+}
+
+float RendererSceneRender::environment_get_sdfgi_bounce_feedback(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_bounce_feedback(p_env);
+}
+
+bool RendererSceneRender::environment_get_sdfgi_read_sky_light(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_read_sky_light(p_env);
+}
+
+float RendererSceneRender::environment_get_sdfgi_energy(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_energy(p_env);
+}
+
+float RendererSceneRender::environment_get_sdfgi_normal_bias(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_normal_bias(p_env);
+}
+
+float RendererSceneRender::environment_get_sdfgi_probe_bias(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_probe_bias(p_env);
+}
+
+RS::EnvironmentSDFGIYScale RendererSceneRender::environment_get_sdfgi_y_scale(RID p_env) const {
+ return environment_storage.environment_get_sdfgi_y_scale(p_env);
+}
+
+// Adjustments
+
+void RendererSceneRender::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
+ environment_storage.environment_set_adjustment(p_env, p_enable, p_brightness, p_contrast, p_saturation, p_use_1d_color_correction, p_color_correction);
+}
+
+bool RendererSceneRender::environment_get_adjustments_enabled(RID p_env) const {
+ return environment_storage.environment_get_adjustments_enabled(p_env);
+}
+
+float RendererSceneRender::environment_get_adjustments_brightness(RID p_env) const {
+ return environment_storage.environment_get_adjustments_brightness(p_env);
+}
+
+float RendererSceneRender::environment_get_adjustments_contrast(RID p_env) const {
+ return environment_storage.environment_get_adjustments_contrast(p_env);
+}
+
+float RendererSceneRender::environment_get_adjustments_saturation(RID p_env) const {
+ return environment_storage.environment_get_adjustments_saturation(p_env);
+}
+
+bool RendererSceneRender::environment_get_use_1d_color_correction(RID p_env) const {
+ return environment_storage.environment_get_use_1d_color_correction(p_env);
+}
+
+RID RendererSceneRender::environment_get_color_correction(RID p_env) const {
+ return environment_storage.environment_get_color_correction(p_env);
+}
diff --git a/servers/rendering/renderer_scene_render.h b/servers/rendering/renderer_scene_render.h
index 641e280511..7f70f4b939 100644
--- a/servers/rendering/renderer_scene_render.h
+++ b/servers/rendering/renderer_scene_render.h
@@ -33,9 +33,15 @@
#include "core/math/projection.h"
#include "core/templates/paged_array.h"
+#include "servers/rendering/renderer_geometry_instance.h"
#include "servers/rendering/renderer_scene.h"
+#include "servers/rendering/storage/environment_storage.h"
+#include "storage/utilities.h"
class RendererSceneRender {
+private:
+ RendererEnvironmentStorage environment_storage;
+
public:
enum {
MAX_DIRECTIONAL_LIGHTS = 8,
@@ -43,38 +49,11 @@ public:
MAX_RENDER_VIEWS = 2
};
- struct GeometryInstance {
- virtual ~GeometryInstance() {}
- };
-
- virtual GeometryInstance *geometry_instance_create(RID p_base) = 0;
- virtual void geometry_instance_set_skeleton(GeometryInstance *p_geometry_instance, RID p_skeleton) = 0;
- virtual void geometry_instance_set_material_override(GeometryInstance *p_geometry_instance, RID p_override) = 0;
- virtual void geometry_instance_set_material_overlay(GeometryInstance *p_geometry_instance, RID p_override) = 0;
- virtual void geometry_instance_set_surface_materials(GeometryInstance *p_geometry_instance, const Vector<RID> &p_material) = 0;
- virtual void geometry_instance_set_mesh_instance(GeometryInstance *p_geometry_instance, RID p_mesh_instance) = 0;
- virtual void geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabbb) = 0;
- virtual void geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) = 0;
- virtual void geometry_instance_set_lod_bias(GeometryInstance *p_geometry_instance, float p_lod_bias) = 0;
- virtual void geometry_instance_set_transparency(GeometryInstance *p_geometry_instance, float p_transparency) = 0;
- virtual void geometry_instance_set_fade_range(GeometryInstance *p_geometry_instance, bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) = 0;
- virtual void geometry_instance_set_parent_fade_alpha(GeometryInstance *p_geometry_instance, float p_alpha) = 0;
- virtual void geometry_instance_set_use_baked_light(GeometryInstance *p_geometry_instance, bool p_enable) = 0;
- virtual void geometry_instance_set_use_dynamic_gi(GeometryInstance *p_geometry_instance, bool p_enable) = 0;
- virtual void geometry_instance_set_use_lightmap(GeometryInstance *p_geometry_instance, RID p_lightmap_instance, const Rect2 &p_lightmap_uv_scale, int p_lightmap_slice_index) = 0;
- virtual void geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) = 0;
- virtual void geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) = 0;
- virtual void geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) = 0;
+ /* Geometry Instance */
+ virtual RenderGeometryInstance *geometry_instance_create(RID p_base) = 0;
+ virtual void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) = 0;
virtual uint32_t geometry_instance_get_pair_mask() = 0;
- virtual void geometry_instance_pair_light_instances(GeometryInstance *p_geometry_instance, const RID *p_light_instances, uint32_t p_light_instance_count) = 0;
- virtual void geometry_instance_pair_reflection_probe_instances(GeometryInstance *p_geometry_instance, const RID *p_reflection_probe_instances, uint32_t p_reflection_probe_instance_count) = 0;
- virtual void geometry_instance_pair_decal_instances(GeometryInstance *p_geometry_instance, const RID *p_decal_instances, uint32_t p_decal_instance_count) = 0;
- virtual void geometry_instance_pair_voxel_gi_instances(GeometryInstance *p_geometry_instance, const RID *p_voxel_gi_instances, uint32_t p_voxel_gi_instance_count) = 0;
-
- virtual void geometry_instance_set_softshadow_projector_pairing(GeometryInstance *p_geometry_instance, bool p_softshadow, bool p_projector) = 0;
-
- virtual void geometry_instance_free(GeometryInstance *p_geometry_instance) = 0;
/* SHADOW ATLAS API */
@@ -106,57 +85,160 @@ public:
/* ENVIRONMENT API */
- virtual RID environment_allocate() = 0;
- virtual void environment_initialize(RID p_rid) = 0;
-
- virtual void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) = 0;
- virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
- virtual void environment_set_sky_custom_fov(RID p_env, float p_scale) = 0;
- virtual void environment_set_sky_orientation(RID p_env, const Basis &p_orientation) = 0;
- virtual void environment_set_bg_color(RID p_env, const Color &p_color) = 0;
- virtual void environment_set_bg_energy(RID p_env, float p_energy) = 0;
- virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0;
- virtual void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG) = 0;
+ RID environment_allocate();
+ void environment_initialize(RID p_rid);
+ void environment_free(RID p_rid);
+
+ bool is_environment(RID p_env) const;
+
+ // Background
+ void environment_set_background(RID p_env, RS::EnvironmentBG p_bg);
+ void environment_set_sky(RID p_env, RID p_sky);
+ void environment_set_sky_custom_fov(RID p_env, float p_scale);
+ void environment_set_sky_orientation(RID p_env, const Basis &p_orientation);
+ void environment_set_bg_color(RID p_env, const Color &p_color);
+ void environment_set_bg_energy(RID p_env, float p_energy);
+ void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
+ void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG);
// FIXME: Disabled during Vulkan refactoring, should be ported.
#if 0
- virtual void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) = 0;
+ void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id);
#endif
- virtual void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) = 0;
- virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
- virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
+ RS::EnvironmentBG environment_get_background(RID p_env) const;
+ RID environment_get_sky(RID p_env) const;
+ float environment_get_sky_custom_fov(RID p_env) const;
+ Basis environment_get_sky_orientation(RID p_env) const;
+ Color environment_get_bg_color(RID p_env) const;
+ float environment_get_bg_energy(RID p_env) const;
+ int environment_get_canvas_max_layer(RID p_env) const;
+ RS::EnvironmentAmbientSource environment_get_ambient_source(RID p_env) const;
+ Color environment_get_ambient_light(RID p_env) const;
+ float environment_get_ambient_light_energy(RID p_env) const;
+ float environment_get_ambient_sky_contribution(RID p_env) const;
+ RS::EnvironmentReflectionSource environment_get_reflection_source(RID p_env) const;
+
+ // Tonemap
+ void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale);
+ RS::EnvironmentToneMapper environment_get_tone_mapper(RID p_env) const;
+ float environment_get_exposure(RID p_env) const;
+ float environment_get_white(RID p_env) const;
+ bool environment_get_auto_exposure(RID p_env) const;
+ float environment_get_min_luminance(RID p_env) const;
+ float environment_get_max_luminance(RID p_env) const;
+ float environment_get_auto_exp_speed(RID p_env) const;
+ float environment_get_auto_exp_scale(RID p_env) const;
+ uint64_t environment_get_auto_exposure_version(RID p_env) const;
+
+ // Fog
+ void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective);
+ bool environment_get_fog_enabled(RID p_env) const;
+ Color environment_get_fog_light_color(RID p_env) const;
+ float environment_get_fog_light_energy(RID p_env) const;
+ float environment_get_fog_sun_scatter(RID p_env) const;
+ float environment_get_fog_density(RID p_env) const;
+ float environment_get_fog_height(RID p_env) const;
+ float environment_get_fog_height_density(RID p_env) const;
+ float environment_get_fog_aerial_perspective(RID p_env) const;
+
+ // Volumetric Fog
+ void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject);
+ bool environment_get_volumetric_fog_enabled(RID p_env) const;
+ float environment_get_volumetric_fog_density(RID p_env) const;
+ Color environment_get_volumetric_fog_scattering(RID p_env) const;
+ Color environment_get_volumetric_fog_emission(RID p_env) const;
+ float environment_get_volumetric_fog_emission_energy(RID p_env) const;
+ float environment_get_volumetric_fog_anisotropy(RID p_env) const;
+ float environment_get_volumetric_fog_length(RID p_env) const;
+ float environment_get_volumetric_fog_detail_spread(RID p_env) const;
+ float environment_get_volumetric_fog_gi_inject(RID p_env) const;
+ bool environment_get_volumetric_fog_temporal_reprojection(RID p_env) const;
+ float environment_get_volumetric_fog_temporal_reprojection_amount(RID p_env) const;
+ float environment_get_volumetric_fog_ambient_inject(RID p_env) const;
- virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) = 0;
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;
- virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) = 0;
+ // GLOW
+ void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map);
+ bool environment_get_glow_enabled(RID p_env) const;
+ Vector<float> environment_get_glow_levels(RID p_env) const;
+ float environment_get_glow_intensity(RID p_env) const;
+ float environment_get_glow_strength(RID p_env) const;
+ float environment_get_glow_bloom(RID p_env) const;
+ float environment_get_glow_mix(RID p_env) const;
+ RS::EnvironmentGlowBlendMode environment_get_glow_blend_mode(RID p_env) const;
+ float environment_get_glow_hdr_bleed_threshold(RID p_env) const;
+ float environment_get_glow_hdr_luminance_cap(RID p_env) const;
+ float environment_get_glow_hdr_bleed_scale(RID p_env) const;
+ float environment_get_glow_map_strength(RID p_env) const;
+ RID environment_get_glow_map(RID p_env) const;
+
+ virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
+ virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
+
+ // SSR
+ void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance);
+ bool environment_get_ssr_enabled(RID p_env) const;
+ int environment_get_ssr_max_steps(RID p_env) const;
+ float environment_get_ssr_fade_in(RID p_env) const;
+ float environment_get_ssr_fade_out(RID p_env) const;
+ float environment_get_ssr_depth_tolerance(RID p_env) const;
+
virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) = 0;
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) = 0;
+ // SSAO
+ void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect);
+ bool environment_get_ssao_enabled(RID p_env) const;
+ float environment_get_ssao_radius(RID p_env) const;
+ float environment_get_ssao_intensity(RID p_env) const;
+ float environment_get_ssao_power(RID p_env) const;
+ float environment_get_ssao_detail(RID p_env) const;
+ float environment_get_ssao_horizon(RID p_env) const;
+ float environment_get_ssao_sharpness(RID p_env) const;
+ float environment_get_ssao_direct_light_affect(RID p_env) const;
+ float environment_get_ssao_ao_channel_affect(RID p_env) const;
+
virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) = 0;
+ // SSIL
+ void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection);
+ bool environment_get_ssil_enabled(RID p_env) const;
+ float environment_get_ssil_radius(RID p_env) const;
+ float environment_get_ssil_intensity(RID p_env) const;
+ float environment_get_ssil_sharpness(RID p_env) const;
+ float environment_get_ssil_normal_rejection(RID p_env) const;
+
virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ // SDFGI
+ void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
+ bool environment_get_sdfgi_enabled(RID p_env) const;
+ int environment_get_sdfgi_cascades(RID p_env) const;
+ float environment_get_sdfgi_min_cell_size(RID p_env) const;
+ bool environment_get_sdfgi_use_occlusion(RID p_env) const;
+ float environment_get_sdfgi_bounce_feedback(RID p_env) const;
+ bool environment_get_sdfgi_read_sky_light(RID p_env) const;
+ float environment_get_sdfgi_energy(RID p_env) const;
+ float environment_get_sdfgi_normal_bias(RID p_env) const;
+ float environment_get_sdfgi_probe_bias(RID p_env) const;
+ RS::EnvironmentSDFGIYScale environment_get_sdfgi_y_scale(RID p_env) const;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) = 0;
- virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
-
- virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) = 0;
-
- virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0;
+ // Adjustment
+ void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction);
+ bool environment_get_adjustments_enabled(RID p_env) const;
+ float environment_get_adjustments_brightness(RID p_env) const;
+ float environment_get_adjustments_contrast(RID p_env) const;
+ float environment_get_adjustments_saturation(RID p_env) const;
+ bool environment_get_use_1d_color_correction(RID p_env) const;
+ RID environment_get_color_correction(RID p_env) const;
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) = 0;
- virtual bool is_environment(RID p_env) const = 0;
- virtual RS::EnvironmentBG environment_get_background(RID p_env) const = 0;
- virtual int environment_get_canvas_max_layer(RID p_env) const = 0;
-
virtual RID camera_effects_allocate() = 0;
virtual void camera_effects_initialize(RID p_rid) = 0;
@@ -205,19 +287,19 @@ public:
virtual RID voxel_gi_instance_create(RID p_voxel_gi) = 0;
virtual void voxel_gi_instance_set_transform_to_data(RID p_probe, const Transform3D &p_xform) = 0;
virtual bool voxel_gi_needs_update(RID p_probe) const = 0;
- virtual void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<GeometryInstance *> &p_dynamic_objects) = 0;
+ virtual void voxel_gi_update(RID p_probe, bool p_update_light_instances, const Vector<RID> &p_light_instances, const PagedArray<RenderGeometryInstance *> &p_dynamic_objects) = 0;
virtual void voxel_gi_set_quality(RS::VoxelGIQuality) = 0;
struct RenderShadowData {
RID light;
int pass = 0;
- PagedArray<GeometryInstance *> instances;
+ PagedArray<RenderGeometryInstance *> instances;
};
struct RenderSDFGIData {
int region = 0;
- PagedArray<GeometryInstance *> instances;
+ PagedArray<RenderGeometryInstance *> instances;
};
struct RenderSDFGIUpdateData {
@@ -249,17 +331,17 @@ public:
void set_multiview_camera(uint32_t p_view_count, const Transform3D *p_transforms, const Projection *p_projections, bool p_is_orthogonal, bool p_vaspect);
};
- virtual void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) = 0;
+ virtual void render_scene(RID p_render_buffers, const CameraData *p_camera_data, const CameraData *p_prev_camera_data, const PagedArray<RenderGeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_voxel_gi_instances, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, const PagedArray<RID> &p_fog_volumes, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_occluder_debug_tex, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_mesh_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr, RendererScene::RenderInfo *r_render_info = nullptr) = 0;
- virtual void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
- virtual void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<GeometryInstance *> &p_instances) = 0;
+ virtual void render_material(const Transform3D &p_cam_transform, const Projection &p_cam_projection, bool p_cam_orthogonal, const PagedArray<RenderGeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
+ virtual void render_particle_collider_heightfield(RID p_collider, const Transform3D &p_transform, const PagedArray<RenderGeometryInstance *> &p_instances) = 0;
virtual void set_scene_pass(uint64_t p_pass) = 0;
virtual void set_time(double p_time, double p_step) = 0;
virtual void set_debug_draw_mode(RS::ViewportDebugDraw p_debug_draw) = 0;
virtual RID render_buffers_create() = 0;
- virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_fsr_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) = 0;
+ virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_internal_width, int p_internal_height, int p_width, int p_height, float p_fsr_sharpness, float p_texture_mipmap_bias, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_taa, bool p_use_debanding, uint32_t p_view_count) = 0;
virtual void gi_set_use_half_resolution(bool p_enable) = 0;
virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_limit) = 0;
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp
index 0e26de8bcb..118bf532b3 100644
--- a/servers/rendering/renderer_viewport.cpp
+++ b/servers/rendering/renderer_viewport.cpp
@@ -138,7 +138,7 @@ void RendererViewport::_configure_3d_render_buffers(Viewport *p_viewport) {
p_viewport->internal_size = Size2(render_width, render_height);
- RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, render_width, render_height, width, height, p_viewport->fsr_sharpness, p_viewport->fsr_mipmap_bias, p_viewport->msaa, p_viewport->screen_space_aa, p_viewport->use_taa, p_viewport->use_debanding, p_viewport->get_view_count());
+ RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, render_width, render_height, width, height, p_viewport->fsr_sharpness, p_viewport->texture_mipmap_bias, p_viewport->msaa, p_viewport->screen_space_aa, p_viewport->use_taa, p_viewport->use_debanding, p_viewport->get_view_count());
}
}
}
@@ -746,11 +746,11 @@ void RendererViewport::viewport_set_fsr_sharpness(RID p_viewport, float p_sharpn
_configure_3d_render_buffers(viewport);
}
-void RendererViewport::viewport_set_fsr_mipmap_bias(RID p_viewport, float p_mipmap_bias) {
+void RendererViewport::viewport_set_texture_mipmap_bias(RID p_viewport, float p_mipmap_bias) {
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
- viewport->fsr_mipmap_bias = p_mipmap_bias;
+ viewport->texture_mipmap_bias = p_mipmap_bias;
_configure_3d_render_buffers(viewport);
}
diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h
index 027f2dfad6..5e37c96336 100644
--- a/servers/rendering/renderer_viewport.h
+++ b/servers/rendering/renderer_viewport.h
@@ -48,33 +48,34 @@ public:
RID self;
RID parent;
- bool use_xr; /* use xr interface to override camera positioning and projection matrices and control output */
+ // use xr interface to override camera positioning and projection matrices and control output
+ bool use_xr = false;
Size2i internal_size;
Size2i size;
RID camera;
RID scenario;
- RS::ViewportScaling3DMode scaling_3d_mode;
+ RS::ViewportScaling3DMode scaling_3d_mode = RenderingServer::VIEWPORT_SCALING_3D_MODE_BILINEAR;
float scaling_3d_scale = 1.0;
float fsr_sharpness = 0.2f;
- float fsr_mipmap_bias = 0.0f;
- bool fsr_enabled;
- RS::ViewportUpdateMode update_mode;
+ float texture_mipmap_bias = 0.0f;
+ bool fsr_enabled = false;
+ RS::ViewportUpdateMode update_mode = RenderingServer::VIEWPORT_UPDATE_WHEN_VISIBLE;
RID render_target;
RID render_target_texture;
RID render_buffers;
- RS::ViewportMSAA msaa;
- RS::ViewportScreenSpaceAA screen_space_aa;
- bool use_taa;
- bool use_debanding;
+ RS::ViewportMSAA msaa = RenderingServer::VIEWPORT_MSAA_DISABLED;
+ RS::ViewportScreenSpaceAA screen_space_aa = RenderingServer::VIEWPORT_SCREEN_SPACE_AA_DISABLED;
+ bool use_taa = false;
+ bool use_debanding = false;
RendererSceneRender::CameraData prev_camera_data;
uint64_t prev_camera_data_frame = 0;
- bool use_occlusion_culling;
- bool occlusion_buffer_dirty;
+ bool use_occlusion_culling = false;
+ bool occlusion_buffer_dirty = false;
DisplayServer::WindowID viewport_to_screen;
Rect2 viewport_to_screen_rect;
@@ -83,10 +84,10 @@ public:
bool disable_2d = false;
bool disable_environment = false;
bool disable_3d = false;
- bool measure_render_time;
+ bool measure_render_time = false;
- bool snap_2d_transforms_to_pixel;
- bool snap_2d_vertices_to_pixel;
+ bool snap_2d_transforms_to_pixel = false;
+ bool snap_2d_vertices_to_pixel = false;
uint64_t time_cpu_begin;
uint64_t time_cpu_end;
@@ -95,23 +96,23 @@ public:
uint64_t time_gpu_end;
RID shadow_atlas;
- int shadow_atlas_size;
+ int shadow_atlas_size = 2048;
bool shadow_atlas_16_bits = true;
- bool sdf_active;
+ bool sdf_active = false;
float mesh_lod_threshold = 1.0;
uint64_t last_pass = 0;
- RS::ViewportDebugDraw debug_draw;
+ RS::ViewportDebugDraw debug_draw = RenderingServer::VIEWPORT_DEBUG_DRAW_DISABLED;
- RS::ViewportClearMode clear_mode;
+ RS::ViewportClearMode clear_mode = RenderingServer::VIEWPORT_CLEAR_ALWAYS;
RS::CanvasItemTextureFilter texture_filter = RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR;
RS::CanvasItemTextureRepeat texture_repeat = RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED;
- bool transparent_bg;
+ bool transparent_bg = false;
struct CanvasKey {
int64_t stacking;
@@ -228,7 +229,7 @@ public:
void viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode);
void viewport_set_scaling_3d_scale(RID p_viewport, float p_scaling_3d_scale);
void viewport_set_fsr_sharpness(RID p_viewport, float p_sharpness);
- void viewport_set_fsr_mipmap_bias(RID p_viewport, float p_mipmap_bias);
+ void viewport_set_texture_mipmap_bias(RID p_viewport, float p_mipmap_bias);
void viewport_set_update_mode(RID p_viewport, RS::ViewportUpdateMode p_mode);
void viewport_set_vflip(RID p_viewport, bool p_enable);
diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp
index bcd7e6a1dd..8071b7e416 100644
--- a/servers/rendering/rendering_server_default.cpp
+++ b/servers/rendering/rendering_server_default.cpp
@@ -106,7 +106,7 @@ void RenderingServerDefault::_draw(bool p_swap_buffers, double frame_step) {
Callable c = frame_drawn_callbacks.front()->get();
Variant result;
Callable::CallError ce;
- c.call(nullptr, 0, result, ce);
+ c.callp(nullptr, 0, result, ce);
if (ce.error != Callable::CallError::CALL_OK) {
String err = Variant::get_callable_error_text(c, nullptr, 0, ce);
ERR_PRINT("Error calling frame drawn function: " + err);
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h
index f093f43a82..21a94b88f2 100644
--- a/servers/rendering/rendering_server_default.h
+++ b/servers/rendering/rendering_server_default.h
@@ -591,7 +591,7 @@ public:
FUNC2(viewport_set_scaling_3d_mode, RID, ViewportScaling3DMode)
FUNC2(viewport_set_scaling_3d_scale, RID, float)
FUNC2(viewport_set_fsr_sharpness, RID, float)
- FUNC2(viewport_set_fsr_mipmap_bias, RID, float)
+ FUNC2(viewport_set_texture_mipmap_bias, RID, float)
FUNC2(viewport_set_update_mode, RID, ViewportUpdateMode)
@@ -900,7 +900,7 @@ public:
FUNC1(canvas_set_shadow_texture_size, int)
- /* GLOBAL VARIABLES */
+ /* GLOBAL SHADER UNIFORMS */
#undef server_name
#undef ServerName
@@ -908,16 +908,16 @@ public:
#define ServerName RendererMaterialStorage
#define server_name RSG::material_storage
- FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
- FUNC1(global_variable_remove, const StringName &)
- FUNC0RC(Vector<StringName>, global_variable_get_list)
- FUNC2(global_variable_set, const StringName &, const Variant &)
- FUNC2(global_variable_set_override, const StringName &, const Variant &)
- FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
- FUNC1RC(Variant, global_variable_get, const StringName &)
+ FUNC3(global_shader_uniform_add, const StringName &, GlobalShaderUniformType, const Variant &)
+ FUNC1(global_shader_uniform_remove, const StringName &)
+ FUNC0RC(Vector<StringName>, global_shader_uniform_get_list)
+ FUNC2(global_shader_uniform_set, const StringName &, const Variant &)
+ FUNC2(global_shader_uniform_set_override, const StringName &, const Variant &)
+ FUNC1RC(GlobalShaderUniformType, global_shader_uniform_get_type, const StringName &)
+ FUNC1RC(Variant, global_shader_uniform_get, const StringName &)
- FUNC1(global_variables_load_settings, bool)
- FUNC0(global_variables_clear)
+ FUNC1(global_shader_uniforms_load_settings, bool)
+ FUNC0(global_shader_uniforms_clear)
#undef server_name
#undef ServerName
diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp
index e291246d01..7637eae4a6 100644
--- a/servers/rendering/shader_compiler.cpp
+++ b/servers/rendering/shader_compiler.cpp
@@ -370,7 +370,7 @@ void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const Str
}
}
-static String _get_global_variable_from_type_and_index(const String &p_buffer, const String &p_index, ShaderLanguage::DataType p_type) {
+static String _get_global_shader_uniform_from_type_and_index(const String &p_buffer, const String &p_index, ShaderLanguage::DataType p_type) {
switch (p_type) {
case ShaderLanguage::TYPE_BOOL: {
return "(" + p_buffer + "[" + p_index + "].x != 0.0)";
@@ -903,11 +903,11 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL) {
code = actions.base_uniform_string + _mkid(vnode->name); //texture, use as is
//global variable, this means the code points to an index to the global table
- code = _get_global_variable_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
+ code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
} else if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) {
//instance variable, index it as such
code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + ")";
- code = _get_global_variable_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
+ code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
} else {
//regular uniform, index from UBO
code = actions.base_uniform_string + _mkid(vnode->name);
@@ -1003,11 +1003,11 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_GLOBAL) {
code = actions.base_uniform_string + _mkid(anode->name); //texture, use as is
//global variable, this means the code points to an index to the global table
- code = _get_global_variable_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
+ code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
} else if (u.scope == ShaderLanguage::ShaderNode::Uniform::SCOPE_INSTANCE) {
//instance variable, index it as such
code = "(" + p_default_actions.instance_uniform_index_variable + "+" + itos(u.instance_index) + ")";
- code = _get_global_variable_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
+ code = _get_global_shader_uniform_from_type_and_index(p_default_actions.global_buffer_array_variable, code, u.type);
} else {
//regular uniform, index from UBO
code = actions.base_uniform_string + _mkid(anode->name);
@@ -1309,8 +1309,8 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
}
ShaderLanguage::DataType ShaderCompiler::_get_variable_type(const StringName &p_type) {
- RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_type);
- return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
+ RS::GlobalShaderUniformType gvt = RS::get_singleton()->global_shader_uniform_get_type(p_type);
+ return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
}
Error ShaderCompiler::compile(RS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code) {
@@ -1318,7 +1318,7 @@ Error ShaderCompiler::compile(RS::ShaderMode p_mode, const String &p_code, Ident
info.functions = ShaderTypes::get_singleton()->get_functions(p_mode);
info.render_modes = ShaderTypes::get_singleton()->get_modes(p_mode);
info.shader_types = ShaderTypes::get_singleton()->get_types();
- info.global_variable_type_func = _get_variable_type;
+ info.global_shader_uniform_type_func = _get_variable_type;
Error err = parser.compile(p_code, info);
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 9fc3e8f8d9..2dd0f7006b 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -3856,18 +3856,11 @@ Variant ShaderLanguage::constant_value_to_variant(const Vector<ShaderLanguage::C
}
value = Variant(array);
} else {
- Basis p;
- p[0][0] = p_value[0].real;
- p[0][1] = p_value[1].real;
- p[0][2] = p_value[2].real;
- p[1][0] = p_value[4].real;
- p[1][1] = p_value[5].real;
- p[1][2] = p_value[6].real;
- p[2][0] = p_value[8].real;
- p[2][1] = p_value[9].real;
- p[2][2] = p_value[10].real;
- Transform3D t = Transform3D(p, Vector3(p_value[3].real, p_value[7].real, p_value[11].real));
- value = Variant(t);
+ Projection p = Projection(Vector4(p_value[0].real, p_value[1].real, p_value[2].real, p_value[3].real),
+ Vector4(p_value[4].real, p_value[5].real, p_value[6].real, p_value[7].real),
+ Vector4(p_value[8].real, p_value[9].real, p_value[10].real, p_value[11].real),
+ Vector4(p_value[12].real, p_value[13].real, p_value[14].real, p_value[15].real));
+ value = Variant(p);
}
break;
}
@@ -8284,7 +8277,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
if (is_uniform) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL && Engine::get_singleton()->is_editor_hint()) { // Type checking for global uniforms is not allowed outside the editor.
//validate global uniform
- DataType gvtype = global_var_get_type_func(name);
+ DataType gvtype = global_shader_uniform_get_type_func(name);
if (gvtype == TYPE_MAX) {
_set_error(vformat(RTR("Global uniform '%s' does not exist. Create it in Project Settings."), String(name)));
return ERR_PARSE_ERROR;
@@ -9659,7 +9652,7 @@ Error ShaderLanguage::compile(const String &p_code, const ShaderCompileInfo &p_i
is_shader_inc = p_info.is_include;
code = p_code;
- global_var_get_type_func = p_info.global_variable_type_func;
+ global_shader_uniform_get_type_func = p_info.global_shader_uniform_type_func;
varying_function_names = p_info.varying_function_names;
@@ -9688,7 +9681,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
varying_function_names = p_info.varying_function_names;
nodes = nullptr;
- global_var_get_type_func = p_info.global_variable_type_func;
+ global_shader_uniform_get_type_func = p_info.global_shader_uniform_type_func;
shader = alloc_node<ShaderNode>();
_parse_shader(p_info.functions, p_info.render_modes, p_info.shader_types);
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 42023f25d7..09160e2949 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -869,7 +869,7 @@ public:
};
static bool has_builtin(const HashMap<StringName, ShaderLanguage::FunctionInfo> &p_functions, const StringName &p_name);
- typedef DataType (*GlobalVariableGetTypeFunc)(const StringName &p_name);
+ typedef DataType (*GlobalShaderUniformGetTypeFunc)(const StringName &p_name);
struct FilePosition {
String file;
@@ -887,7 +887,7 @@ private:
static const KeyWord keyword_list[];
- GlobalVariableGetTypeFunc global_var_get_type_func = nullptr;
+ GlobalShaderUniformGetTypeFunc global_shader_uniform_get_type_func = nullptr;
bool error_set = false;
String error_str;
@@ -1113,7 +1113,7 @@ public:
Vector<ModeInfo> render_modes;
VaryingFunctionNames varying_function_names = VaryingFunctionNames();
HashSet<String> shader_types;
- GlobalVariableGetTypeFunc global_variable_type_func = nullptr;
+ GlobalShaderUniformGetTypeFunc global_shader_uniform_type_func = nullptr;
bool is_include = false;
};
diff --git a/servers/rendering/storage/environment_storage.cpp b/servers/rendering/storage/environment_storage.cpp
new file mode 100644
index 0000000000..1d4dc55e98
--- /dev/null
+++ b/servers/rendering/storage/environment_storage.cpp
@@ -0,0 +1,769 @@
+/*************************************************************************/
+/* environment_storage.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 "environment_storage.h"
+
+uint64_t RendererEnvironmentStorage::auto_exposure_counter = 2;
+
+RID RendererEnvironmentStorage::environment_allocate() {
+ return environment_owner.allocate_rid();
+}
+
+void RendererEnvironmentStorage::environment_initialize(RID p_rid) {
+ environment_owner.initialize_rid(p_rid, Environment());
+}
+
+void RendererEnvironmentStorage::environment_free(RID p_rid) {
+ environment_owner.free(p_rid);
+}
+
+// Background
+
+void RendererEnvironmentStorage::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->background = p_bg;
+}
+
+void RendererEnvironmentStorage::environment_set_sky(RID p_env, RID p_sky) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->sky = p_sky;
+}
+
+void RendererEnvironmentStorage::environment_set_sky_custom_fov(RID p_env, float p_scale) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->sky_custom_fov = p_scale;
+}
+
+void RendererEnvironmentStorage::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->sky_orientation = p_orientation;
+}
+
+void RendererEnvironmentStorage::environment_set_bg_color(RID p_env, const Color &p_color) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->bg_color = p_color;
+}
+
+void RendererEnvironmentStorage::environment_set_bg_energy(RID p_env, float p_energy) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->bg_energy = p_energy;
+}
+
+void RendererEnvironmentStorage::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->canvas_max_layer = p_max_layer;
+}
+
+void RendererEnvironmentStorage::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->ambient_light = p_color;
+ env->ambient_source = p_ambient;
+ env->ambient_light_energy = p_energy;
+ env->ambient_sky_contribution = p_sky_contribution;
+ env->reflection_source = p_reflection_source;
+}
+
+RS::EnvironmentBG RendererEnvironmentStorage::environment_get_background(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_BG_CLEAR_COLOR);
+ return env->background;
+}
+
+RID RendererEnvironmentStorage::environment_get_sky(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RID());
+ return env->sky;
+}
+
+float RendererEnvironmentStorage::environment_get_sky_custom_fov(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->sky_custom_fov;
+}
+
+Basis RendererEnvironmentStorage::environment_get_sky_orientation(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Basis());
+ return env->sky_orientation;
+}
+
+Color RendererEnvironmentStorage::environment_get_bg_color(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Color());
+ return env->bg_color;
+}
+
+float RendererEnvironmentStorage::environment_get_bg_energy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->bg_energy;
+}
+
+int RendererEnvironmentStorage::environment_get_canvas_max_layer(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0);
+ return env->canvas_max_layer;
+}
+
+RS::EnvironmentAmbientSource RendererEnvironmentStorage::environment_get_ambient_source(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_AMBIENT_SOURCE_BG);
+ return env->ambient_source;
+}
+
+Color RendererEnvironmentStorage::environment_get_ambient_light(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Color());
+ return env->ambient_light;
+}
+
+float RendererEnvironmentStorage::environment_get_ambient_light_energy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->ambient_light_energy;
+}
+
+float RendererEnvironmentStorage::environment_get_ambient_sky_contribution(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->ambient_sky_contribution;
+}
+
+RS::EnvironmentReflectionSource RendererEnvironmentStorage::environment_get_reflection_source(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_REFLECTION_SOURCE_BG);
+ return env->reflection_source;
+}
+
+// Tonemap
+
+void RendererEnvironmentStorage::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->exposure = p_exposure;
+ env->tone_mapper = p_tone_mapper;
+ if (!env->auto_exposure && p_auto_exposure) {
+ env->auto_exposure_version = ++auto_exposure_counter;
+ }
+ env->auto_exposure = p_auto_exposure;
+ env->white = p_white;
+ env->min_luminance = p_min_luminance;
+ env->max_luminance = p_max_luminance;
+ env->auto_exp_speed = p_auto_exp_speed;
+ env->auto_exp_scale = p_auto_exp_scale;
+}
+
+RS::EnvironmentToneMapper RendererEnvironmentStorage::environment_get_tone_mapper(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_TONE_MAPPER_LINEAR);
+ return env->tone_mapper;
+}
+
+float RendererEnvironmentStorage::environment_get_exposure(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->exposure;
+}
+
+float RendererEnvironmentStorage::environment_get_white(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->white;
+}
+
+bool RendererEnvironmentStorage::environment_get_auto_exposure(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->auto_exposure;
+}
+
+float RendererEnvironmentStorage::environment_get_min_luminance(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.2);
+ return env->min_luminance;
+}
+
+float RendererEnvironmentStorage::environment_get_max_luminance(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 8.0);
+ return env->max_luminance;
+}
+
+float RendererEnvironmentStorage::environment_get_auto_exp_speed(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.2);
+ return env->auto_exp_speed;
+}
+
+float RendererEnvironmentStorage::environment_get_auto_exp_scale(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.5);
+ return env->auto_exp_scale;
+}
+
+uint64_t RendererEnvironmentStorage::environment_get_auto_exposure_version(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0);
+ return env->auto_exposure_version;
+}
+
+// Fog
+
+void RendererEnvironmentStorage::environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->fog_enabled = p_enable;
+ env->fog_light_color = p_light_color;
+ env->fog_light_energy = p_light_energy;
+ env->fog_sun_scatter = p_sun_scatter;
+ env->fog_density = p_density;
+ env->fog_height = p_height;
+ env->fog_height_density = p_height_density;
+ env->fog_aerial_perspective = p_fog_aerial_perspective;
+}
+
+bool RendererEnvironmentStorage::environment_get_fog_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->fog_enabled;
+}
+
+Color RendererEnvironmentStorage::environment_get_fog_light_color(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Color(0.5, 0.6, 0.7));
+ return env->fog_light_color;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_light_energy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->fog_light_energy;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_sun_scatter(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->fog_sun_scatter;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_density(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.001);
+ return env->fog_density;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_height(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->fog_height;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_height_density(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->fog_height_density;
+}
+
+float RendererEnvironmentStorage::environment_get_fog_aerial_perspective(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->fog_aerial_perspective;
+}
+
+// Volumetric Fog
+
+void RendererEnvironmentStorage::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->volumetric_fog_enabled = p_enable;
+ env->volumetric_fog_density = p_density;
+ env->volumetric_fog_scattering = p_albedo;
+ env->volumetric_fog_emission = p_emission;
+ env->volumetric_fog_emission_energy = p_emission_energy;
+ env->volumetric_fog_anisotropy = p_anisotropy,
+ env->volumetric_fog_length = p_length;
+ env->volumetric_fog_detail_spread = p_detail_spread;
+ env->volumetric_fog_gi_inject = p_gi_inject;
+ env->volumetric_fog_temporal_reprojection = p_temporal_reprojection;
+ env->volumetric_fog_temporal_reprojection_amount = p_temporal_reprojection_amount;
+ env->volumetric_fog_ambient_inject = p_ambient_inject;
+}
+
+bool RendererEnvironmentStorage::environment_get_volumetric_fog_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->volumetric_fog_enabled;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_density(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.01);
+ return env->volumetric_fog_density;
+}
+
+Color RendererEnvironmentStorage::environment_get_volumetric_fog_scattering(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Color(1, 1, 1));
+ return env->volumetric_fog_scattering;
+}
+
+Color RendererEnvironmentStorage::environment_get_volumetric_fog_emission(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Color(0, 0, 0));
+ return env->volumetric_fog_emission;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_emission_energy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->volumetric_fog_emission_energy;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_anisotropy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.2);
+ return env->volumetric_fog_anisotropy;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_length(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 64.0);
+ return env->volumetric_fog_length;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_detail_spread(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 2.0);
+ return env->volumetric_fog_detail_spread;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_gi_inject(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->volumetric_fog_gi_inject;
+}
+
+bool RendererEnvironmentStorage::environment_get_volumetric_fog_temporal_reprojection(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, true);
+ return env->volumetric_fog_temporal_reprojection;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_temporal_reprojection_amount(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.9);
+ return env->volumetric_fog_temporal_reprojection_amount;
+}
+
+float RendererEnvironmentStorage::environment_get_volumetric_fog_ambient_inject(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->volumetric_fog_ambient_inject;
+}
+
+// GLOW
+
+void RendererEnvironmentStorage::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ ERR_FAIL_COND_MSG(p_levels.size() != 7, "Size of array of glow levels must be 7");
+ env->glow_enabled = p_enable;
+ env->glow_levels = p_levels;
+ env->glow_intensity = p_intensity;
+ env->glow_strength = p_strength;
+ env->glow_mix = p_mix;
+ env->glow_bloom = p_bloom_threshold;
+ env->glow_blend_mode = p_blend_mode;
+ env->glow_hdr_bleed_threshold = p_hdr_bleed_threshold;
+ env->glow_hdr_bleed_scale = p_hdr_bleed_scale;
+ env->glow_hdr_luminance_cap = p_hdr_luminance_cap;
+ env->glow_map_strength = p_glow_map_strength;
+ env->glow_map = p_glow_map;
+}
+
+bool RendererEnvironmentStorage::environment_get_glow_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->glow_enabled;
+}
+
+Vector<float> RendererEnvironmentStorage::environment_get_glow_levels(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, Vector<float>());
+ return env->glow_levels;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_intensity(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.8);
+ return env->glow_intensity;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_strength(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->glow_strength;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_bloom(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->glow_bloom;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_mix(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.01);
+ return env->glow_mix;
+}
+
+RS::EnvironmentGlowBlendMode RendererEnvironmentStorage::environment_get_glow_blend_mode(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_GLOW_BLEND_MODE_SOFTLIGHT);
+ return env->glow_blend_mode;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_hdr_bleed_threshold(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->glow_hdr_bleed_threshold;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_hdr_luminance_cap(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 12.0);
+ return env->glow_hdr_luminance_cap;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_hdr_bleed_scale(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 2.0);
+ return env->glow_hdr_bleed_scale;
+}
+
+float RendererEnvironmentStorage::environment_get_glow_map_strength(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->glow_map_strength;
+}
+
+RID RendererEnvironmentStorage::environment_get_glow_map(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RID());
+ return env->glow_map;
+}
+
+// SSR
+
+void RendererEnvironmentStorage::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->ssr_enabled = p_enable;
+ env->ssr_max_steps = p_max_steps;
+ env->ssr_fade_in = p_fade_int;
+ env->ssr_fade_out = p_fade_out;
+ env->ssr_depth_tolerance = p_depth_tolerance;
+}
+
+bool RendererEnvironmentStorage::environment_get_ssr_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->ssr_enabled;
+}
+
+int RendererEnvironmentStorage::environment_get_ssr_max_steps(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 64);
+ return env->ssr_max_steps;
+}
+
+float RendererEnvironmentStorage::environment_get_ssr_fade_in(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.15);
+ return env->ssr_fade_in;
+}
+
+float RendererEnvironmentStorage::environment_get_ssr_fade_out(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 2.0);
+ return env->ssr_fade_out;
+}
+
+float RendererEnvironmentStorage::environment_get_ssr_depth_tolerance(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.2);
+ return env->ssr_depth_tolerance;
+}
+
+// SSAO
+
+void RendererEnvironmentStorage::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->ssao_enabled = p_enable;
+ env->ssao_radius = p_radius;
+ env->ssao_intensity = p_intensity;
+ env->ssao_power = p_power;
+ env->ssao_detail = p_detail;
+ env->ssao_horizon = p_horizon;
+ env->ssao_sharpness = p_sharpness;
+ env->ssao_direct_light_affect = p_light_affect;
+ env->ssao_ao_channel_affect = p_ao_channel_affect;
+}
+
+bool RendererEnvironmentStorage::environment_get_ssao_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->ssao_enabled;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_radius(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->ssao_radius;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_intensity(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 2.0);
+ return env->ssao_intensity;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_power(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.5);
+ return env->ssao_power;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_detail(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.5);
+ return env->ssao_detail;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_horizon(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.06);
+ return env->ssao_horizon;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_sharpness(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.98);
+ return env->ssao_sharpness;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_direct_light_affect(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->ssao_direct_light_affect;
+}
+
+float RendererEnvironmentStorage::environment_get_ssao_ao_channel_affect(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.0);
+ return env->ssao_ao_channel_affect;
+}
+
+// SSIL
+
+void RendererEnvironmentStorage::environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->ssil_enabled = p_enable;
+ env->ssil_radius = p_radius;
+ env->ssil_intensity = p_intensity;
+ env->ssil_sharpness = p_sharpness;
+ env->ssil_normal_rejection = p_normal_rejection;
+}
+
+bool RendererEnvironmentStorage::environment_get_ssil_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->ssil_enabled;
+}
+
+float RendererEnvironmentStorage::environment_get_ssil_radius(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 5.0);
+ return env->ssil_radius;
+}
+
+float RendererEnvironmentStorage::environment_get_ssil_intensity(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->ssil_intensity;
+}
+
+float RendererEnvironmentStorage::environment_get_ssil_sharpness(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.98);
+ return env->ssil_sharpness;
+}
+
+float RendererEnvironmentStorage::environment_get_ssil_normal_rejection(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->ssil_normal_rejection;
+}
+
+// SDFGI
+
+void RendererEnvironmentStorage::environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->sdfgi_enabled = p_enable;
+ env->sdfgi_cascades = p_cascades;
+ env->sdfgi_min_cell_size = p_min_cell_size;
+ env->sdfgi_use_occlusion = p_use_occlusion;
+ env->sdfgi_bounce_feedback = p_bounce_feedback;
+ env->sdfgi_read_sky_light = p_read_sky;
+ env->sdfgi_energy = p_energy;
+ env->sdfgi_normal_bias = p_normal_bias;
+ env->sdfgi_probe_bias = p_probe_bias;
+ env->sdfgi_y_scale = p_y_scale;
+}
+
+bool RendererEnvironmentStorage::environment_get_sdfgi_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->sdfgi_enabled;
+}
+
+int RendererEnvironmentStorage::environment_get_sdfgi_cascades(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 4);
+ return env->sdfgi_cascades;
+}
+
+float RendererEnvironmentStorage::environment_get_sdfgi_min_cell_size(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.2);
+ return env->sdfgi_min_cell_size;
+}
+
+bool RendererEnvironmentStorage::environment_get_sdfgi_use_occlusion(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->sdfgi_use_occlusion;
+}
+
+float RendererEnvironmentStorage::environment_get_sdfgi_bounce_feedback(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 0.5);
+ return env->sdfgi_bounce_feedback;
+}
+
+bool RendererEnvironmentStorage::environment_get_sdfgi_read_sky_light(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, true);
+ return env->sdfgi_read_sky_light;
+}
+
+float RendererEnvironmentStorage::environment_get_sdfgi_energy(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->sdfgi_energy;
+}
+
+float RendererEnvironmentStorage::environment_get_sdfgi_normal_bias(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.1);
+ return env->sdfgi_normal_bias;
+}
+
+float RendererEnvironmentStorage::environment_get_sdfgi_probe_bias(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.1);
+ return env->sdfgi_probe_bias;
+}
+
+RS::EnvironmentSDFGIYScale RendererEnvironmentStorage::environment_get_sdfgi_y_scale(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RS::ENV_SDFGI_Y_SCALE_75_PERCENT);
+ return env->sdfgi_y_scale;
+}
+
+// Adjustments
+
+void RendererEnvironmentStorage::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND(!env);
+ env->adjustments_enabled = p_enable;
+ env->adjustments_brightness = p_brightness;
+ env->adjustments_contrast = p_contrast;
+ env->adjustments_saturation = p_saturation;
+ env->use_1d_color_correction = p_use_1d_color_correction;
+ env->color_correction = p_color_correction;
+}
+
+bool RendererEnvironmentStorage::environment_get_adjustments_enabled(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->adjustments_enabled;
+}
+
+float RendererEnvironmentStorage::environment_get_adjustments_brightness(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->adjustments_brightness;
+}
+
+float RendererEnvironmentStorage::environment_get_adjustments_contrast(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->adjustments_contrast;
+}
+
+float RendererEnvironmentStorage::environment_get_adjustments_saturation(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, 1.0);
+ return env->adjustments_saturation;
+}
+
+bool RendererEnvironmentStorage::environment_get_use_1d_color_correction(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, false);
+ return env->use_1d_color_correction;
+}
+
+RID RendererEnvironmentStorage::environment_get_color_correction(RID p_env) const {
+ Environment *env = environment_owner.get_or_null(p_env);
+ ERR_FAIL_COND_V(!env, RID());
+ return env->color_correction;
+}
diff --git a/servers/rendering/storage/environment_storage.h b/servers/rendering/storage/environment_storage.h
new file mode 100644
index 0000000000..bd1c17deec
--- /dev/null
+++ b/servers/rendering/storage/environment_storage.h
@@ -0,0 +1,296 @@
+/*************************************************************************/
+/* environment_storage.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 ENVIRONMENT_STORAGE_H
+#define ENVIRONMENT_STORAGE_H
+
+#include "core/templates/rid_owner.h"
+#include "servers/rendering_server.h"
+
+class RendererEnvironmentStorage {
+private:
+ struct Environment {
+ // Note, we capture and store all environment parameters received from Godot here.
+ // Not all renderers support all effects and should just ignore the bits they don't support.
+
+ // Background
+ RS::EnvironmentBG background = RS::ENV_BG_CLEAR_COLOR;
+ RID sky;
+ float sky_custom_fov = 0.0;
+ Basis sky_orientation;
+ Color bg_color;
+ float bg_energy = 1.0;
+ int canvas_max_layer = 0;
+ RS::EnvironmentAmbientSource ambient_source = RS::ENV_AMBIENT_SOURCE_BG;
+ Color ambient_light;
+ float ambient_light_energy = 1.0;
+ float ambient_sky_contribution = 1.0;
+ RS::EnvironmentReflectionSource reflection_source = RS::ENV_REFLECTION_SOURCE_BG;
+
+ // Tonemap
+ RS::EnvironmentToneMapper tone_mapper;
+ float exposure = 1.0;
+ float white = 1.0;
+ bool auto_exposure = false;
+ float min_luminance = 0.2;
+ float max_luminance = 8.0;
+ float auto_exp_speed = 0.2;
+ float auto_exp_scale = 0.5;
+ uint64_t auto_exposure_version = 0;
+
+ // Fog
+ bool fog_enabled = false;
+ Color fog_light_color = Color(0.5, 0.6, 0.7);
+ float fog_light_energy = 1.0;
+ float fog_sun_scatter = 0.0;
+ float fog_density = 0.001;
+ float fog_height = 0.0;
+ float fog_height_density = 0.0; //can be negative to invert effect
+ float fog_aerial_perspective = 0.0;
+
+ // Volumetric Fog
+ bool volumetric_fog_enabled = false;
+ float volumetric_fog_density = 0.01;
+ Color volumetric_fog_scattering = Color(1, 1, 1);
+ Color volumetric_fog_emission = Color(0, 0, 0);
+ float volumetric_fog_emission_energy = 0.0;
+ float volumetric_fog_anisotropy = 0.2;
+ float volumetric_fog_length = 64.0;
+ float volumetric_fog_detail_spread = 2.0;
+ float volumetric_fog_gi_inject = 0.0;
+ bool volumetric_fog_temporal_reprojection = true;
+ float volumetric_fog_temporal_reprojection_amount = 0.9;
+ float volumetric_fog_ambient_inject = 0.0;
+
+ // Glow
+ bool glow_enabled = false;
+ Vector<float> glow_levels;
+ float glow_intensity = 0.8;
+ float glow_strength = 1.0;
+ float glow_bloom = 0.0;
+ float glow_mix = 0.01;
+ RS::EnvironmentGlowBlendMode glow_blend_mode = RS::ENV_GLOW_BLEND_MODE_SOFTLIGHT;
+ float glow_hdr_bleed_threshold = 1.0;
+ float glow_hdr_luminance_cap = 12.0;
+ float glow_hdr_bleed_scale = 2.0;
+ float glow_map_strength = 0.0f; // 1.0f in GLES3 ??
+ RID glow_map = RID();
+
+ // SSR
+ bool ssr_enabled = false;
+ int ssr_max_steps = 64;
+ float ssr_fade_in = 0.15;
+ float ssr_fade_out = 2.0;
+ float ssr_depth_tolerance = 0.2;
+
+ // SSAO
+ bool ssao_enabled = false;
+ float ssao_radius = 1.0;
+ float ssao_intensity = 2.0;
+ float ssao_power = 1.5;
+ float ssao_detail = 0.5;
+ float ssao_horizon = 0.06;
+ float ssao_sharpness = 0.98;
+ float ssao_direct_light_affect = 0.0;
+ float ssao_ao_channel_affect = 0.0;
+
+ // SSIL
+ bool ssil_enabled = false;
+ float ssil_radius = 5.0;
+ float ssil_intensity = 1.0;
+ float ssil_sharpness = 0.98;
+ float ssil_normal_rejection = 1.0;
+
+ // SDFGI
+ bool sdfgi_enabled = false;
+ int sdfgi_cascades = 4;
+ float sdfgi_min_cell_size = 0.2;
+ bool sdfgi_use_occlusion = false;
+ float sdfgi_bounce_feedback = 0.5;
+ bool sdfgi_read_sky_light = true;
+ float sdfgi_energy = 1.0;
+ float sdfgi_normal_bias = 1.1;
+ float sdfgi_probe_bias = 1.1;
+ RS::EnvironmentSDFGIYScale sdfgi_y_scale = RS::ENV_SDFGI_Y_SCALE_75_PERCENT;
+
+ // Adjustments
+ bool adjustments_enabled = false;
+ float adjustments_brightness = 1.0f;
+ float adjustments_contrast = 1.0f;
+ float adjustments_saturation = 1.0f;
+ bool use_1d_color_correction = false;
+ RID color_correction = RID();
+ };
+
+ static uint64_t auto_exposure_counter;
+
+ mutable RID_Owner<Environment, true> environment_owner;
+
+public:
+ RID environment_allocate();
+ void environment_initialize(RID p_rid);
+ void environment_free(RID p_rid);
+
+ bool is_environment(RID p_environment) const {
+ return environment_owner.owns(p_environment);
+ }
+
+ // Background
+ void environment_set_background(RID p_env, RS::EnvironmentBG p_bg);
+ void environment_set_sky(RID p_env, RID p_sky);
+ void environment_set_sky_custom_fov(RID p_env, float p_scale);
+ void environment_set_sky_orientation(RID p_env, const Basis &p_orientation);
+ void environment_set_bg_color(RID p_env, const Color &p_color);
+ void environment_set_bg_energy(RID p_env, float p_energy);
+ void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
+ void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG);
+// FIXME: Disabled during Vulkan refactoring, should be ported.
+#if 0
+ void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id);
+#endif
+
+ RS::EnvironmentBG environment_get_background(RID p_env) const;
+ RID environment_get_sky(RID p_env) const;
+ float environment_get_sky_custom_fov(RID p_env) const;
+ Basis environment_get_sky_orientation(RID p_env) const;
+ Color environment_get_bg_color(RID p_env) const;
+ float environment_get_bg_energy(RID p_env) const;
+ int environment_get_canvas_max_layer(RID p_env) const;
+ RS::EnvironmentAmbientSource environment_get_ambient_source(RID p_env) const;
+ Color environment_get_ambient_light(RID p_env) const;
+ float environment_get_ambient_light_energy(RID p_env) const;
+ float environment_get_ambient_sky_contribution(RID p_env) const;
+ RS::EnvironmentReflectionSource environment_get_reflection_source(RID p_env) const;
+
+ // Tonemap
+ void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale);
+ RS::EnvironmentToneMapper environment_get_tone_mapper(RID p_env) const;
+ float environment_get_exposure(RID p_env) const;
+ float environment_get_white(RID p_env) const;
+ bool environment_get_auto_exposure(RID p_env) const;
+ float environment_get_min_luminance(RID p_env) const;
+ float environment_get_max_luminance(RID p_env) const;
+ float environment_get_auto_exp_speed(RID p_env) const;
+ float environment_get_auto_exp_scale(RID p_env) const;
+ uint64_t environment_get_auto_exposure_version(RID p_env) const;
+
+ // Fog
+ void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective);
+ bool environment_get_fog_enabled(RID p_env) const;
+ Color environment_get_fog_light_color(RID p_env) const;
+ float environment_get_fog_light_energy(RID p_env) const;
+ float environment_get_fog_sun_scatter(RID p_env) const;
+ float environment_get_fog_density(RID p_env) const;
+ float environment_get_fog_height(RID p_env) const;
+ float environment_get_fog_height_density(RID p_env) const;
+ float environment_get_fog_aerial_perspective(RID p_env) const;
+
+ // Volumetric Fog
+ void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_albedo, const Color &p_emission, float p_emission_energy, float p_anisotropy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount, float p_ambient_inject);
+ bool environment_get_volumetric_fog_enabled(RID p_env) const;
+ float environment_get_volumetric_fog_density(RID p_env) const;
+ Color environment_get_volumetric_fog_scattering(RID p_env) const;
+ Color environment_get_volumetric_fog_emission(RID p_env) const;
+ float environment_get_volumetric_fog_emission_energy(RID p_env) const;
+ float environment_get_volumetric_fog_anisotropy(RID p_env) const;
+ float environment_get_volumetric_fog_length(RID p_env) const;
+ float environment_get_volumetric_fog_detail_spread(RID p_env) const;
+ float environment_get_volumetric_fog_gi_inject(RID p_env) const;
+ bool environment_get_volumetric_fog_temporal_reprojection(RID p_env) const;
+ float environment_get_volumetric_fog_temporal_reprojection_amount(RID p_env) const;
+ float environment_get_volumetric_fog_ambient_inject(RID p_env) const;
+
+ // GLOW
+ void environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, float p_glow_map_strength, RID p_glow_map);
+ bool environment_get_glow_enabled(RID p_env) const;
+ Vector<float> environment_get_glow_levels(RID p_env) const;
+ float environment_get_glow_intensity(RID p_env) const;
+ float environment_get_glow_strength(RID p_env) const;
+ float environment_get_glow_bloom(RID p_env) const;
+ float environment_get_glow_mix(RID p_env) const;
+ RS::EnvironmentGlowBlendMode environment_get_glow_blend_mode(RID p_env) const;
+ float environment_get_glow_hdr_bleed_threshold(RID p_env) const;
+ float environment_get_glow_hdr_luminance_cap(RID p_env) const;
+ float environment_get_glow_hdr_bleed_scale(RID p_env) const;
+ float environment_get_glow_map_strength(RID p_env) const;
+ RID environment_get_glow_map(RID p_env) const;
+
+ // SSR
+ void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance);
+ bool environment_get_ssr_enabled(RID p_env) const;
+ int environment_get_ssr_max_steps(RID p_env) const;
+ float environment_get_ssr_fade_in(RID p_env) const;
+ float environment_get_ssr_fade_out(RID p_env) const;
+ float environment_get_ssr_depth_tolerance(RID p_env) const;
+
+ // SSAO
+ void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect);
+ bool environment_get_ssao_enabled(RID p_env) const;
+ float environment_get_ssao_radius(RID p_env) const;
+ float environment_get_ssao_intensity(RID p_env) const;
+ float environment_get_ssao_power(RID p_env) const;
+ float environment_get_ssao_detail(RID p_env) const;
+ float environment_get_ssao_horizon(RID p_env) const;
+ float environment_get_ssao_sharpness(RID p_env) const;
+ float environment_get_ssao_direct_light_affect(RID p_env) const;
+ float environment_get_ssao_ao_channel_affect(RID p_env) const;
+
+ // SSIL
+ void environment_set_ssil(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_sharpness, float p_normal_rejection);
+ bool environment_get_ssil_enabled(RID p_env) const;
+ float environment_get_ssil_radius(RID p_env) const;
+ float environment_get_ssil_intensity(RID p_env) const;
+ float environment_get_ssil_sharpness(RID p_env) const;
+ float environment_get_ssil_normal_rejection(RID p_env) const;
+
+ // SDFGI
+ void environment_set_sdfgi(RID p_env, bool p_enable, int p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
+ bool environment_get_sdfgi_enabled(RID p_env) const;
+ int environment_get_sdfgi_cascades(RID p_env) const;
+ float environment_get_sdfgi_min_cell_size(RID p_env) const;
+ bool environment_get_sdfgi_use_occlusion(RID p_env) const;
+ float environment_get_sdfgi_bounce_feedback(RID p_env) const;
+ bool environment_get_sdfgi_read_sky_light(RID p_env) const;
+ float environment_get_sdfgi_energy(RID p_env) const;
+ float environment_get_sdfgi_normal_bias(RID p_env) const;
+ float environment_get_sdfgi_probe_bias(RID p_env) const;
+ RS::EnvironmentSDFGIYScale environment_get_sdfgi_y_scale(RID p_env) const;
+
+ // Adjustment
+ void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction);
+ bool environment_get_adjustments_enabled(RID p_env) const;
+ float environment_get_adjustments_brightness(RID p_env) const;
+ float environment_get_adjustments_contrast(RID p_env) const;
+ float environment_get_adjustments_saturation(RID p_env) const;
+ bool environment_get_use_1d_color_correction(RID p_env) const;
+ RID environment_get_color_correction(RID p_env) const;
+};
+
+#endif // ENVIRONMENT_STORAGE_H
diff --git a/servers/rendering/storage/material_storage.h b/servers/rendering/storage/material_storage.h
index 3566502144..6347b22240 100644
--- a/servers/rendering/storage/material_storage.h
+++ b/servers/rendering/storage/material_storage.h
@@ -38,22 +38,22 @@ class RendererMaterialStorage {
public:
virtual ~RendererMaterialStorage(){};
- /* GLOBAL VARIABLE API */
- virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) = 0;
- virtual void global_variable_remove(const StringName &p_name) = 0;
- virtual Vector<StringName> global_variable_get_list() const = 0;
-
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) = 0;
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) = 0;
- virtual Variant global_variable_get(const StringName &p_name) const = 0;
- virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const = 0;
-
- virtual void global_variables_load_settings(bool p_load_textures = true) = 0;
- virtual void global_variables_clear() = 0;
-
- virtual int32_t global_variables_instance_allocate(RID p_instance) = 0;
- virtual void global_variables_instance_free(RID p_instance) = 0;
- virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) = 0;
+ /* GLOBAL SHADER UNIFORM API */
+ virtual void global_shader_uniform_add(const StringName &p_name, RS::GlobalShaderUniformType p_type, const Variant &p_value) = 0;
+ virtual void global_shader_uniform_remove(const StringName &p_name) = 0;
+ virtual Vector<StringName> global_shader_uniform_get_list() const = 0;
+
+ virtual void global_shader_uniform_set(const StringName &p_name, const Variant &p_value) = 0;
+ virtual void global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) = 0;
+ virtual Variant global_shader_uniform_get(const StringName &p_name) const = 0;
+ virtual RS::GlobalShaderUniformType global_shader_uniform_get_type(const StringName &p_name) const = 0;
+
+ virtual void global_shader_uniforms_load_settings(bool p_load_textures = true) = 0;
+ virtual void global_shader_uniforms_clear() = 0;
+
+ virtual int32_t global_shader_uniforms_instance_allocate(RID p_instance) = 0;
+ virtual void global_shader_uniforms_instance_free(RID p_instance) = 0;
+ virtual void global_shader_uniforms_instance_update(RID p_instance, int p_index, const Variant &p_value) = 0;
/* SHADER API */
virtual RID shader_allocate() = 0;
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 73405dcbed..bb76281782 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -772,19 +772,11 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
elem_size = 3;
}
- {
- elem_size *= sizeof(float);
- }
-
- if (elem_size == 6) {
- elem_size = 8;
- }
-
+ elem_size *= sizeof(float);
} break;
case RS::ARRAY_NORMAL: {
elem_size = 4;
} break;
-
case RS::ARRAY_TANGENT: {
elem_size = 4;
} break;
@@ -793,12 +785,9 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
} break;
case RS::ARRAY_TEX_UV: {
elem_size = 8;
-
} break;
-
case RS::ARRAY_TEX_UV2: {
elem_size = 8;
-
} break;
case RS::ARRAY_CUSTOM0:
case RS::ARRAY_CUSTOM1:
@@ -1410,7 +1399,7 @@ Array RenderingServer::_mesh_surface_get_skeleton_aabb_bind(RID p_mesh, int p_su
}
#endif
-int RenderingServer::global_variable_type_get_shader_datatype(GlobalVariableType p_type) {
+int RenderingServer::global_shader_uniform_type_get_shader_datatype(GlobalShaderUniformType p_type) {
switch (p_type) {
case RS::GLOBAL_VAR_TYPE_BOOL:
return ShaderLanguage::TYPE_BOOL;
@@ -2184,7 +2173,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("viewport_set_scaling_3d_mode", "viewport", "scaling_3d_mode"), &RenderingServer::viewport_set_scaling_3d_mode);
ClassDB::bind_method(D_METHOD("viewport_set_scaling_3d_scale", "viewport", "scale"), &RenderingServer::viewport_set_scaling_3d_scale);
ClassDB::bind_method(D_METHOD("viewport_set_fsr_sharpness", "viewport", "sharpness"), &RenderingServer::viewport_set_fsr_sharpness);
- ClassDB::bind_method(D_METHOD("viewport_set_fsr_mipmap_bias", "viewport", "mipmap_bias"), &RenderingServer::viewport_set_fsr_mipmap_bias);
+ ClassDB::bind_method(D_METHOD("viewport_set_texture_mipmap_bias", "viewport", "mipmap_bias"), &RenderingServer::viewport_set_texture_mipmap_bias);
ClassDB::bind_method(D_METHOD("viewport_set_update_mode", "viewport", "update_mode"), &RenderingServer::viewport_set_update_mode);
ClassDB::bind_method(D_METHOD("viewport_set_clear_mode", "viewport", "clear_mode"), &RenderingServer::viewport_set_clear_mode);
ClassDB::bind_method(D_METHOD("viewport_get_texture", "viewport"), &RenderingServer::viewport_get_texture);
@@ -2690,15 +2679,15 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE);
BIND_ENUM_CONSTANT(CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE);
- /* GLOBAL VARIABLES */
+ /* GLOBAL SHADER UNIFORMS */
- ClassDB::bind_method(D_METHOD("global_variable_add", "name", "type", "default_value"), &RenderingServer::global_variable_add);
- ClassDB::bind_method(D_METHOD("global_variable_remove", "name"), &RenderingServer::global_variable_remove);
- ClassDB::bind_method(D_METHOD("global_variable_get_list"), &RenderingServer::global_variable_get_list);
- ClassDB::bind_method(D_METHOD("global_variable_set", "name", "value"), &RenderingServer::global_variable_set);
- ClassDB::bind_method(D_METHOD("global_variable_set_override", "name", "value"), &RenderingServer::global_variable_set_override);
- ClassDB::bind_method(D_METHOD("global_variable_get", "name"), &RenderingServer::global_variable_get);
- ClassDB::bind_method(D_METHOD("global_variable_get_type", "name"), &RenderingServer::global_variable_get_type);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_add", "name", "type", "default_value"), &RenderingServer::global_shader_uniform_add);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_remove", "name"), &RenderingServer::global_shader_uniform_remove);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_get_list"), &RenderingServer::global_shader_uniform_get_list);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_set", "name", "value"), &RenderingServer::global_shader_uniform_set);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_set_override", "name", "value"), &RenderingServer::global_shader_uniform_set_override);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_get", "name"), &RenderingServer::global_shader_uniform_get);
+ ClassDB::bind_method(D_METHOD("global_shader_uniform_get_type", "name"), &RenderingServer::global_shader_uniform_get_type);
BIND_ENUM_CONSTANT(GLOBAL_VAR_TYPE_BOOL);
BIND_ENUM_CONSTANT(GLOBAL_VAR_TYPE_BVEC2);
@@ -2946,7 +2935,7 @@ void RenderingServer::init() {
GLOBAL_DEF("rendering/scaling_3d/mode", 0);
GLOBAL_DEF("rendering/scaling_3d/scale", 1.0);
GLOBAL_DEF("rendering/scaling_3d/fsr_sharpness", 0.2f);
- GLOBAL_DEF("rendering/scaling_3d/fsr_mipmap_bias", 0.0f);
+ GLOBAL_DEF("rendering/textures/default_filters/texture_mipmap_bias", 0.0f);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/mode",
PropertyInfo(Variant::INT,
"rendering/scaling_3d/mode",
@@ -2961,10 +2950,10 @@ void RenderingServer::init() {
PropertyInfo(Variant::FLOAT,
"rendering/scaling_3d/fsr_sharpness",
PROPERTY_HINT_RANGE, "0,2,0.1"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/fsr_mipmap_bias",
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/default_filters/texture_mipmap_bias",
PropertyInfo(Variant::FLOAT,
- "rendering/scaling_3d/fsr_mipmap_bias",
- PROPERTY_HINT_RANGE, "-2,2,0.1"));
+ "rendering/textures/default_filters/texture_mipmap_bias",
+ PROPERTY_HINT_RANGE, "-2,2,0.001"));
GLOBAL_DEF("rendering/textures/decals/filter", DECAL_FILTER_LINEAR_MIPMAPS);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/decals/filter", PropertyInfo(Variant::INT, "rendering/textures/decals/filter", PROPERTY_HINT_ENUM, "Nearest (Fast),Nearest+Mipmaps,Linear,Linear+Mipmaps,Linear+Mipmaps Anisotropic (Slow)"));
diff --git a/servers/rendering_server.h b/servers/rendering_server.h
index dcb2683add..1f2012ac8d 100644
--- a/servers/rendering_server.h
+++ b/servers/rendering_server.h
@@ -797,7 +797,7 @@ public:
virtual void viewport_set_scaling_3d_mode(RID p_viewport, ViewportScaling3DMode p_scaling_3d_mode) = 0;
virtual void viewport_set_scaling_3d_scale(RID p_viewport, float p_scaling_3d_scale) = 0;
virtual void viewport_set_fsr_sharpness(RID p_viewport, float p_fsr_sharpness) = 0;
- virtual void viewport_set_fsr_mipmap_bias(RID p_viewport, float p_fsr_mipmap_bias) = 0;
+ virtual void viewport_set_texture_mipmap_bias(RID p_viewport, float p_texture_mipmap_bias) = 0;
enum ViewportUpdateMode {
VIEWPORT_UPDATE_DISABLED,
@@ -1425,9 +1425,9 @@ public:
virtual void canvas_set_shadow_texture_size(int p_size) = 0;
- /* GLOBAL VARIABLES */
+ /* GLOBAL SHADER UNIFORMS */
- enum GlobalVariableType {
+ enum GlobalShaderUniformType {
GLOBAL_VAR_TYPE_BOOL,
GLOBAL_VAR_TYPE_BVEC2,
GLOBAL_VAR_TYPE_BVEC3,
@@ -1459,20 +1459,20 @@ public:
GLOBAL_VAR_TYPE_MAX
};
- virtual void global_variable_add(const StringName &p_name, GlobalVariableType p_type, const Variant &p_value) = 0;
- virtual void global_variable_remove(const StringName &p_name) = 0;
- virtual Vector<StringName> global_variable_get_list() const = 0;
+ virtual void global_shader_uniform_add(const StringName &p_name, GlobalShaderUniformType p_type, const Variant &p_value) = 0;
+ virtual void global_shader_uniform_remove(const StringName &p_name) = 0;
+ virtual Vector<StringName> global_shader_uniform_get_list() const = 0;
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) = 0;
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) = 0;
+ virtual void global_shader_uniform_set(const StringName &p_name, const Variant &p_value) = 0;
+ virtual void global_shader_uniform_set_override(const StringName &p_name, const Variant &p_value) = 0;
- virtual Variant global_variable_get(const StringName &p_name) const = 0;
- virtual GlobalVariableType global_variable_get_type(const StringName &p_name) const = 0;
+ virtual Variant global_shader_uniform_get(const StringName &p_name) const = 0;
+ virtual GlobalShaderUniformType global_shader_uniform_get_type(const StringName &p_name) const = 0;
- virtual void global_variables_load_settings(bool p_load_textures) = 0;
- virtual void global_variables_clear() = 0;
+ virtual void global_shader_uniforms_load_settings(bool p_load_textures) = 0;
+ virtual void global_shader_uniforms_clear() = 0;
- static int global_variable_type_get_shader_datatype(GlobalVariableType p_type);
+ static int global_shader_uniform_type_get_shader_datatype(GlobalShaderUniformType p_type);
/* FREE */
@@ -1648,7 +1648,7 @@ VARIANT_ENUM_CAST(RenderingServer::CanvasLightMode);
VARIANT_ENUM_CAST(RenderingServer::CanvasLightBlendMode);
VARIANT_ENUM_CAST(RenderingServer::CanvasLightShadowFilter);
VARIANT_ENUM_CAST(RenderingServer::CanvasOccluderPolygonCullMode);
-VARIANT_ENUM_CAST(RenderingServer::GlobalVariableType);
+VARIANT_ENUM_CAST(RenderingServer::GlobalShaderUniformType);
VARIANT_ENUM_CAST(RenderingServer::RenderingInfo);
VARIANT_ENUM_CAST(RenderingServer::Features);
VARIANT_ENUM_CAST(RenderingServer::CanvasTextureChannel);
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp
index ad61aa94bc..990281d96d 100644
--- a/servers/xr_server.cpp
+++ b/servers/xr_server.cpp
@@ -33,6 +33,16 @@
#include "xr/xr_interface.h"
#include "xr/xr_positional_tracker.h"
+XRServer::XRMode XRServer::xr_mode = XRMODE_DEFAULT;
+
+XRServer::XRMode XRServer::get_xr_mode() {
+ return xr_mode;
+}
+
+void XRServer::set_xr_mode(XRServer::XRMode p_mode) {
+ xr_mode = p_mode;
+}
+
XRServer *XRServer::singleton = nullptr;
XRServer *XRServer::get_singleton() {
diff --git a/servers/xr_server.h b/servers/xr_server.h
index d9188d2de1..74128bfb54 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -57,6 +57,12 @@ class XRServer : public Object {
_THREAD_SAFE_CLASS_
public:
+ enum XRMode {
+ XRMODE_DEFAULT, /* Default behaviour, means we check project settings */
+ XRMODE_OFF, /* Ignore project settings, disable OpenXR, disable shaders */
+ XRMODE_ON, /* Ignore project settings, enable OpenXR, enable shaders, run editor in VR (if applicable) */
+ };
+
enum TrackerType {
TRACKER_HEAD = 0x01, /* tracks the position of the players head (or in case of handheld AR, location of the phone) */
TRACKER_CONTROLLER = 0x02, /* tracks a controller */
@@ -75,6 +81,8 @@ public:
};
private:
+ static XRMode xr_mode;
+
Vector<Ref<XRInterface>> interfaces;
Dictionary trackers;
@@ -90,6 +98,9 @@ protected:
static void _bind_methods();
public:
+ static XRMode get_xr_mode();
+ static void set_xr_mode(XRMode p_mode);
+
static XRServer *get_singleton();
/*
diff --git a/tests/core/io/test_file_access.h b/tests/core/io/test_file_access.h
index f0e1cceacf..aab62955cb 100644
--- a/tests/core/io/test_file_access.h
+++ b/tests/core/io/test_file_access.h
@@ -78,6 +78,29 @@ TEST_CASE("[FileAccess] CSV read") {
CHECK(row5[1] == "tab separated");
CHECK(row5[2] == "lines, good?");
}
+
+TEST_CASE("[FileAccess] Get as UTF-8 String") {
+ Ref<FileAccess> f_lf = FileAccess::open(TestUtils::get_data_path("line_endings_lf.test.txt"), FileAccess::READ);
+ String s_lf = f_lf->get_as_utf8_string();
+ f_lf->seek(0);
+ String s_lf_nocr = f_lf->get_as_utf8_string(true);
+ CHECK(s_lf == "Hello darkness\nMy old friend\nI've come to talk\nWith you again\n");
+ CHECK(s_lf_nocr == "Hello darkness\nMy old friend\nI've come to talk\nWith you again\n");
+
+ Ref<FileAccess> f_crlf = FileAccess::open(TestUtils::get_data_path("line_endings_crlf.test.txt"), FileAccess::READ);
+ String s_crlf = f_crlf->get_as_utf8_string();
+ f_crlf->seek(0);
+ String s_crlf_nocr = f_crlf->get_as_utf8_string(true);
+ CHECK(s_crlf == "Hello darkness\r\nMy old friend\r\nI've come to talk\r\nWith you again\r\n");
+ CHECK(s_crlf_nocr == "Hello darkness\nMy old friend\nI've come to talk\nWith you again\n");
+
+ Ref<FileAccess> f_cr = FileAccess::open(TestUtils::get_data_path("line_endings_cr.test.txt"), FileAccess::READ);
+ String s_cr = f_cr->get_as_utf8_string();
+ f_cr->seek(0);
+ String s_cr_nocr = f_cr->get_as_utf8_string(true);
+ CHECK(s_cr == "Hello darkness\rMy old friend\rI've come to talk\rWith you again\r");
+ CHECK(s_cr_nocr == "Hello darknessMy old friendI've come to talkWith you again");
+}
} // namespace TestFileAccess
#endif // TEST_FILE_ACCESS_H
diff --git a/tests/core/io/test_resource.h b/tests/core/io/test_resource.h
index f94349fdd2..c880ca7d2a 100644
--- a/tests/core/io/test_resource.h
+++ b/tests/core/io/test_resource.h
@@ -76,8 +76,8 @@ TEST_CASE("[Resource] Saving and loading") {
resource->set_meta("other_resource", child_resource);
const String save_path_binary = OS::get_singleton()->get_cache_path().plus_file("resource.res");
const String save_path_text = OS::get_singleton()->get_cache_path().plus_file("resource.tres");
- ResourceSaver::save(save_path_binary, resource);
- ResourceSaver::save(save_path_text, resource);
+ ResourceSaver::save(resource, save_path_binary);
+ ResourceSaver::save(resource, save_path_text);
const Ref<Resource> &loaded_resource_binary = ResourceLoader::load(save_path_binary);
CHECK_MESSAGE(
diff --git a/tests/core/object/test_object.h b/tests/core/object/test_object.h
index 5b9d9cab53..88a3e4ccad 100644
--- a/tests/core/object/test_object.h
+++ b/tests/core/object/test_object.h
@@ -95,8 +95,8 @@ public:
Ref<Script> get_script() const override {
return Ref<Script>();
}
- const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override {
- return Vector<Multiplayer::RPCConfig>();
+ const Variant get_rpc_config() const override {
+ return Variant();
}
ScriptLanguage *get_language() override {
return nullptr;
diff --git a/tests/core/os/test_os.h b/tests/core/os/test_os.h
new file mode 100644
index 0000000000..c46da5e156
--- /dev/null
+++ b/tests/core/os/test_os.h
@@ -0,0 +1,158 @@
+/*************************************************************************/
+/* test_os.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 TEST_OS_H
+#define TEST_OS_H
+
+#include "core/os/os.h"
+
+#include "thirdparty/doctest/doctest.h"
+
+namespace TestOS {
+
+TEST_CASE("[OS] Environment variables") {
+#ifdef WINDOWS_ENABLED
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_environment("USERPROFILE"),
+ "The USERPROFILE environment variable should be present.");
+#else
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_environment("HOME"),
+ "The HOME environment variable should be present.");
+#endif
+
+ OS::get_singleton()->set_environment("HELLO", "world");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_environment("HELLO") == "world",
+ "The previously-set HELLO environment variable should return the expected value.");
+}
+
+TEST_CASE("[OS] Command line arguments") {
+ List<String> arguments = OS::get_singleton()->get_cmdline_args();
+ bool found = false;
+ for (int i = 0; i < arguments.size(); i++) {
+ if (arguments[i] == "--test") {
+ found = true;
+ break;
+ }
+ }
+ CHECK_MESSAGE(
+ found,
+ "The `--test` option must be present in the list of command line arguments.");
+}
+
+TEST_CASE("[OS] Executable and data paths") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_executable_path().is_absolute_path(),
+ "The executable path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_data_path().is_absolute_path(),
+ "The user data path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_config_path().is_absolute_path(),
+ "The user configuration path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_cache_path().is_absolute_path(),
+ "The cache path returned should be an absolute path.");
+}
+
+TEST_CASE("[OS] Ticks") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_ticks_usec() > 1000,
+ "The returned ticks (in microseconds) must be greater than 1,000.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_ticks_msec() > 1,
+ "The returned ticks (in milliseconds) must be greater than 1.");
+}
+
+TEST_CASE("[OS] Feature tags") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_feature("editor"),
+ "The binary has the \"editor\" feature tag.");
+ CHECK_MESSAGE(
+ !OS::get_singleton()->has_feature("standalone"),
+ "The binary does not have the \"standalone\" feature tag.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_feature("debug"),
+ "The binary has the \"debug\" feature tag.");
+ CHECK_MESSAGE(
+ !OS::get_singleton()->has_feature("release"),
+ "The binary does not have the \"release\" feature tag.");
+}
+
+TEST_CASE("[OS] Process ID") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_process_id() >= 1,
+ "The returned process ID should be greater than zero.");
+}
+
+TEST_CASE("[OS] Processor count and memory information") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_processor_count() >= 1,
+ "The returned processor count should be greater than zero.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_static_memory_usage() >= 1,
+ "The returned static memory usage should be greater than zero.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_static_memory_peak_usage() >= 1,
+ "The returned static memory peak usage should be greater than zero.");
+}
+
+TEST_CASE("[OS] Execute") {
+#ifdef WINDOWS_ENABLED
+ List<String> arguments;
+ arguments.push_back("/C");
+ arguments.push_back("dir > NUL");
+ int exit_code;
+ const Error err = OS::get_singleton()->execute("cmd", arguments, nullptr, &exit_code);
+ CHECK_MESSAGE(
+ err == OK,
+ "(Running the command `cmd /C \"dir > NUL\"` returns the expected Godot error code (OK).");
+ CHECK_MESSAGE(
+ exit_code == 0,
+ "Running the command `cmd /C \"dir > NUL\"` returns a zero (successful) exit code.");
+#else
+ List<String> arguments;
+ arguments.push_back("-c");
+ arguments.push_back("ls > /dev/null");
+ int exit_code;
+ const Error err = OS::get_singleton()->execute("sh", arguments, nullptr, &exit_code);
+ CHECK_MESSAGE(
+ err == OK,
+ "(Running the command `sh -c \"ls > /dev/null\"` returns the expected Godot error code (OK).");
+ CHECK_MESSAGE(
+ exit_code == 0,
+ "Running the command `sh -c \"ls > /dev/null\"` returns a zero (successful) exit code.");
+#endif
+}
+
+} // namespace TestOS
+
+#endif // TEST_OS_H
diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h
index 0c5704d6c9..b8b766023a 100644
--- a/tests/core/string/test_string.h
+++ b/tests/core/string/test_string.h
@@ -152,6 +152,20 @@ TEST_CASE("[String] UTF16 with BOM") {
CHECK(String::utf16(cs) == s);
}
+TEST_CASE("[String] UTF8 with CR") {
+ const String base = U"Hello darkness\r\nMy old friend\nI've come to talk\rWith you again";
+
+ String keep_cr;
+ Error err = keep_cr.parse_utf8(base.utf8().get_data());
+ CHECK(err == OK);
+ CHECK(keep_cr == base);
+
+ String no_cr;
+ err = no_cr.parse_utf8(base.utf8().get_data(), -1, true); // Skip CR.
+ CHECK(err == OK);
+ CHECK(no_cr == base.replace("\r", ""));
+}
+
TEST_CASE("[String] Invalid UTF8 (non-standard)") {
ERR_PRINT_OFF
static const uint8_t u8str[] = { 0x45, 0xE3, 0x81, 0x8A, 0xE3, 0x82, 0x88, 0xE3, 0x81, 0x86, 0xF0, 0x9F, 0x8E, 0xA4, 0xF0, 0x82, 0x82, 0xAC, 0xED, 0xA0, 0x81, 0 };
diff --git a/tests/data/line_endings_cr.test.txt b/tests/data/line_endings_cr.test.txt
new file mode 100644
index 0000000000..556154bb25
--- /dev/null
+++ b/tests/data/line_endings_cr.test.txt
@@ -0,0 +1 @@
+Hello darkness My old friend I've come to talk With you again \ No newline at end of file
diff --git a/tests/data/line_endings_crlf.test.txt b/tests/data/line_endings_crlf.test.txt
new file mode 100644
index 0000000000..a3cbe55b7f
--- /dev/null
+++ b/tests/data/line_endings_crlf.test.txt
@@ -0,0 +1,4 @@
+Hello darkness
+My old friend
+I've come to talk
+With you again
diff --git a/tests/data/line_endings_lf.test.txt b/tests/data/line_endings_lf.test.txt
new file mode 100644
index 0000000000..0aabcd911e
--- /dev/null
+++ b/tests/data/line_endings_lf.test.txt
@@ -0,0 +1,4 @@
+Hello darkness
+My old friend
+I've come to talk
+With you again
diff --git a/tests/test_macros.h b/tests/test_macros.h
index 6029a9cfc7..eff09fb4b0 100644
--- a/tests/test_macros.h
+++ b/tests/test_macros.h
@@ -271,22 +271,20 @@ public:
static SignalWatcher *get_singleton() { return singleton; }
void watch_signal(Object *p_object, const String &p_signal) {
- Vector<Variant> args;
- args.push_back(p_signal);
MethodInfo method_info;
ClassDB::get_signal(p_object->get_class(), p_signal, &method_info);
switch (method_info.arguments.size()) {
case 0: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero).bind(p_signal));
} break;
case 1: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one).bind(p_signal));
} break;
case 2: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two).bind(p_signal));
} break;
case 3: {
- p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three), args);
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three).bind(p_signal));
} break;
default: {
MESSAGE("Signal ", p_signal, " arg count not supported.");
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index e71f2edba3..16654181c6 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -56,6 +56,7 @@
#include "tests/core/object/test_class_db.h"
#include "tests/core/object/test_method_bind.h"
#include "tests/core/object/test_object.h"
+#include "tests/core/os/test_os.h"
#include "tests/core/string/test_node_path.h"
#include "tests/core/string/test_string.h"
#include "tests/core/string/test_translation.h"
@@ -104,7 +105,7 @@ int test_main(int argc, char *argv[]) {
for (int i = 0; i < argc; i++) {
args.push_back(String::utf8(argv[i]));
}
- OS::get_singleton()->set_cmdline("", args);
+ OS::get_singleton()->set_cmdline("", args, List<String>());
// Run custom test tools.
if (test_commands) {
@@ -257,7 +258,7 @@ struct GodotTestCaseListener : public doctest::IReporter {
if (RenderingServer::get_singleton()) {
RenderingServer::get_singleton()->sync();
- RenderingServer::get_singleton()->global_variables_clear();
+ RenderingServer::get_singleton()->global_shader_uniforms_clear();
RenderingServer::get_singleton()->finish();
memdelete(RenderingServer::get_singleton());
}